/* ============================================================
   FB Video Downloader — Custom Design System
   Font: Plus Jakarta Sans (headings) + JetBrains Mono (code)
   Theme: Midnight Dark | Accent: Electric Mint #0AEBA0
   ============================================================ */

/* ── Google Fonts preloaded in header.php ── */

/* ════════════════════════════════════════════════════════════
   1. DESIGN TOKENS
   ════════════════════════════════════════════════════════════ */
:root {
    /* Background layers */
    --bg-base: #07080E;
    --bg-surface: #0D0F18;
    --bg-card: #111420;
    --bg-card-hover: #151826;
    --bg-input: #0A0C14;

    /* Borders */
    --border: #1A1E2E;
    --border-focus: #52e5ff;
    --border-hover: #252A3D;

    /* Accent — Electric Mint */
    --accent: #52e5ff;
    --accent-dark: #07a9c5;
    --accent-glow: #0aeba026;
    --accent-subtle: #0aeba00f;

    /* Text */
    --text-primary: #e5e6e9;
    --text-secondary: #b6bedd;
    --text-muted: #b9bedb;

    /* Status */
    --danger: #FF4D6A;
    --warning: #FFB946;
    --success: #0AEBA0;
    --info: #4D9EFF;

    /* Typography */
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Spacing scale (8px base) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 80px;
    --space-10: 96px;

    /* Radii */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 0 30px rgba(10, 235, 160, 0.12);

    /* Transitions */
    --transition: all 0.22s ease;
    --transition-slow: all 0.4s ease;

    /* Container */
    --container-max: 1200px;
}

/* ════════════════════════════════════════════════════════════
   2. RESET & BASE
   ════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-dark);
}

img,
video {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

/* ════════════════════════════════════════════════════════════
   3. NAVBAR
   ════════════════════════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.site-header .navbar {
    background: rgba(7, 8, 14, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    transition: var(--transition);
}

.site-header.scrolled .navbar {
    background: rgba(7, 8, 14, 0.95);
    border-bottom-color: var(--border-hover);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* Logo */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary) !important;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-subtle);
    border: 1px solid rgba(10, 235, 160, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
    transition: var(--transition);
}

.logo-icon.small {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
}

.navbar-brand:hover .logo-icon {
    background: var(--accent-glow);
    box-shadow: var(--shadow-accent);
}

.logo-text {
    font-family: var(--font-body);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--accent);
}

/* Nav links */
.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--text-primary) !important;
    background: var(--accent-subtle);
}

.navbar-nav .nav-link i {
    font-size: 0.85rem;
}

/* Custom toggler */
.navbar-toggler {
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.toggler-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ════════════════════════════════════════════════════════════
   4. HERO SECTION
   ════════════════════════════════════════════════════════════ */
.hero-section {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-10) 0 var(--space-8);
}

/* Subtle grid background */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(10, 235, 160, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 235, 160, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Glow orb */
.hero-section::after {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(10, 235, 160, 0.08) 0%, transparent 65%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-subtle);
    border: 1px solid rgba(10, 235, 160, 0.2);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: var(--space-5);
}

.hero-badge::before {
    content: '✦';
    font-size: 0.7rem;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.hero-title .accent-word {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto var(--space-7);
    line-height: 1.7;
}

/* ════════════════════════════════════════════════════════════
   5. DOWNLOADER BOX
   ════════════════════════════════════════════════════════════ */
.downloader-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    max-width: 760px;
    margin: 0 auto var(--space-5);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.downloader-box:focus-within {
    border-color: rgba(10, 235, 160, 0.3);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(10, 235, 160, 0.06);
}

.url-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px 4px 4px 16px;
    margin-bottom: var(--space-3);
    transition: var(--transition);
}

.url-input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.url-input-icon {
    color: #7B82A0 !important;
    font-size: 1.1rem;
    flex-shrink: 0;
}

#fbUrl {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    padding: 14px 8px;
    min-width: 0;
}

#fbUrl::placeholder {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.92rem;
}

