/* ════════════════════════════════════════════════════════════════
   FileConverter — Premium Light Theme with Warm Color Palette
   ────────────────────────────────────────────────────────────
   Background:  #F8F8FF / #D7CCC8
   Accent:      #B7837D
   Buttons:     #65000B
   Text:        #390006
   ════════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─── */
:root {
    /* Colors — User Palette */
    --bg-primary: #F8F8FF;
    --bg-secondary: #D7CCC8;
    --bg-tertiary: #EDE7E3;

    --surface: rgba(215, 204, 200, 0.35);
    --surface-hover: rgba(215, 204, 200, 0.55);
    --surface-border: rgba(183, 131, 125, 0.2);

    --glass-bg: rgba(248, 248, 255, 0.7);
    --glass-border: rgba(183, 131, 125, 0.18);
    --glass-shadow: 0 8px 32px rgba(57, 0, 6, 0.06);

    --text-primary: #390006;
    --text-secondary: #6b3a3f;
    --text-muted: #a08080;

    --accent-1: #B7837D;
    --accent-2: #c9958f;
    --accent-3: #a0706a;
    --accent-gradient: linear-gradient(135deg, #B7837D, #c9958f, #a0706a);

    --btn-primary: #65000B;
    --btn-primary-hover: #7a1018;
    --btn-primary-active: #520009;

    --success: #2d8a5e;
    --success-bg: rgba(45, 138, 94, 0.1);
    --warning: #b8860b;
    --warning-bg: rgba(184, 134, 11, 0.1);
    --error: #c0392b;
    --error-bg: rgba(192, 57, 43, 0.1);
    --info: #2980b9;
    --info-bg: rgba(41, 128, 185, 0.1);

    /* Typography */
    --font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.75rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: var(--bg-primary);
    background-image: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    background-attachment: fixed;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}


/* ─── Background Animated Orbs (soft warm tones) ─── */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
    animation: floatOrb 20s ease-in-out infinite;
}

.bg-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-1);
    top: -200px;
    left: -150px;
    animation-duration: 25s;
}

.bg-orb-2 {
    width: 500px;
    height: 500px;
    background: var(--bg-secondary);
    bottom: -150px;
    right: -100px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.bg-orb-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 22s;
    animation-delay: -10s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

/* ─── Container ─── */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

/* ─── Header ─── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(248, 248, 255, 0.8);
    border-bottom: 1px solid var(--glass-border);
    padding: var(--space-md) 0;
    box-shadow: 0 1px 8px rgba(57, 0, 6, 0.04);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--font-size-xl);
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--btn-primary);
}

.logo-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav {
    display: flex;
    gap: var(--space-sm);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all var(--transition-base);
}

.nav-link svg {
    width: 16px;
    height: 16px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--surface);
}

.nav-link.active {
    color: var(--btn-primary);
    background: rgba(101, 0, 11, 0.07);
}

/* ─── Language Switcher ─── */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-xs) var(--space-sm);
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: var(--font-size-xs);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    background: var(--surface-hover);
    border-color: var(--accent-1);
}

.lang-btn svg {
    width: 14px;
    height: 14px;
    color: var(--btn-primary);
}

.lang-arrow {
    transition: transform var(--transition-fast);
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 160px;
    background: #F8F8FF;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(57, 0, 6, 0.15);
    padding: 6px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background var(--transition-fast);
}

.lang-option:hover {
    background: var(--surface);
    color: var(--btn-primary);
}

.lang-option.active {
    background: rgba(101, 0, 11, 0.08);
    color: var(--btn-primary);
    font-weight: 700;
}

.flag {
    font-size: 1rem;
}

/* ─── Language Banner ─── */
.lang-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: #EDE7E3;
    border: 2px solid var(--accent-1);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    box-shadow: 0 4px 16px rgba(57, 0, 6, 0.08);
    animation: slideIn 0.3s ease;
}

.lang-banner-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    font-weight: 500;
}

.lang-banner-icon {
    width: 22px;
    height: 22px;
    color: var(--btn-primary);
    flex-shrink: 0;
}

.lang-banner-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

/* ─── Main Content ─── */
.main {
    padding: var(--space-xl) 0;
    min-height: calc(100vh - 200px);
}

/* ─── Hero Section ─── */
.hero {
    text-align: center;
    padding: var(--space-2xl) 0 var(--space-xl);
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--btn-primary), var(--accent-1), var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.limits-badge-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-md);
}

.limits-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(101, 0, 11, 0.08);
    border: 1px solid rgba(183, 131, 125, 0.3);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-primary);
}

