/* ==========================================================================
   MP4Tube.video — Stylesheet
   Dark / minimal / premium SaaS look.
   Palette: black surfaces, #292929 borders, single-brand red (#FF1A1A).
   ========================================================================== */

:root {
    /* Background layers */
    --bg-page:           #0D0D0D;
    --bg-section:        #111111;
    --bg-section-alt:    #151515;

    /* Cards / surfaces */
    --surface-card:      #171717;
    --surface-card-hover:#1E1E1E;
    --surface-input:     #131316;
    --surface-soft:      rgba(255, 255, 255, 0.02);

    /* Borders */
    --border:            #292929;
    --border-strong:     #3a3a3a;

    /* Text */
    --text:              #F5F5F5;
    --text-dim:          #A1A1A1;
    --text-mute:         #707070;

    /* Brand red */
    --red:               #FF1A1A;
    --red-hover:         #FF3333;
    --red-soft:          rgba(255, 26, 26, 0.10);
    --red-softer:        rgba(255, 26, 26, 0.06);
    --red-border:        rgba(255, 26, 26, 0.45);
    --red-gradient:      linear-gradient(180deg, #FF1A1A 0%, #E50F0F 100%);
    --red-gradient-hov:  linear-gradient(180deg, #FF3333 0%, #FF1A1A 100%);

    /* Geometry */
    --r-sm:              8px;
    --r-md:              12px;
    --r-lg:              16px;
    --r-xl:              20px;
    --r-full:            999px;

    /* Shadow */
    --shadow-sm:         0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md:         0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg:         0 24px 60px rgba(0, 0, 0, 0.55);
    --shadow-red:        0 12px 32px rgba(255, 26, 26, 0.30);

    /* Motion */
    --ease:              cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================================================
   Reset & base
   =========================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-page);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, select { font-family: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--red-soft); color: var(--text); }

/* ===========================================================
   Container
   =========================================================== */
.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===========================================================
   HEADER
   =========================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

/* Brand */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.01em;
}
.brand-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--r-sm);
    background: var(--red-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(255, 26, 26, 0.35);
}
.brand-icon svg { transform: translateX(1px); }
.brand-mp4 { color: var(--red); }
.brand-tube { color: #fff; }
.brand-tld { color: var(--text-dim); font-weight: 600; }

/* Header nav */
.header-nav {
    display: flex;
    gap: 28px;
}
.header-nav a {
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s var(--ease);
}
.header-nav a:hover { color: var(--text); }

/* Mobile hamburger */
.nav-toggle {
    display: none;
    width: 36px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--surface-card);
}
.nav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 8px 24px 16px;
    border-top: 1px solid var(--border);
    background: rgba(13, 13, 13, 0.95);
    gap: 4px;
}
.mobile-menu a {
    display: block;
    padding: 12px 8px;
    color: var(--text-dim);
    font-size: 15px;
    border-radius: var(--r-sm);
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.mobile-menu a:hover {
    background: var(--surface-soft);
    color: var(--text);
}

/* ===========================================================
   HERO
   =========================================================== */
.hero {
    padding: 80px 0 96px;
}
.hero-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-title {
    font-size: clamp(40px, 7vw, 76px);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 20px;
}
.hero-line-light { display: block; color: var(--text); }
.hero-line-accent {
    display: block;
    color: var(--red);
}
.hero-sub {
    max-width: 560px;
    color: var(--text-dim);
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.55;
    margin-bottom: 56px;
}

/* ===========================================================
   DOWNLOADER PANEL — the visual focus of the page
   =========================================================== */
.downloader-panel {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 28px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ---------- URL pill input ---------- */
.url-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-input);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 6px 14px 6px 18px;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.url-pill:hover {
    border-color: var(--border-strong);
}
.url-pill:focus-within {
    border-color: var(--red);
    box-shadow: 0 0 0 4px var(--red-softer);
}
.url-pill-icon {
    display: inline-flex;
    color: var(--text-dim);
    flex-shrink: 0;
    transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}
.url-input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text);
    font-size: 15px;
    padding: 14px 4px;
    min-width: 0;
}
.url-input::placeholder { color: var(--text-mute); }
.url-kbd {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-mute);
    font-family: 'Inter', monospace;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    user-select: none;
}
.url-pill:focus-within .url-kbd {
    color: var(--text-dim);
    border-color: var(--border-strong);
}