.btn-paste {
    background: var(--bg-surface);
    border: 1px solid var(--border-hover);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-paste:hover {
    background: var(--accent-subtle);
    border-color: rgba(10, 235, 160, 0.3);
    color: var(--accent);
}

.btn-download-main {
    width: 100%;
    background: var(--accent);
    color: #07080E;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 32px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-download-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn-download-main:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(10, 235, 160, 0.25);
}

.btn-download-main:hover::before {
    opacity: 1;
}

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

.btn-download-main .spinner-border {
    display: none;
    width: 18px;
    height: 18px;
    border-width: 2px;
}

.btn-download-main.loading .btn-text {
    display: none;
}

.btn-download-main.loading .spinner-border {
    display: inline-block;
}

.btn-download-main:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Supported types */
.supported-types {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-4);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.supported-types span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.supported-types span::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
}

/* ════════════════════════════════════════════════════════════
   6. PROGRESS SECTION
   ════════════════════════════════════════════════════════════ */
#progressSection {
    max-width: 760px;
    margin: 0 auto var(--space-6);
    display: none;
}

#progressSection.visible {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow);
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.progress-status-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-status-text .status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-dot 1.4s ease-in-out infinite;
}

.progress-percent-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
}

.progress-track {
    height: 8px;
    background: var(--bg-input);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent));
    border-radius: 100px;
    width: 0%;
    transition: width 0.4s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: -40px;
    width: 40px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s ease infinite;
}

/* ════════════════════════════════════════════════════════════
   7. RESULT SECTION
   ════════════════════════════════════════════════════════════ */
#resultSection {
    max-width: 760px;
    margin: 0 auto var(--space-6);
    display: none;
}

#resultSection.visible {
    display: block;
    animation: fadeInUp 0.35s ease;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid rgba(10, 235, 160, 0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow), var(--shadow-accent);
    display: flex;
    gap: 0;
}

.result-thumbnail-wrap {
    width: 220px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: var(--bg-base);
}

.result-thumbnail-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-duration-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(4px);
}

.result-info {
    flex: 1;
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-meta {
    display: flex;
    gap: var(--space-4);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.result-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.quality-selector {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.btn-quality {
    background: var(--bg-input);
    border: 1px solid var(--border-hover);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-quality:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-quality.active {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-download-final {
    position: relative;
    overflow: hidden;
    background: var(--accent);
    color: #07080E;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 28px;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    align-self: flex-start;
    min-width: 240px;
    cursor: pointer;
    z-index: 1;
}

#slideshowGrid .btn-download-final {
    min-width: 100% !important;
}

.btn-download-final:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(10, 235, 160, 0.25);
}

/* ── Countdown Animated State ── */
.btn-download-final.is-countdown {
    cursor: wait !important;
    background: #0E121E !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(10, 235, 160, 0.45) !important;
    box-shadow: 0 0 25px rgba(10, 235, 160, 0.25) !important;
    transform: none !important;
}

.btn-download-final.is-countdown:disabled {
    opacity: 1 !important;
}

.btn-download-final .btn-countdown-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(10, 235, 160, 0.22), rgba(10, 235, 160, 0.48));
    border-right: 2px solid #0AEBA0;
    transition: width 1s linear;
    z-index: 0;
    pointer-events: none;
}

.btn-download-final .btn-countdown-text {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.btn-download-final .countdown-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 6px;
    background: #0AEBA0;
    color: #07080E;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    margin-left: 2px;
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }
}

@keyframes spinIcon {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.btn-download-final .spin-icon {
    display: inline-block;
    animation: spinIcon 1.2s linear infinite;
    color: #0AEBA0;
    font-size: 1.1rem;
}


/* ════════════════════════════════════════════════════════════
   8. HOW IT WORKS SECTION
   ════════════════════════════════════════════════════════════ */
.section {
    padding: var(--space-10) 0;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-subtle);
    border: 1px solid rgba(10, 235, 160, 0.15);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: var(--space-3);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto var(--space-7);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    position: relative;
}