.limits-badge svg {
    width: 14px;
    height: 14px;
    color: var(--btn-primary);
}

/* ─── Glass Card ─── */
.card {
    margin-bottom: var(--space-xl);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--glass-shadow);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.glass-card:hover {
    border-color: rgba(183, 131, 125, 0.35);
    box-shadow: 0 12px 40px rgba(57, 0, 6, 0.08);
}

/* ─── URL Input Section ─── */
.url-input-group {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.url-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: var(--space-md);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.url-input {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) 48px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    outline: none;
    transition: all var(--transition-base);
}

.url-input::placeholder {
    color: var(--text-muted);
}

.url-input:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(183, 131, 125, 0.15);
    background: rgba(255, 255, 255, 0.85);
}

.btn-icon {
    position: absolute;
    right: var(--space-sm);
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: var(--btn-primary);
    background: var(--surface);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.btn svg {
    width: 18px;
    height: 18px;
}

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

.btn-primary {
    background: var(--surface);
    color: var(--btn-primary);
    border: 1px solid var(--glass-border);
}

.btn-primary:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--accent-1);
    box-shadow: 0 4px 16px rgba(183, 131, 125, 0.15);
}

.btn-accent {
    background: var(--btn-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(101, 0, 11, 0.2);
}

.btn-accent:hover:not(:disabled) {
    background: var(--btn-primary-hover);
    box-shadow: 0 6px 24px rgba(101, 0, 11, 0.3);
    transform: translateY(-1px);
}

.btn-accent:active:not(:disabled) {
    background: var(--btn-primary-active);
    transform: translateY(0);
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
    border-radius: var(--radius-sm);
}

.btn-download {
    padding: var(--space-md) var(--space-2xl);
    font-size: var(--font-size-base);
}

.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-primary.loading::after {
    border: 2px solid rgba(101, 0, 11, 0.2);
    border-top-color: var(--btn-primary);
}

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

/* ─── Loading Skeleton ─── */
.skeleton-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-lg);
}

.skeleton {
    background: linear-gradient(90deg,
        rgba(183, 131, 125, 0.08) 25%,
        rgba(183, 131, 125, 0.16) 50%,
        rgba(183, 131, 125, 0.08) 75%
    );
    background-size: 200% 100%;
    border-radius: var(--radius-sm);
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-thumbnail {
    width: 200px;
    height: 112px;
    border-radius: var(--radius-md);
}

.skeleton-title {
    height: 24px;
    width: 80%;
    margin-bottom: var(--space-md);
}

.skeleton-text {
    height: 16px;
    width: 60%;
    margin-bottom: var(--space-sm);
}

.skeleton-text.short {
    width: 40%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Video Info Card ─── */
.video-info-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.video-thumbnail-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: 0 4px 16px rgba(57, 0, 6, 0.1);
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-sm);
    background: rgba(57, 0, 6, 0.85);
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.video-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.video-uploader {
    color: var(--accent-3);
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.video-meta {
    display: flex;
    gap: var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.video-meta svg {
    width: 14px;
    height: 14px;
}

/* ─── Download Options ─── */
.download-options {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-end;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--surface-border);
}

.option-group {
    flex: 1;
}

.option-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.option-label svg {
    width: 14px;
    height: 14px;
}

.select-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    cursor: pointer;
    outline: none;
    transition: all var(--transition-base);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b3a3f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.select-input option,
.select-input optgroup {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.select-input:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(183, 131, 125, 0.15);
    background-color: rgba(255, 255, 255, 0.85);
}

/* ─── Active Downloads ─── */
.active-downloads {
    margin-bottom: var(--space-xl);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.section-title svg {
    width: 22px;
    height: 22px;
    color: var(--accent-1);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 var(--space-sm);
    background: var(--btn-primary);
    color: #fff;
    font-size: var(--font-size-xs);
    font-weight: 700;
    border-radius: var(--radius-full);
}

/* ─── Job Cards ─── */
.jobs-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.job-card {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: var(--space-md);
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    animation: slideIn 0.3s ease;
}

.job-card:hover {
    border-color: rgba(183, 131, 125, 0.35);
    box-shadow: 0 4px 16px rgba(57, 0, 6, 0.06);
}

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

.job-thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.job-thumb-placeholder {
    width: 60px;
    height: 40px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.job-thumb-placeholder svg {
    width: 20px;
    height: 20px;
}

.job-info {
    min-width: 0;
}

.job-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.job-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.job-progress-bar {
    height: 4px;
    background: rgba(183, 131, 125, 0.12);
    border-radius: 2px;
    overflow: hidden;
    margin-top: var(--space-sm);
}

.job-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-1), var(--btn-primary));
    border-radius: 2px;
    transition: width 0.5s ease;
    position: relative;
}

.job-progress-fill.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: progressShine 1.5s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.job-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ─── Status Badges ─── */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-queued {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-downloading {
    background: var(--info-bg);
    color: var(--info);
}

.status-converting {
    background: rgba(183, 131, 125, 0.12);
    color: var(--accent-3);
}

.status-done {
    background: var(--success-bg);
    color: var(--success);
}

.status-error {
    background: var(--error-bg);
    color: var(--error);
}

.status-expired {
    background: rgba(160, 128, 128, 0.1);
    color: var(--text-muted);
}

.format-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(183, 131, 125, 0.1);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--accent-3);
    text-transform: uppercase;
}

