:root {
    --bg-primary: #0D1117;
    --bg-secondary: #161B22;
    --bg-tertiary: #21262D;
    --surface: rgba(22, 27, 34, 0.8);
    --surface-hover: rgba(33, 38, 45, 0.9);
    --border: rgba(48, 54, 61, 0.8);
    --border-light: rgba(56, 139, 253, 0.4);
    --text-primary: #E6EDF3;
    --text-secondary: #8B949E;
    --text-muted: #6E7681;
    --accent: #7C4DFF;
    --accent-light: #B388FF;
    --accent-glow: rgba(124, 77, 255, 0.3);
    --success: #3FB950;
    --success-glow: rgba(63, 185, 80, 0.3);
    --gradient-1: linear-gradient(135deg, #7C4DFF 0%, #00D9FF 100%);
    --gradient-2: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(124, 77, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(0, 217, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.logo img {
    height: 36px;
    width: auto;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* Hero */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 24px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.hero-text {
    max-width: 720px;
    margin: 0 auto 56px;
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Tool Card */
.tool-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    margin-bottom: 80px;
    text-align: left;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 20px 50px -12px rgba(0, 0, 0, 0.5);
}

.tool-card h2 {
    margin-bottom: 8px;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
}

.tool-card>p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 20px;
    padding: 56px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(33, 38, 45, 0.3);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--accent);
    background: rgba(124, 77, 255, 0.05);
    box-shadow: 0 0 30px var(--accent-glow);
}

.upload-icon {
    font-size: 56px;
    margin-bottom: 20px;
    filter: grayscale(0.3);
}

.upload-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.upload-subtext {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.875rem;
}

.upload-btn {
    background: var(--gradient-1);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

/* File Info */
.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 32px;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 20px;
}

.file-icon {
    font-size: 40px;
}

.file-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.remove-file {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.3);
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    color: #FF5252;
    padding: 8px 12px;
    transition: all 0.2s;
}

.remove-file:hover {
    background: rgba(255, 82, 82, 0.2);
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 900px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}

.option-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: var(--bg-tertiary);
}

.option-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.option-card:has(input:checked) {
    border-color: var(--accent);
    background: rgba(124, 77, 255, 0.1);
    box-shadow: 0 0 20px var(--accent-glow);
}

.option-card:has(input:checked)::before {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.option-card label {
    cursor: pointer;
    display: block;
}

.option-card h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.option-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Compress Button */
.compress-btn {
    display: block;
    width: 100%;
    background: var(--gradient-1);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 14px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px var(--accent-glow);
    letter-spacing: 0.02em;
}

.compress-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px var(--accent-glow);
}

.compress-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Progress */
.progress-container {
    margin-bottom: 32px;
}

.progress-bar {
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 5px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent-glow);
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Result Section */
.result-section {
    text-align: center;
    padding: 40px;
    background: rgba(63, 185, 80, 0.05);
    border: 1px solid rgba(63, 185, 80, 0.2);
    border-radius: 20px;
}

.result-icon {
    width: 72px;
    height: 72px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
    box-shadow: 0 0 30px var(--success-glow);
}

.result-section h3 {
    margin-bottom: 28px;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.size-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.size-item {
    text-align: center;
    padding: 16px 24px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    min-width: 140px;
}

.size-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.size-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.size-value.original {
    color: var(--text-secondary);
}

.size-value.compressed {
    color: var(--success);
}

.size-arrow {
    font-size: 28px;
    color: var(--accent);
}

.savings {
    margin-bottom: 28px;
    font-weight: 600;
    font-size: 1.1rem;
}

.savings.positive {
    color: var(--success);
}

.savings.neutral {
    color: var(--text-secondary);
}

.download-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 16px 36px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px var(--success-glow);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--success-glow);
}

.new-file-btn {
    background: transparent;
    color: var(--accent-light);
    border: 2px solid var(--accent);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-file-btn:hover {
    background: rgba(124, 77, 255, 0.1);
}

/* Features */
.features {
    padding: 80px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.features h2 {
    text-align: center;
    margin-bottom: 56px;
    font-size: 2.25rem;
    font-weight: 700;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}

.feature-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.feature-item h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* FAQ */
.faq {
    padding: 80px 0;
}

.faq h2 {
    text-align: center;
    margin-bottom: 56px;
    font-size: 2.25rem;
    font-weight: 700;
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--border-light);
}

.faq-item h3 {
    margin-bottom: 12px;
    color: var(--accent-light);
    font-size: 1.1rem;
    font-weight: 600;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 48px 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

footer p {
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 50px 0 40px;
    }

    .tool-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .size-comparison {
        flex-direction: column;
        gap: 16px;
    }

    .size-arrow {
        transform: rotate(90deg);
    }

    .download-btn,
    .new-file-btn {
        width: 100%;
        margin-right: 0;
    }

    .features,
    .faq {
        padding: 60px 0;
    }
}