/* Connector line between steps */
.steps-grid::before {
    content: '';
    position: absolute;
    top: 28px;
    left: calc(16.6% + 16px);
    right: calc(16.6% + 16px);
    height: 1px;
    background: linear-gradient(90deg, var(--accent), rgba(10, 235, 160, 0.1), var(--accent));
    z-index: 0;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-5);
    text-align: center;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.step-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.step-number-circle {
    width: 56px;
    height: 56px;
    background: var(--accent-subtle);
    border: 2px solid rgba(10, 235, 160, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    transition: var(--transition);
}

.step-card:hover .step-number-circle {
    background: var(--accent-glow);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(10, 235, 160, 0.2);
}

.step-icon {
    font-size: 1.8rem;
    margin-bottom: var(--space-3);
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

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

/* ════════════════════════════════════════════════════════════
   9. FEATURES SECTION
   ════════════════════════════════════════════════════════════ */
.features-section {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon-wrap {
    width: 44px;
    height: 44px;
    background: var(--accent-subtle);
    border: 1px solid rgba(10, 235, 160, 0.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: var(--space-4);
    transition: var(--transition);
}

.feature-card:hover .feature-icon-wrap {
    background: var(--accent-glow);
    box-shadow: var(--shadow-accent);
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

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

/* ════════════════════════════════════════════════════════════
   10. FAQ SECTION
   ════════════════════════════════════════════════════════════ */
.faq-section {
    background: var(--bg-base);
}

.faq-list {
    max-width: 760px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item.open {
    border-color: rgba(10, 235, 160, 0.2);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-card);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
    gap: var(--space-4);
    user-select: none;
}

.faq-question:hover {
    background: var(--bg-card-hover);
}

.faq-item.open .faq-question {
    color: var(--accent);
}

.faq-toggle-icon {
    width: 28px;
    height: 28px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: var(--transition);
}

.faq-item.open .faq-toggle-icon {
    background: var(--accent-subtle);
    border-color: rgba(10, 235, 160, 0.25);
    color: var(--accent);
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.2s ease;
    background: var(--bg-surface);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: var(--space-4) var(--space-5);
}

/* ════════════════════════════════════════════════════════════
   11. FOOTER
   ════════════════════════════════════════════════════════════ */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: var(--space-9) 0 var(--space-5);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.3fr;
    gap: var(--space-7);
    margin-bottom: var(--space-7);
    padding-bottom: var(--space-7);
    border-bottom: 1px solid var(--border);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary) !important;
    margin-bottom: var(--space-4);
}

.footer-desc {
    font-size: 0.87rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}

.footer-badges {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 100px;
}

.badge-item i {
    color: var(--accent);
    font-size: 0.8rem;
}

.footer-heading {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    font-size: 0.88rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.footer-links a i {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.footer-links a:hover i {
    color: var(--accent);
}

.footer-steps-mini {
    list-style: none;
}

.footer-steps-mini li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.87rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    line-height: 1.5;
}

.step-num {
    width: 22px;
    height: 22px;
    background: var(--accent-subtle);
    border: 1px solid rgba(10, 235, 160, 0.2);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.footer-bottom {
    text-align: center;
}

.footer-copy {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
}

.footer-copy strong {
    color: var(--text-secondary);
}

.footer-disclaimer {
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--text-muted);
    text-align: center;
    max-width: 940px;
    margin: 10px auto 0;
}

.footer-disclaimer strong {
    color: var(--text-secondary);
}

.footer-disclaimer a {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-disclaimer a:hover {
    color: #fff;
}

/* ════════════════════════════════════════════════════════════
   12. COOKIE BANNER
   ════════════════════════════════════════════════════════════ */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: calc(100% - 40px);
    animation: slideUp 0.4s ease;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
}

.cookie-content i {
    font-size: 1.3rem;
    color: var(--warning);
    flex-shrink: 0;
}

.cookie-content p {
    font-size: 0.83rem;
    color: var(--text-secondary);
    margin: 0;
}

.cookie-content a {
    color: var(--accent);
}

.btn-cookie-accept {
    background: var(--accent);
    color: #07080E;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-cookie-accept:hover {
    background: var(--accent-dark);
}

/* ════════════════════════════════════════════════════════════
   13. UTILITIES & HELPERS
   ════════════════════════════════════════════════════════════ */
.text-accent {
    color: var(--accent);
}

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

.text-center {
    text-align: center;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.alert-custom {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    max-width: 760px;
    margin: 0 auto var(--space-4);
}

.alert-error {
    border-color: rgba(255, 77, 106, 0.3);
    color: var(--danger);
    background: rgba(255, 77, 106, 0.06);
}

.alert-success {
    border-color: rgba(10, 235, 160, 0.3);
    color: var(--success);
    background: rgba(10, 235, 160, 0.06);
}

.alert-info {
    border-color: rgba(77, 158, 255, 0.3);
    color: var(--info);
    background: rgba(77, 158, 255, 0.06);
}

.hidden {
    display: none !important;
}

/* ════════════════════════════════════════════════════════════
   14. ANIMATIONS
   ════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes shimmer {
    0% {
        right: 100%;
    }

    100% {
        right: -40px;
    }
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* ════════════════════════════════════════════════════════════
   15. RESPONSIVE
   ════════════════════════════════════════════════════════════ */

/* Tablet: ≤ 1024px */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }
}

/* Mobile: ≤ 768px */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: var(--space-9) 0 var(--space-7);
    }

    .hero-title {
        font-size: 2rem;
        letter-spacing: -0.8px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .steps-grid::before {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .footer-top .footer-brand {
        order: -1;
    }

    .result-card {
        flex-direction: column;
    }

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

    .url-input-wrapper {
        flex-wrap: wrap;
    }

    #fbUrl {
        min-width: 100%;
        order: 1;
        padding: 12px 0;
    }

    .url-input-icon {
        order: 0;
    }

    .btn-paste {
        order: 2;
    }

    .downloader-box {
        padding: var(--space-4);
    }

    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: var(--space-3);
    }

    .cookie-content {
        flex-direction: column;
    }
}

/* Small mobile: ≤ 480px */
@media (max-width: 480px) {
    :root {
        --space-5: 16px;
    }

    .section {
        padding: var(--space-8) 0;
    }

    .hero-badge {
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn-download-main {
        font-size: 0.92rem;
        padding: 14px 20px;
    }
}

/* ════════════════════════════════════════════════════════════
   16. SCROLLBAR (Webkit)
   ════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ════════════════════════════════════════════════════════════
   17. SELECTION COLOR
   ════════════════════════════════════════════════════════════ */
::selection {
    background: rgba(10, 235, 160, 0.25);
    color: var(--text-primary);
}

.content label,
.content h4,
.content h5,
.content h6,
.content p,
.content span,
.content li,
.content ul,
.content ol {
    color: grey;
    opacity: 0.85;
}

#urlHint span {
    color: #7B82A0;
}

.grey {
    color: #7B82A0 !important;
}

/* ════════════════════════════════════════════════════════════
   18. DOWNLOAD CONFIRM MODAL (Interactive user prompt)
   ════════════════════════════════════════════════════════════ */
.download-confirm-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 6, 12, 0.281);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.download-confirm-backdrop.is-active {
    opacity: 1;
    visibility: visible;
}