/* ---------- Floating URL bar (outside the dark panel) ---------- */
/* The bar floats on its own between the hero title and the panel,
   like the reference screenshot — big, centered, pill-shaped. */
.url-bar-wrap {
    width: 100%;
    max-width: 820px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 36px;   /* space between URL bar and the panel below */
}

.url-pill-hero {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 14px 14px 22px;
    background: #fff;                          /* clean white pill like the reference */
    border: 1.5px solid #e0e0e0;
    border-radius: 60px;                        /* very rounded pill */
    box-shadow: 0 4px 24px rgba(0,0,0,0.12); /* soft drop shadow */
    transition:
        border-color 0.2s ease,
        box-shadow   0.2s ease;
}
.url-pill-hero:hover {
    border-color: #c0c0c0;
    box-shadow: 0 6px 32px rgba(0,0,0,0.16);
}
.url-pill-hero:focus-within {
    border-color: #e63030;
    box-shadow: 0 0 0 4px rgba(230,48,48,0.15), 0 6px 32px rgba(0,0,0,0.16);
}
.url-pill-hero .url-pill-icon {
    color: #888;
    flex-shrink: 0;
    display: inline-flex;
    transition: color 0.25s ease, transform 0.25s ease;
}
.url-pill-hero .url-pill-icon svg {
    width: 26px;
    height: 26px;
}
.url-pill-hero:focus-within .url-pill-icon {
    color: #e63030;
    animation: linkPulse 1.4s ease infinite;
}
@keyframes linkPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}

.url-input-hero {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: #222;
    font-size: 24px;
    font-weight: 500;
    padding: 10px 6px;
    text-align: center;
    min-width: 0;
}
.url-input-hero::placeholder {
    color: #aaa;
    font-weight: 400;
    font-size: 24px;
    text-align: center;
}

/* The right arrow button — filled red pill, like the reference */
.url-kbd-hero {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #e63030;       /* solid red button */
    border: none;
    border-radius: 50%;        /* circular */
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 8px rgba(230,48,48,0.4);
}
.url-kbd-hero:hover {
    background: #c42020;
    transform: scale(1.05);
}
.url-pill-hero:focus-within .url-kbd-hero {
    background: #c42020;
    box-shadow: 0 2px 12px rgba(230,48,48,0.5);
}
.url-kbd-hero kbd { display: none; }  /* hide kbd text if any */
.url-kbd-hero svg {
    color: #fff;
    width: 22px;
    height: 22px;
}

.url-error {
    color: #e63030;
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
    font-weight: 500;
    text-align: center;
    width: 100%;
}

/* ---------- Video preview ---------- */
.video-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    animation: slideUp 0.3s var(--ease);
}
.preview-thumb-wrap {
    position: relative;
    flex-shrink: 0;
    width: 168px;
    aspect-ratio: 16 / 9;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--bg-section);
    border: 1px solid var(--border);
}
.preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.preview-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 6px;
}
.preview-meta {
    min-width: 0;
    flex: 1;
}
.preview-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.preview-uploader {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
    font-size: 13px;
}
.yt-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
}