/* ─── Queue Bar (In-page Component above Your Downloads) ─── */
.queue-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    background: #EDE7E3;
    border: 1.5px solid var(--accent-1);
    box-shadow: 0 4px 16px rgba(57, 0, 6, 0.06);
    margin-bottom: var(--space-xl);
}

.queue-bar svg {
    width: 18px;
    height: 18px;
    color: var(--btn-primary);
    flex-shrink: 0;
}

.queue-bar strong {
    color: var(--btn-primary);
    font-weight: 700;
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.empty-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

/* ─── History Table ─── */
.history-section {
    padding-top: var(--space-lg);
}

.history-table-wrapper {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.history-table th {
    text-align: left;
    padding: var(--space-md);
    color: var(--text-muted);
    font-weight: 600;
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--surface-border);
}

.history-table td {
    padding: var(--space-md);
    border-bottom: 1px solid rgba(183, 131, 125, 0.08);
    vertical-align: middle;
}

.history-table tbody tr {
    transition: background var(--transition-fast);
}

.history-table tbody tr:hover {
    background: rgba(215, 204, 200, 0.3);
}

.title-cell {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.history-thumb {
    width: 48px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.title-text {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.td-id {
    color: var(--text-muted);
    font-weight: 600;
}

.td-size, .td-time {
    color: var(--text-secondary);
    white-space: nowrap;
}

.text-muted {
    color: var(--text-muted);
}

/* ─── Footer ─── */
.footer {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--surface-border);
    text-align: center;
}

.footer-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.footer-text a {
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-text a:hover {
    color: var(--btn-primary);
}

.footer-disclaimer {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ─── Toast Notifications ─── */
#toast-container {
    position: fixed;
    top: 80px;
    right: var(--space-lg);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 380px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: rgba(248, 248, 255, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(57, 0, 6, 0.1);
    animation: toastSlideIn 0.3s ease;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--error); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info    { border-left: 3px solid var(--info); }

.toast svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-success svg { color: var(--success); }
.toast-error svg   { color: var(--error); }
.toast-warning svg { color: var(--warning); }
.toast-info svg    { color: var(--info); }

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

/* ─── Utility Classes ─── */
.hidden {
    display: none !important;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero-title {
        font-size: var(--font-size-2xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .url-input-group {
        flex-direction: column;
    }

    .url-input-group .btn {
        width: 100%;
        justify-content: center;
    }

    .video-info-grid {
        grid-template-columns: 1fr;
    }

    .video-thumbnail-wrapper {
        max-width: 100%;
    }

    .download-options {
        flex-direction: column;
        align-items: stretch;
    }

    .download-options .btn-download {
        width: 100%;
        justify-content: center;
    }

    .skeleton-grid {
        grid-template-columns: 1fr;
    }

    .skeleton-thumbnail {
        width: 100%;
        height: 180px;
    }

    .job-card {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .job-thumb, .job-thumb-placeholder {
        display: none;
    }

    .history-table th:nth-child(1),
    .history-table td:nth-child(1),
    .history-table th:nth-child(4),
    .history-table td:nth-child(4) {
        display: none;
    }

    .nav-link span {
        display: none;
    }

    #toast-container {
        left: var(--space-md);
        right: var(--space-md);
        max-width: none;
    }

    .limits-badge-group {
        gap: 6px;
    }

    .limits-badge {
        font-size: 0.72rem;
        padding: 4px 10px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .glass-card {
        padding: var(--space-md);
    }

    .limits-badge-group {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        width: 100%;
    }

    .limits-badge {
        width: 100%;
        max-width: 290px;
        justify-content: center;
        text-align: center;
    }

    .history-table th:nth-child(6),
    .history-table td:nth-child(6) {
        display: none;
    }
}