.download-confirm-card {
    background: #111420;
    border: 1px solid #1A1E2E;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), 0 0 35px rgba(10, 235, 160, 0.18);
    border-radius: 18px;
    padding: 28px 24px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.download-confirm-backdrop.is-active .download-confirm-card {
    transform: scale(1) translateY(0);
}

.download-confirm-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(10, 235, 160, 0.12);
    border: 1.5px solid rgba(10, 235, 160, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0AEBA0;
    font-size: 2.2rem;
}

.download-confirm-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #E4E8F4;
    margin-bottom: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.download-confirm-filename {
    font-size: 0.88rem;
    color: #0AEBA0;
    background: rgba(10, 235, 160, 0.08);
    border: 1px solid rgba(10, 235, 160, 0.2);
    border-radius: 8px;
    padding: 6px 14px;
    margin: 0 auto 14px;
    max-width: 90%;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-confirm-prompt {
    font-size: 0.98rem;
    color: #A0A6C0;
    margin-bottom: 22px;
    line-height: 1.5;
}

.download-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-confirm-cancel {
    flex: 1;
    padding: 12px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #1A1E2E;
    color: #8E96B2;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #E4E8F4;
}

.btn-confirm-download {
    flex: 1.4;
    padding: 12px 18px;
    border-radius: 10px;
    background: #0AEBA0;
    border: none;
    color: #07080E;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(10, 235, 160, 0.35);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.btn-confirm-download:hover {
    background: #07B87C;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(10, 235, 160, 0.45);
    color: #07080E;
}

/* ════════════════════════════════════════════════════════════
   USER REVIEWS & RATING COMPONENT
   ════════════════════════════════════════════════════════════ */
.reviews-section {
    padding: 70px 0 60px;
    background: linear-gradient(180deg, rgba(7, 8, 14, 0) 0%, rgba(13, 15, 24, 0.7) 100%);
    border-top: 1px solid rgba(26, 30, 46, 0.7);
    position: relative;
}

.reviews-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 36px;
}

.reviews-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 5px 14px;
    border-radius: 50px;
    background: rgba(255, 185, 70, 0.1);
    color: #FFB946;
    border: 1px solid rgba(255, 185, 70, 0.25);
    margin-bottom: 12px;
}