/* ---------- Panel sections ---------- */
.panel-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.panel-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.step-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--red-soft);
    color: var(--red-hover);
    font-size: 11px;
    font-weight: 800;
    border: 1px solid var(--red-border);
    flex-shrink: 0;
}
.step-pill-sm {
    width: 18px;
    height: 18px;
    font-size: 10px;
}
.step-pill-lg {
    width: 28px;
    height: 28px;
    font-size: 13px;
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    box-shadow: 0 0 0 4px var(--red-softer);
}
.panel-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Step block wrapper (used for URL step + qf-grid children) */
.step-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.step-block-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.step-block-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.step-block-hint {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-mute);
    font-weight: 500;
}
/* ---------- Type toggle ---------- */
.type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.type-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px 20px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
    text-align: left;
    cursor: pointer;
}
.type-btn:hover {
    border-color: var(--border-strong);
    background: var(--surface-card-hover);
}
.type-btn.active {
    border-color: var(--red);
    background: var(--red-soft);
}
.type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface-input);
    color: var(--text-dim);
    border: 1px solid var(--border);
    transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.type-btn.active .type-icon {
    color: var(--red-hover);
    background: rgba(255, 26, 26, 0.15);
    border-color: var(--red-border);
}
.type-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}
.type-hint {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.3;
}

/* ---------- Quality / Format grid ---------- */
.qf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.qf-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: border-color 0.2s var(--ease);
}
.qf-card:hover { border-color: var(--border-strong); }
.qf-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Compact layout for 6 quality buttons */
.qf-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
/* Slightly different layout for format cards (with subtitles) */
.qf-options-small {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.qf-options-small .qf-opt {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 14px;
}

.qf-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 6px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
    text-align: center;
    cursor: pointer;
}
.qf-opt:hover {
    border-color: var(--border-strong);
    background: var(--surface-card-hover);
}
.qf-opt.active {
    border-color: var(--red);
    background: var(--red-soft);
}
.qf-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
}
.qf-detail {
    font-size: 11px;
    color: var(--text-mute);
    line-height: 1.2;
}
.qf-opt.active .qf-detail { color: var(--text-dim); }
.qf-options-small .qf-name { font-size: 14px; font-weight: 700; }
.qf-options-small .qf-detail { font-size: 12px; }

/* ---------- Selection summary (Selected: 1080p · MP4) ---------- */
.summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: -8px;
}
.summary-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-mute);
}
.summary-text {
    color: var(--text);
    font-weight: 600;
}

/* ---------- Download CTA ---------- */
.cta-row {
    margin-top: 4px;
}
.btn-download {
    display: block;
    width: 100%;
    padding: 18px 24px;
    border-radius: var(--r-md);
    background: var(--red-gradient);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.005em;
    box-shadow: var(--shadow-red);
    transition: transform 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease), opacity 0.15s var(--ease);
}
.btn-download:hover:not(:disabled) {
    background: var(--red-gradient-hov);
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(255, 26, 26, 0.45);
}
.btn-download:active:not(:disabled) {
    transform: translateY(0);
}
.btn-download:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.btn-download-text,
.btn-download-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Progress ---------- */
.progress { margin-top: -8px; }
.progress-track {
    height: 6px;
    background: var(--surface-input);
    border-radius: var(--r-full);
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--border);
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--red);
    border-radius: var(--r-full);
    transition: width 0.25s var(--ease);
    box-shadow: 0 0 10px rgba(255, 26, 26, 0.6);
}
.progress-text {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
}

/* ===========================================================
   SECTIONS (Features / How-to / FAQ)
   =========================================================== */
.section {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}
.section-alt {
    background: var(--bg-section);
}
.section-head {
    text-align: center;
    margin-bottom: 56px;
}
.section-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--red);
    margin-bottom: 12px;
}
.section-heading {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

/* ---------- Features ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.feature-card {
    padding: 28px 24px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.feature-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    background: var(--surface-card-hover);
}
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    background: var(--red-soft);
    color: var(--red-hover);
    border: 1px solid var(--red-border);
    margin-bottom: 16px;
}
.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.feature-card p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- How to use ---------- */
.steps {
    list-style: none;
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.step {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--red-soft);
    color: var(--red-hover);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
    border: 1px solid var(--red-border);
    flex-shrink: 0;
}
.step-body h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.step-body p {
    color: var(--text-dim);
    font-size: 14px;
}

/* ---------- FAQ ---------- */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-item {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.faq-item[open] {
    border-color: var(--border-strong);
    background: var(--surface-card-hover);
}
.faq-item summary {
    list-style: none;
    padding: 18px 22px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: color 0.15s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--red-hover); }
.faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface-input);
    color: var(--text-dim);
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
    transition: transform 0.25s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.faq-item[open] .faq-icon {
    transform: rotate(45deg);
    background: var(--red-soft);
    color: var(--red-hover);
}
.faq-answer {
    padding: 0 22px 18px;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.55;
}

