* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.3;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

body.has-svg-background::before {
    opacity: 0.3;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 800px;
    width: 100%;
    position: relative;
    z-index: 1;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    margin-top: 20px;
}

.description {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.selector-section,
.opacity-section {
    margin-bottom: 20px;
}

.selector-label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.selector-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Courier New', Courier, monospace;
    transition: border-color 0.2s ease;
}

.selector-input:focus {
    outline: none;
    border-color: #667eea;
}

.opacity-label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

#opacityValue {
    color: #667eea;
    font-family: 'Courier New', Courier, monospace;
}

.opacity-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #e0e0e0 0%, #667eea 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.opacity-slider::-webkit-slider-thumb:hover {
    background: #764ba2;
    transform: scale(1.1);
}

.opacity-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.opacity-slider::-moz-range-thumb:hover {
    background: #764ba2;
    transform: scale(1.1);
}

.upload-section {
    margin-bottom: 30px;
}

#svgInput {
    display: none;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 3px dashed #667eea;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-label:hover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.upload-label svg {
    color: #667eea;
    margin-bottom: 12px;
}

.upload-label span {
    color: #667eea;
    font-weight: 600;
    font-size: 16px;
}

.output-section {
    margin-top: 30px;
}

h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
}

.code-container {
    position: relative;
    background: #1e1e1e;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

#cssCode {
    color: #d4d4d4;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #764ba2;
    transform: translateY(-1px);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background: #10b981;
}

.usage-note {
    color: #666;
    font-size: 14px;
    font-style: italic;
}

.usage-note code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    color: #667eea;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    .upload-label {
        padding: 30px 20px;
    }
}

.powered-by {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: white;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s ease;
    z-index: 2;
}

.powered-by:hover {
    background: rgba(0, 0, 0, 0.5);
}