.reviews-title {
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.25;
}

.reviews-subtitle {
    font-size: 0.96rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Summary Bar */
.reviews-summary-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 28px;
    margin-bottom: 34px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.reviews-score-block {
    display: flex;
    align-items: center;
    gap: 18px;
}

.reviews-score-num {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    font-family: var(--font-body);
}

.reviews-score-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reviews-score-stars {
    color: #FFB946;
    font-size: 1.15rem;
    letter-spacing: 2px;
}

.reviews-score-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-review-write {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--accent);
    color: #07080E;
    font-size: 0.94rem;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(10, 235, 160, 0.28);
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-review-write:hover {
    background: #07B87C;
    color: #07080E;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(10, 235, 160, 0.4);
}

/* Reviews Grid */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.review-card:hover {
    transform: translateY(-3px);
    border-color: rgba(10, 235, 160, 0.35);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.review-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.review-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(10, 235, 160, 0.2), rgba(77, 158, 255, 0.25));
    border: 1px solid rgba(10, 235, 160, 0.3);
    color: var(--accent);
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    flex-shrink: 0;
}

.review-user-name {
    font-weight: 700;
    font-size: 0.96rem;
    color: var(--text-primary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.review-verified-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: #4D9EFF;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.review-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.review-stars-list {
    color: #FFB946;
    font-size: 0.95rem;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.review-comment {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #B2B8D0;
    margin-bottom: 0;
    flex-grow: 1;
    word-break: break-word;
}

/* Empty State */
.reviews-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 45px 20px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: 16px;
}

.reviews-empty-icon {
    font-size: 2.5rem;
    color: #FFB946;
    margin-bottom: 12px;
}

.reviews-empty-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Load More Reviews Button */
.reviews-load-more-wrap {
    text-align: center;
    margin-top: 36px;
}

.btn-load-more-reviews {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 32px;
    background: rgba(10, 235, 160, 0.08);
    border: 1px solid rgba(10, 235, 160, 0.35);
    border-radius: 12px;
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-load-more-reviews:hover {
    background: var(--accent);
    color: #07080E;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 235, 160, 0.35);
}

.btn-load-more-reviews:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.reviews-all-loaded-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.review-card-fadein {
    animation: reviewFadeIn 0.4s ease forwards;
}

@keyframes reviewFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Styling */
.modal-content.dark-theme-modal {
    background: #0D0F18;
    border: 1px solid #1A1E2E;
    border-radius: 18px;
    color: var(--text-primary);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.dark-theme-modal .modal-header {
    border-bottom: 1px solid #1A1E2E;
    padding: 20px 24px;
}

.dark-theme-modal .modal-footer {
    border-top: 1px solid #1A1E2E;
    padding: 16px 24px;
}

.dark-theme-modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Star Rating Selector Widget */
.star-picker-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    background: #0A0C14;
    border: 1px solid #1A1E2E;
    border-radius: 12px;
    margin-bottom: 18px;
}

.star-picker-stars {
    display: flex;
    gap: 10px;
    cursor: pointer;
}

.star-picker-stars .star-pick-item {
    font-size: 2rem;
    color: #31374A;
    transition: color 0.15s ease, transform 0.15s ease;
}

.star-picker-stars .star-pick-item.active,
.star-picker-stars .star-pick-item.hovered {
    color: #FFB946;
    transform: scale(1.15);
}

.star-picker-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #FFB946;
    min-height: 20px;
}

.form-control.dark-input {
    background: #0A0C14;
    border: 1px solid #1A1E2E;
    color: #E4E8F4;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.94rem;
}

.form-control.dark-input:focus {
    background: #0A0C14;
    border-color: var(--accent);
    color: #E4E8F4;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.dark-theme-modal .form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.rate-limit-badge {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 767px) {
    .reviews-summary-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
    }

    .btn-review-write {
        width: 100%;
        justify-content: center;
    }

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