:root {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --radius-lg: 1rem;
    --radius-md: 0.5rem;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Keep the icon visible (it uses stroke="currentColor") */
.logo svg {
    color: #6366f1;
}

/* Apply the gradient to the text only */
.logo .logo-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 280px;
}

/* Header ad: keeps 728x90 on desktop, wraps nicely on smaller screens */
.ad-header {
    width: 728px;
    max-width: 100%;
    aspect-ratio: 728 / 90;
    height: auto;
    flex: 0 1 728px;
}

/* Ad Spaces */
.ad-space {
    background-color: var(--surface-color);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    overflow: hidden;
}

/* Header promo banner (uses the 728x90 slot) */
.ad-banner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.ad-accent-left {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background-color: var(--ad-accent, #4169E1);
}

.ad-left-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 10px;
}

.ad-icon-container {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-pin-icon {
    width: 36px;
    height: 36px;
    fill: var(--ad-icon, #DC143C);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
}

.ad-text-content {
    display: flex;
    flex-direction: column;
}

.ad-headline {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    line-height: 1.1;
}

.ad-subtext {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

.ad-cta-button {
    background-color: var(--ad-button, #4169E1);
    color: white;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(65,105,225,0.3);
    transition: filter 0.2s;
    white-space: nowrap;
}

.ad-cta-button:hover {
    filter: brightness(0.92);
}

@media (max-width: 520px) {
    .ad-banner {
        padding: 0 12px;
    }

    .ad-headline {
        font-size: 16px;
    }

    .ad-cta-button {
        padding: 8px 14px;
        font-size: 12px;
    }
}

.ad-top {
    width: 728px;
    height: 90px;
    margin-bottom: 1rem;
}

.ad-sidebar {
    width: 300px;
    height: 250px;
}

/* Hero & Dropzone */
.compressor-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    text-align: center;
    padding: 3rem 0;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 800px;
    margin-bottom: 2rem;
}

.dropzone {
    width: 100%;
    max-width: 800px;
    min-height: 300px;
    background-color: var(--surface-color);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dropzone:hover, .dropzone.drag-over {
    border-color: #6366f1;
    background-color: rgba(99,102,241,0.05);
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    pointer-events: none;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: #6366f1;
    margin-bottom: 1rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(99,102,241,0.5);
}

/* File List */
.file-list {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.file-item {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: #334155;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.file-details h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

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

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending { background: #334155; color: #cbd5e1; }
.status-processing { background: #0ea5e9; color: white; }
.status-done { background: var(--success-color); color: white; }
.status-error { background: var(--error-color); color: white; }

/* Download button pill */
.download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    margin-left: 1rem;
    line-height: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 20px -14px rgba(99,102,241,0.6);
}

.download-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -10px rgba(99,102,241,0.6);
}

.download-link:active {
    transform: translateY(0);
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

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