/* ===========================================================
   FOOTER
   =========================================================== */
.site-footer {
    padding: 56px 0 28px;
    border-top: 1px solid var(--border);
    background: var(--bg-page);
    color: var(--text-dim);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 36px;
}
.footer-brand .brand { margin-bottom: 10px; }
.footer-tag {
    font-size: 13px;
    color: var(--text-mute);
    max-width: 240px;
}
.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}
.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col a {
    color: var(--text-dim);
    font-size: 14px;
    transition: color 0.15s var(--ease);
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
    color: var(--text-mute);
    line-height: 1.7;
}

/* ===========================================================
   ERROR BANNER + TOASTS
   =========================================================== */
.error-banner {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--red-softer);
    border-top: 1px solid var(--red-border);
    border-bottom: 1px solid var(--red-border);
    color: var(--text);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.error-banner .container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 14px;
}
.error-icon { font-size: 18px; }

.toast-container {
    position: fixed;
    top: 88px;
    right: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 12px 18px;
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    max-width: 320px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-left: 3px solid #22c55e; }
.toast-error   { border-left: 3px solid var(--red-hover); }
.toast-info    { border-left: 3px solid var(--red); }

/* ===========================================================
   Animations
   =========================================================== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===========================================================
   RESPONSIVE — tested at 1440 / 1280 / 1024 / 768 / 390 / 375
   =========================================================== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
    .header-nav { display: none; }
    .nav-toggle { display: inline-flex; }
    .mobile-menu[data-open="true"] { display: flex; }

    .hero { padding: 48px 0 64px; }
    .hero-title { font-size: 38px; }
    .hero-sub { margin-bottom: 32px; }

    /* URL bar — scales down on tablet/mobile */
    .url-bar-wrap { margin-bottom: 28px; }
    .url-pill-hero {
        border-radius: 40px;
        gap: 10px;
        padding: 10px 10px 10px 16px;
    }
    .url-pill-hero .url-pill-icon svg { width: 22px; height: 22px; }
    .url-input-hero { font-size: 18px; padding: 8px 4px; }
    .url-input-hero::placeholder { font-size: 18px; }
    .url-kbd-hero { width: 42px; height: 42px; }
    .url-kbd-hero svg { width: 18px; height: 18px; }

    .downloader-panel { padding: 22px; border-radius: var(--r-lg); }

    .qf-grid { grid-template-columns: 1fr; }
    .video-preview { flex-direction: column; align-items: flex-start; }
    .preview-thumb-wrap { width: 100%; }

    .section { padding: 64px 0; }
    .section-head { margin-bottom: 36px; }

    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-title { font-size: 32px; line-height: 1.05; }
    .hero-sub { font-size: 14px; margin-bottom: 24px; }

    /* URL bar — compact on small phones */
    .url-bar-wrap { margin-bottom: 20px; }
    .url-pill-hero {
        border-radius: 30px;
        padding: 8px 8px 8px 14px;
        gap: 8px;
    }
    .url-pill-hero .url-pill-icon svg { width: 20px; height: 20px; }
    .url-input-hero { font-size: 16px; padding: 6px 4px; }
    .url-input-hero::placeholder { font-size: 16px; }
    .url-kbd-hero { width: 38px; height: 38px; }
    .url-kbd-hero svg { width: 16px; height: 16px; }

    .type-btn { padding: 16px 18px; }
    .btn-download { padding: 16px 18px; font-size: 15px; }
}
@media (max-width: 375px) {
    .hero-title { font-size: 28px; }
    .downloader-panel { padding: 18px; }
    .qf-options { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================================================
   Scrollbar
   =========================================================== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }
