:root {
    --primary-red: #ff3e3e;
    --primary-red-hover: #e63535;
    --bg-color: #050505;
    --text-color: #ffffff;
    --secondary-bg: #0f0f0f;
    --border-color: #1c1c1c;
    --input-bg: #0a0a0a;
    --nav-bg: #000000;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    --transition: all 0.2s ease;
}

.light-theme {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --secondary-bg: #f2f2f2;
    --border-color: #dddddd;
    --input-bg: #ffffff;
    --nav-bg: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.light-theme .hamburger .line {
    background-color: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html,
body {
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Premium Background Glow Effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 600px;
    background: radial-gradient(circle at 50% 0%, rgba(255, 62, 62, 0.2) 0%, rgba(255, 62, 62, 0.08) 40%, rgba(255, 62, 62, 0) 75%);
    z-index: -1;
    pointer-events: none;
    filter: blur(35px);
}

.light-theme::before {
    background: radial-gradient(circle at 50% 0%, rgba(255, 62, 62, 0.06) 0%, rgba(255, 62, 62, 0) 60%) !important;
}

/* Navigation */
nav {
    background-color: rgba(10, 10, 10, 0.45);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 0.6rem 0;
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    z-index: 2000;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    box-sizing: border-box; /* Ensure padding doesn't add to width */
}

.light-theme nav {
    background-color: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--primary-red);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}



.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0 1.5rem;
    height: 100%;
}

/* Header Structure & Alignment */
.nav-left,
.nav-center,
.nav-right {
    display: flex;
    align-items: center;
}

.nav-left {
    flex: 1;
    justify-content: flex-start;
}

.nav-center {
    flex: 0 1 auto;
    justify-content: center;
    max-width: 60%;
    min-width: 0;
}

.nav-right {
    flex: 1;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 0.8rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        width: 100%; /* Force fill */
        max-width: 100vw;
        position: relative;
    }

    .nav-left {
        flex: 0 0 auto; /* Stop growing to prevent bumping */
        display: flex;
        align-items: center;
        gap: 8px;
        /* Gap between Hamburger and Logo */
        min-width: 0;
    }

    /* nav-center is gone in HTML, so we just style nav-right */
    .nav-right {
        flex: 0 0 auto;
        margin-left: auto; /* Push forcefully to the right */
        display: flex;
        align-items: center;
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 4px; /* Reduced gap even more as requested */
    }

    .logo {
        font-size: 16px !important; /* Increased for better visibility while staying safe */
        letter-spacing: -0.5px;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        margin-right: 15px; /* Balanced buffer */
    }

    .lang-trigger {
        padding: 4px 6px;
        width: auto !important;
        min-width: 45px;
        font-size: 0.7rem;
        border-radius: 12px;
    }

    .lang-trigger .short-name {
        display: inline-block !important;
        font-weight: 800;
    }

    .lang-trigger .full-name,
    .lang-trigger i:not(.arrow) {
        display: none !important;
    }

    .lang-trigger .arrow {
        display: inline-block !important;
        font-size: 0.55rem;
        margin-left: 2px;
    }
}

/* Responsive Utilities */
.hide-on-mobile {
    display: flex !important;
}

.hide-on-desktop {
    display: none !important;
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }

    .hide-on-desktop {
        display: flex !important;
    }
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.living-logo {
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--primary-red);
}

.living-logo span {
    display: inline-block;
    position: relative;
    padding: 0 1px;
    transition: all 0.3s ease;
    animation: breathing 4s ease-in-out infinite;
    color: var(--text-color);
}

/* Playhead Line */
.living-logo::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 0;
    width: 2px;
    height: 80%;
    background: var(--primary-red);
    box-shadow: 0 0 15px var(--primary-red);
    z-index: 10;
    animation: playhead 3s linear infinite;
    pointer-events: none;
}

/* Lighting up letters as playhead passes */
.living-logo span {
    animation: highlight 3s linear infinite;
}

@keyframes playhead {
    0% {
        left: 0;
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    95% {
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes highlight {

    0%,
    100% {
        color: var(--text-color);
        text-shadow: none;
        transform: scale(1);
    }

    /* Approximate timing for each letter in 12-letter word 'viewduration' */
    5%,
    15% {
        color: var(--primary-red);
        text-shadow: 0 0 10px rgba(255, 62, 62, 0.5);
        transform: scale(1.1);
    }
}

/* Delay for each letter to sync with 3s playhead */
.living-logo span:nth-child(1) {
    animation-delay: 0s;
}

.living-logo span:nth-child(2) {
    animation-delay: 0.25s;
}

.living-logo span:nth-child(3) {
    animation-delay: 0.5s;
}

.living-logo span:nth-child(4) {
    animation-delay: 0.75s;
}

.living-logo span:nth-child(5) {
    animation-delay: 1s;
}

.living-logo span:nth-child(6) {
    animation-delay: 1.25s;
}

.living-logo span:nth-child(7) {
    animation-delay: 1.5s;
}

.living-logo span:nth-child(8) {
    animation-delay: 1.75s;
}

.living-logo span:nth-child(9) {
    animation-delay: 2s;
}

.living-logo span:nth-child(10) {
    animation-delay: 2.25s;
}

.living-logo span:nth-child(11) {
    animation-delay: 2.5s;
}

.living-logo span:nth-child(12) {
    animation-delay: 2.75s;
}

@keyframes breathing {

    0%,
    100% {
        opacity: 0.9;
    }

    50% {
        opacity: 1;
    }
}

.living-logo:hover::after {
    animation-duration: 1.5s;
}

.living-logo:hover span {
    animation-duration: 1.5s;
}

.logo:hover {
    transform: scale(1.05);
}



.nav-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    /* Reduced for match */
    font-weight: 500;
}

.nav-dropdown i {
    font-size: 0.75rem;
    opacity: 0.8;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.lang-switcher {
    position: relative;
    user-select: none;
}

.lang-trigger {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    min-width: 90px;
    justify-content: center;
}

.lang-trigger i:not(.arrow) {
    font-size: 0.85rem;
    color: var(--primary-red) !important;
}

.lang-trigger .arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

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

.lang-trigger:hover {
    background-color: rgba(255, 62, 62, 0.05);
    box-shadow: 0 4px 12px rgba(255, 62, 62, 0.15);
}

.light-theme .lang-trigger {
    background: #ffffff;
    border-color: #000;
    color: #000;
}

.light-theme .lang-trigger i:not(.arrow) {
    color: var(--primary-red) !important;
}

.light-theme .lang-trigger i.arrow {
    color: #000;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 180px;
    max-height: 350px;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    z-index: 2500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
}

.lang-switcher.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown::-webkit-scrollbar {
    width: 6px;
}

.lang-dropdown::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

.lang-option {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-option:hover {
    background: rgba(255, 62, 62, 0.1);
    color: var(--primary-red);
}

.lang-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    display: inline-block;
    vertical-align: middle;
}

.lang-option.active {
    background: var(--primary-red);
    color: #fff;
}

.light-theme .lang-dropdown {
    background: #ffffff;
    border-color: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.light-theme .lang-option {
    color: #444;
}

.light-theme .lang-option:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.light-theme .lang-option.active {
    background: #000;
    color: #fff;
}

.nav-actions i {
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
}

.sign-in-btn {
    background: transparent;
    border: 1.5px solid #222;
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    /* Reduced for match */
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.sign-in-btn:hover {
    border-color: #444;
}

.nav-items {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-items a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 12px;
    transition: var(--transition);
}

.nav-items a:hover {
    background: rgba(255, 62, 62, 0.1);
    color: var(--primary-red);
}

.light-theme .nav-items a:hover {
    background: rgba(255, 62, 62, 0.05);
}

@media (min-width: 769px) {
    .hamburger {
        display: none !important;
    }

    .mobile-drawer {
        display: none !important;
    }

    .nav-items {
        display: flex !important;
    }
}

/* Main Content */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 100px 2rem 60px;
    text-align: center;
}

.hero-icon {
    margin-bottom: 1.5rem;
}

.main-header {
    text-align: center;
    margin-bottom: 3.5rem;
}




.main-header h1 {
    font-size: 2.2rem;
    color: #ffffff;
    margin: 1rem 0 0.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.light-theme .main-header h1 {
    color: #111111;
}

.main-header h2 {
    font-size: 0.95rem;
    color: #888;
    font-weight: 500;
    max-width: 650px;
    margin: 0 auto 1.2rem;
    line-height: 1.5;
}

.hero-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    /* Reduced for match */
}

.hero-link:hover {
    text-decoration: underline;
}

.highlight {
    font-weight: 700;
    text-underline-offset: 4.5px;
    text-decoration: underline;
}

.calculator-container {
    max-width: 420px;
    margin: 0 auto 2.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center-align stack */
    gap: 20px;
    /* Standardized gap */
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

#playlist-url {
    padding-right: 100px;
    /* Space for the paste button */
}

.paste-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #0f0f0f;
    border: 1.5px solid var(--primary-red);
    color: var(--primary-red);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
}

.paste-btn i {
    font-size: 0.9rem;
}

.paste-btn:hover {
    background: var(--primary-red);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 45, 85, 0.4);
}

.paste-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.input-wrapper {
    width: 100%;
    margin-bottom: 0;
    /* Managed by container gap */
}

.input-label {
    display: block;
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    /* Reduced for match */
    margin-bottom: 0.6rem;
    color: var(--primary-red);
}

.input-group input {
    width: 100%;
    padding: 14px 28px;
    background-color: #111111;
    border: 1px solid #222222;
    border-radius: 28px;
    color: var(--text-color);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
    height: 44px;
    text-align: left !important;
    display: block;
    box-sizing: border-box;
}

.input-group input::placeholder {
    color: #444;
}

.light-theme .input-group input,
.light-theme .range-group input {
    border: 1px solid #000000;
    color: #000000;
    background: #ffffff;
}

.light-theme .input-group input::placeholder,
.light-theme .range-group input::placeholder {
    color: #000000;
    opacity: 0.5;
}

.light-theme .paste-btn {
    border: 1px solid #000000;
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.input-group input:focus {
    border-color: var(--primary-red);
}

.shortcut-text {
    display: block;
    text-align: left;
    font-size: 0.85rem;
    color: #444;
    margin-top: 1rem;
}

.shortcut-text kbd {
    background: transparent;
    border: 1px solid #222;
    color: #666;
    padding: 1px 5px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.8rem;
}

/* --- Unified Advanced Features Module (v11.0) --- */
.advanced-features-wrapper {
    width: 100%;
    background: #0d0d0d;
    border: 1.5px solid rgba(255, 62, 62, 0.1);
    border-radius: 60px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: var(--transition);
}

.advanced-features-wrapper:hover,
.advanced-features-wrapper:focus-within,
.advanced-features-wrapper.expanded {
    border-color: var(--primary-red) !important;
}

.dropdown-btn {
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    border: none !important;
    /* Ensure no internal border contributes to thickness */
    color: var(--text-color);
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
}

.dropdown-btn span {
    flex: 1;
    text-align: left;
    /* Aligned left per reference */
}

.advanced-options-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 2rem;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.advanced-features-wrapper.expanded .advanced-options-panel {
    max-height: 500px;
    opacity: 1;
    padding: 0 1.5rem 1.5rem;
    border-top: none;
}

.advanced-features-wrapper.expanded .dropdown-btn i {
    transform: rotate(180deg);
}

.range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.range-group label {
    color: var(--primary-red);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.7rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 1rem;
}

.range-group label span:last-child {
    color: #666;
    font-weight: 400;
    font-size: 0.8rem;
    text-transform: none;
}

.range-group input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 50px;
    padding: 10px 20px;
    color: var(--text-color);
    text-align: left !important;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.range-group input:focus {
    border-color: #ff2d55;
    background: #222;
}

.advanced-help {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 1rem;
}

.v2-highlight-red {
    color: var(--primary-red);
    font-weight: 800;
}

.range-group .optional {
    color: #888888;
    font-weight: 400;
    font-size: 0.8rem;
    margin-left: 5px;
}

.light-theme .range-group .optional {
    color: #000000;
    /* Black for light theme as requested */
}

/* Merged into above definition */

.note {
    font-size: 0.85rem;
    color: #999999;
    text-align: center;
    margin-top: 1.5rem;
    line-height: 1.6;
    font-weight: 400;
}

.light-theme .note {
    color: #000000;
    /* Black for light theme as requested */
}

.note .highlight-text {
    color: var(--primary-red);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* =====================================================
   LOADER OVERLAY — full-screen loading modal
   ===================================================== */
.loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    /* Hidden state */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loader-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loader-modal {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px 28px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.loader-overlay.active .loader-modal {
    transform: translateY(0) scale(1);
}

/* SVG Spinner */
.loader-spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 20px;
}

.spinner-svg {
    width: 100%;
    height: 100%;
    animation: rotate360 1.4s linear infinite;
}

.spinner-track {
    stroke: rgba(255, 62, 62, 0.12);
    stroke-linecap: round;
}

.spinner-arc {
    stroke: var(--primary-red);
    stroke-linecap: round;
    stroke-dasharray: 80 120;
    stroke-dashoffset: 0;
    animation: dash 1.4s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1 200;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 89 200;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 89 200;
        stroke-dashoffset: -124;
    }
}

.loader-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
    letter-spacing: 0.01em;
}

.loader-note {
    font-size: 0.82rem;
    color: #888;
    line-height: 1.65;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.light-theme .loader-note {
    color: #555;
}

.loader-note strong {
    color: var(--primary-red);
    font-weight: 700;
}

/* =====================================================
   RESULTS SECTION — smooth reveal transition
   ===================================================== */
.results-section {
    display: none;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 4rem 0 0;
    padding: 0;
}

.results-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Error inline message */
.inline-error {
    width: 100%;
    max-width: 420px;
    margin: 1rem auto 0;
    padding: 12px 20px;
    background: rgba(255, 62, 62, 0.08);
    border: 1px solid rgba(255, 62, 62, 0.3);
    border-radius: 12px;
    color: var(--primary-red);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    display: none;
}

.inline-error.visible {
    display: block;
    animation: fadeSlideIn 0.3s ease forwards;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

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


/* =====================================================
   DASHBOARD SECTION — SCREENSHOT MATCH
   ===================================================== */


.results-container {
    margin-top: 3rem;
    animation: fadeIn 0.5s ease-out;
}

.dashboard-outer {
    position: relative;
    border: 1px solid var(--primary-red);
    border-radius: 12px;
    padding: 1.4rem 0.8rem 1rem;
    background: transparent;
}

.main-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #FF6B4B, #FF3E3E);
    color: white;
    padding: 6px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 62, 62, 0.3);
    white-space: nowrap;
    z-index: 10;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 0.75rem;
}

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

.dash-column {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.dash-card {
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dash-card:hover {
    transform: translateY(-8px);
    border-radius: 28px;
    border-color: var(--primary-red);
    box-shadow: 0 15px 40px rgba(255, 45, 85, 0.25);
    z-index: 10;
}

.light-theme .dash-card {
    background: #ffffff;
    border: 1px solid #000000;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
}

.dashboard-card {
    background-color: #121212;
    /* Dark card background */
    border-radius: 20px;
    padding: 1.5rem;
    height: auto;
    display: flex;
    flex-direction: column;
}

.light-theme .dashboard-card {
    background-color: #f0f0f0;
}

/* --- Left Column: Duration & Speed --- */
.card-icon-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
    text-align: center;
    margin-bottom: 0.5rem;
}

.icon-circle {
    width: 42px;
    height: 42px;
    background: rgba(255, 62, 62, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle i {
    color: var(--primary-red);
    font-size: 1.1rem;
}

.card-header {
    color: #888;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    margin-bottom: 0.4rem;
}

.primary-val {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: white;
    margin: 0;
}

.light-theme .primary-val {
    color: #111;
}

.primary-val.large {
    font-size: 2.25rem;
    text-align: center;
}

.secondary-val {
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

.red-text {
    color: var(--primary-red);
    font-weight: 700;
}

/* Speed List Styling */
.speed-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.speed-row {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
}

.speed-label {
    color: #777;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 90px;
}

.speed-val {
    color: var(--primary-red);
    font-weight: 700;
    font-size: 0.92rem;
}

.speed-note {
    color: #777;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Total Videos Card */
.video-card .primary-val.large {
    font-size: 2.1rem;
    text-align: center;
    margin: 0.4rem 0;
}

.export-label {
    text-align: center;
    color: #444;
    font-weight: 900;
    letter-spacing: 3px;
    margin: 0.5rem 0 0.4rem;
    font-size: 0.7rem;
}

.export-actions {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.pill-btn {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #eee;
    padding: 5px 8px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.72rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.pill-btn:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 62, 62, 0.3);
}

.light-theme .pill-btn {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #000000;
}

/* Export Card */
.export-card {
    text-align: center;
}

.export-grid-new {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.export-pill {
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: white;
    padding: 0.6rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.light-theme .export-pill {
    background-color: #fff;
    color: black;
    border: 1px solid #000000;
}

.export-pill:hover {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: white;
}

/* Engagement Card */
.engagement-card .card-title {
    text-align: center;
    font-size: 1.3rem;
    color: #888;
    margin-bottom: 1.5rem;
}

.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.stats-list span:last-child {
    color: var(--text-color);
    font-weight: 600;
}

/* --- Simulator Card (Bottom Section) --- */
.simulator-card {
    padding: 2rem;
}

.simulator-card .sim-header p {
    text-align: center;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.slider-wrapper {
    margin-bottom: 2.5rem;
    padding: 0 10px;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    background: #1a1a1a;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

.light-theme input[type="range"] {
    background: #ddd;
}

/* Chrome, Safari, Opera, Edge */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary-red);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 62, 62, 0.6);
    border: 2px solid #121212;
    margin-top: -7px;
    /* Centers the thumb on a 10px track */
}

/* Firefox */
input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary-red);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 62, 62, 0.6);
    border: 2px solid #121212;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 10px;
    background: #1a1a1a;
    border-radius: 10px;
}

.light-theme input[type="range"]::-webkit-slider-runnable-track {
    background: #ddd;
}

.slider-ticks {
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    margin-top: 8px;
    color: #555;
    font-size: 0.75rem;
    font-weight: 600;
}

.sim-display .sim-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.sim-label {
    color: #555;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
}

#custom-duration-val {
    color: #FF9F43 !important;
    /* Warm orange */
    font-size: 2.5rem;
    font-weight: 900;
    margin: 5px 0;
    line-height: 1;
}

.sim-detail {
    color: var(--primary-red);
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 5px;
}

.toggle-badge {
    background: #ffffff;
    color: #FF5A5A;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.toggle-badge:hover {
    transform: scale(1.05);
}

.slider-markers span {
    font-size: 0.75rem;
    color: #555;
    font-weight: 600;
}

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

.res-label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.light-theme .res-label {
    color: #000;
    font-weight: 700;
}

.white-text {
    color: white;
}

.light-theme .white-text {
    color: black;
}

.simulator-result h1 {
    font-size: 2.2rem;
    color: var(--primary-red);
    margin-bottom: 0.4rem;
}



.toggle-pill {
    background-color: var(--primary-red);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 700;
    margin-left: 10px;
    font-size: 0.75rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(255, 62, 62, 0.3);
}

.toggle-pill:hover {
    transform: scale(1.08) translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 62, 62, 0.5);
    filter: brightness(1.1);
}

.toggle-pill:active {
    transform: scale(0.95);
}

.light-theme .toggle-pill {
    box-shadow: 0 2px 5px rgba(255, 62, 62, 0.4);
}

.hidden {
    display: none !important;
}

/* Update mobile grid for dashboard - ONE SCREEN OPTIMIZATION */
@media (max-width: 768px) {
    .v2-daily-goal {
        padding: 1.2rem 1rem;
        /* Reduced padding to give more space for text */
    }

    .v2-goal-sentence {
        font-size: 0.85rem;
        /* Significantly reduced to fit in one line */
        gap: 0.25rem;
        justify-content: center;
    }

    .v2-goal-input {
        font-size: 1rem;
        width: 38px;
    }

    .v2-highlight {
        font-size: 1.2rem;
        margin: 0 0.2rem;
    }

    .video-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .video-item {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 1rem 0 !important;
        display: block !important;
    }
}

.dashboard-outer {
    padding: 1.2rem 0.6rem 0.6rem 0.6rem;
    margin-top: 2rem;
}

.main-badge {
    font-size: 0.65rem;
    padding: 4px 10px;
    top: -12px;
}

.dash-card {
    padding: 1rem;
    border-radius: 12px;
}

.card-icon-header {
    margin-bottom: 0.8rem;
    gap: 0.8rem;
}

.icon-circle {
    width: 38px;
    height: 38px;
}

.icon-circle i {
    font-size: 1.1rem;
}

.primary-val.large {
    font-size: 2.1rem;
    /* Much smaller for mobile */
    text-align: left;
}

.primary-val {
    font-size: 1.6rem;
}

.secondary-val {
    font-size: 0.85rem;
}

/* Compact Export Actions */
.export-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.pill-btn {
    padding: 0.6rem 0.4rem;
    font-size: 0.72rem;
    width: 100%;
    text-align: center;
    justify-content: center;
}

.pill-btn i {
    font-size: 0.8rem;
}

/* Compact Simulator */
.sim-header p {
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}

.slider-ticks span {
    font-size: 0.6rem;
}

.sim-label {
    font-size: 0.65rem;
}

.sim-display h2 {
    font-size: 1.4rem;
}

.sim-detail {
    font-size: 0.65rem;
}

.engagement-card .stats-list li {
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
}

.engagement-card .card-title {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.speed-list {
    padding-top: 0.8rem;
    gap: 0.5rem;
}

.speed-row {
    font-size: 0.8rem;
}
}


.custom-result p strong {
    color: #fff;
    /* Values in white */
    font-weight: 700;
}

.light-theme .custom-result p strong {
    color: #000;
}

.duration-days {
    color: #fff;
    /* White by default in dark theme */
    font-size: 0.85em;
    font-weight: 600;
    margin-left: 6px;
}

.light-theme .duration-days {
    color: #000;
}

.highlight-red {
    color: var(--primary-red);
    font-weight: 700;
}

.light-theme .custom-result p {
    font-size: 1.1rem;
    color: var(--primary-red);
}

/* Sort Section & Container */
.sort-container {
    border: 1px solid var(--primary-red);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background-color: var(--secondary-bg);
}

.sort-section {
    margin-bottom: 0;
}

.sort-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.sort-buttons {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.sort-btn {
    padding: 0.6rem 1.2rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    /* Pill shape */
    color: var(--text-color);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.light-theme .sort-btn {
    background-color: #f1f3f5;
    border-color: #dee2e6;
}

.list-controls {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--primary-red);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.light-theme .list-controls {
    background: #ffffff;
    border: 1px solid var(--primary-red);
    box-shadow: 0 4px 15px rgba(255, 62, 62, 0.1);
}

.light-theme .sort-header {
    color: #1a1a1a;
}


.sort-header {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.sort-btn {
    background: #2a2a2a;
    border: 1px solid transparent;
    color: #ff3e3e;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-btn:hover {
    background: #333;
    transform: translateY(-1px);
}

.sort-btn.active {
    background: var(--primary-red);
    color: #fff;
}

.search-bar-wrapper {
    position: relative;
    width: 100%;
}

.search-bar-wrapper i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.dash-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dash-card:hover {
    transform: translateY(-5px);
    border-radius: 20px;
    border-color: var(--primary-red);
    box-shadow: 0 10px 30px rgba(255, 45, 85, 0.2);
}

#video-search {
    width: 100%;
    background: #0f0f0f;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 0.8rem 1rem 0.8rem 3rem;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: border 0.2s;
}

.light-theme #video-search {
    border: 1px solid #000;
}

#video-search:focus {
    border-color: var(--primary-red);
}

.results-metadata {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}


.results-metadata p {
    font-size: 0.9rem;
    color: #888;
}

.light-theme .results-metadata p {
    color: #444;
    font-weight: 500;
}

/* Video Grid Layout (3-Column) */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}


.video-item {
    background-color: rgba(255, 255, 255, 0.02);
    padding: 1.2rem;
    border: 1px solid var(--primary-red);
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, background 0.3s ease;
    animation: fadeIn 0.5s ease forwards;
}

.video-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
}

.light-theme .video-item {
    background-color: #fff;
    border: 1px solid #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}


.v-thumb-container {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.v-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    object-fit: cover;
}

.v-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.v-info {
    width: 100%;
}

.v-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.v-date {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 1.2rem;
    font-weight: 500;
}


.v-stats {
    display: flex;
    gap: 0.8rem;
    font-size: 0.8rem;
    color: #bbb;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.v-stats i {
    color: var(--primary-red);
    margin-right: 5px;
}


.v-stats span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.v-stats i {
    font-size: 0.75rem;
    color: var(--primary-red);
}

/* Responsiveness */
@media (max-width: 992px) {
    .video-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .video-details-grid {
        grid-template-columns: 1fr;
    }

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

    .stat-card {
        padding: 1.2rem;
    }
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 800px;
    margin: 2rem auto 0;
    align-items: center;
}

.btn-gradient {
    width: auto;
    background: linear-gradient(90deg, #ff2d55, #ff6448);
    color: #fff;
    padding: 20px 120px;
    border-radius: 60px;
    font-weight: 900;
    font-size: 1.25rem;
    cursor: pointer;
    text-transform: none;
    box-shadow: 0 4px 15px rgba(255, 45, 85, 0.4);
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 0 auto;
    display: inline-block;
    letter-spacing: 0.5px;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 45, 85, 0.5);
    filter: brightness(1.1);
}

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

.btn-small {
    padding: 10px 20px;
    font-size: 0.88rem;
    width: auto;
    min-width: 280px;
    margin: 0 auto;
}

.btn-reset {
    width: 100%;
    background: transparent;
    color: #fff;
    border: 1.5px solid var(--primary-red);
    border-radius: 50px;
    padding: 12px 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 700;
}

.btn-reset:hover {
    background: rgba(255, 62, 62, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 62, 62, 0.15);
}

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

.btn-share {
    background: transparent;
    border: 1.5px solid var(--primary-red);
    color: var(--primary-red);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    justify-content: center;
}

.btn-share:hover {
    background: var(--primary-red);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 62, 62, 0.3);
}

.light-theme .btn-share {
    border-color: #000;
    color: #000;
}

.light-theme .btn-share:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}


.btn-outline {
    display: none;
}

@media (max-width: 480px) {
    .actions {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Responsive Improvements */
@media (max-width: 768px) {
    main {
        margin: 2rem auto;
        padding: 0 1.5rem;
    }

    .main-header h1 {
        font-size: 2.2rem;
        white-space: normal;
    }

    .main-header h2 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }


    .main-header h1 {
        font-size: 1.8rem;
    }

    .main-header h2 {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .input-group input {
        padding: 14px 100px 14px 24px;
        /* Restored space for paste button */
        font-size: 1rem;
    }

    .btn-gradient {
        width: 100%;
        padding: 1rem;
    }

    .accordion-header {
        padding: 1rem;
    }

    .accordion-content.active {
        padding: 1.5rem 1.5rem 3rem 1.5rem;
        /* Increased bottom padding for curved corners */
    }

    .range-inputs {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}

/* Ensure background glow doesn't cause overflow */
.main-header {
    overflow: visible;
}

/* Pagination Styling */
.pagination-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.page-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.page-btn.active {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: white;
}

.page-numbers-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 1rem;
}

.active-page {
    color: var(--primary-red);
}

.page-separator {
    color: #444;
}

.total-pages-count {
    color: #888;
}

.page-dots {
    color: #666;
    font-weight: 800;
}

/* ==========================================
   MOBILE RESPONSIVE FIXES
   ========================================== */

@media (max-width: 768px) {

    /* Hard-lock the viewport — nothing can escape */
    html,
    body {
        overflow-x: hidden;
    }

    /* Contain elements that might overflow */
    .calculator-container,
    .results-container,
    .speed-table-container,
    .custom-speed-control,
    .search-bar-wrapper {
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* Main content padding - enough to clear fixed navbar */
    main {
        padding: 110px 1rem 2rem 1rem;
        margin-top: 0;
    }

    /* Heading wraps on mobile */
    .main-header h1 {
        font-size: 1.6rem;
        white-space: normal;
        word-break: break-word;
    }

    .main-header h2 {
        font-size: 0.85rem;
    }

    /* REPLACED: Removed conflicting header rules to allow top-level overrides to take effect */

    .hamburger {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        width: 44px;
        height: 44px;
        justify-content: center;
        align-items: center;
        padding: 0;
        cursor: pointer;
        background: none;
        border: none;
        z-index: 1000;
    }

    .hamburger .line {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--text-color);
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        border-radius: 2px;
    }

    .hamburger.active .line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .header-blog-link {
        display: inline-block !important;
        background: var(--primary-red);
        color: white !important;
        padding: 4px 12px !important;
        border-radius: 20px;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
    }
}

/* Hamburger & Mobile Menu Styles */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.hamburger .line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 2px;
}

.header-blog-link {
    display: none;
    /* Hidden by default on desktop, shown if needed */
}

.mobile-drawer {
    display: none;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    width: 90%;
    max-width: 400px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mobile-drawer.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.drawer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
}

.drawer-content a {
    color: var(--text-color) !important;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 12px;
    border-radius: 12px;
    transition: var(--transition);
}

.drawer-content a:hover {
    background: rgba(255, 62, 62, 0.1);
    color: var(--primary-red) !important;
}

@media (max-width: 768px) {
    .nav-items {
        display: none !important;
    }

    .nav-right .nav-items {
        display: none !important;
    }

    .hamburger {
        display: flex !important;
    }

    .mobile-drawer {
        display: block;
    }

    /* Input fields full width with space for paste button */
    .input-group input {
        width: 100%;
        padding-right: 100px !important;
        font-size: 0.9rem;
    }

    .search-bar-wrapper input {
        width: 100%;
        font-size: 0.9rem;
    }

    /* Stats grid: 2 columns on tablet */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* Sort buttons wrap */
    .sort-buttons {
        gap: 0.4rem;
    }

    .sort-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    /* Video grid: 1 column on mobile */
    .video-details-grid {
        grid-template-columns: 1fr !important;
    }

    /* Speed table scrolls within its box */
    .speed-table-container {
        overflow-x: auto;
    }

    /* Main calculator buttons: centered and narrower than inputs */
    /* Main calculator buttons: Compact side-by-side layout */
    /* Main calculator buttons: Centered and broader */
    .actions {
        display: flex;
        justify-content: center;
        width: 100%;
        max-width: 380px;
        /* Broader max-width */
        margin: 1.5rem auto 0;
    }

    .btn-gradient {
        width: auto;
        min-width: 280px;
        max-width: 90%;
        margin: 0 auto;
        padding: 14px 40px !important;
        border-radius: 50px !important;
        font-size: 1rem !important;
        text-align: center;
        display: block;
    }

    .btn-reset {
        width: 54px !important;
        height: 48px !important;
        margin: 0;
        border-radius: 12px !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .main-header h1 {
        font-size: 1.35rem;
    }

    /* Stats: single column on very small phones */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        padding: 0.8rem;
    }

    .stat-card h3 {
        font-size: 1.1rem;
    }

    /* Pagination numbers compact */
    .page-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

/* =====================================================
   DESKTOP V2 DASHBOARD (Premium Card Stack)
   ===================================================== */

/* Display Switcher (V2 is now the primary UI) */
.dashboard-outer {
    display: none !important;
}

.v2-dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 1000px;
    margin: 1rem auto 0;
    text-align: left;
    padding: 0 0.75rem;
    /* Breathable edges for mobile */
}

.v2-card {
    background: #0f0f0f;
    border: 1px solid #1c1c1c;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
    /* Prevent expansion ghosting */
    position: relative;
    z-index: 1;
}

.light-theme .v2-card {
    background: #ffffff;
    border: 1px solid #dddddd;
}

/* Disable hover border on mobile to prevent "sticky" red borders */
@media (min-width: 1025px) {
    .v2-card:hover {
        border-color: var(--primary-red);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    }
}

/* Main Info Card (Top) */
.v2-main-info {
    border: 1px solid var(--primary-red);
    text-align: center;
    padding: 2rem 1.5rem;
}

.v2-playlist-title {
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 0.6rem;
    font-weight: 700;
    line-height: 1.4;
}

.light-theme .v2-playlist-title {
    color: #111;
}

.v2-label {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #666;
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.v2-huge-duration {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-red);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.v2-breakdown {
    font-size: 1.1rem;
    color: #ccc;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.light-theme .v2-breakdown {
    color: #555;
}

.v2-stats-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #1c1c1c;
}

.light-theme .v2-stats-row {
    border-top: 1px solid #eee;
}

.v2-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.v2-stat-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
}

.light-theme .v2-stat-val {
    color: #111;
}

.v2-stat-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 700;
}

.v2-stat-item.border-left {
    padding-left: 2rem;
    border-left: 1px solid #1c1c1c;
}

.light-theme .v2-stat-item.border-left {
    border-left: 1px solid #eee;
}

/* Speed Scroll Section */
.v2-scroll-wrapper {
    background: #0f0f0f;
    border: 1px solid #1c1c1c;
    border-radius: 12px;
    padding: 1rem;
}

.v2-scroll-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.light-theme .v2-scroll-header {
    color: #111;
}

.scroll-hint {
    color: #555;
    font-weight: 600;
}

.v2-speeds-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    /* Allow wrap for grid effect */
    padding-bottom: 0.5rem;
}

.v2-speed-card {
    flex: 1 1 calc(25% - 0.75rem);
    /* Default 4 in a row */
    min-width: 140px;
    background: #161616;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.light-theme .v2-speed-card {
    background: #f9f9f9;
    border-color: #eee;
}

.v2-speed-card.active {
    border-color: var(--primary-red);
    box-shadow: 0 0 15px rgba(255, 62, 62, 0.1);
}

.v2-speed-label {
    font-size: 0.7rem;
    color: #666;
    font-weight: 700;
}

.v2-speed-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0.25rem 0;
}

.light-theme .v2-speed-val {
    color: #111;
}

.v2-speed-days {
    font-size: 0.8rem;
    color: var(--primary-red);
    font-weight: 700;
}

/* V2 Collapsible Export */
.v2-export-collapsible {
    cursor: pointer;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid #1c1c1c;
    margin: 1.2rem auto;
    max-width: 100%;
}

.v2-export-header {
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f0f0f;
    transition: background 0.2s;
}

.v2-export-header:hover {
    background: #161616;
}

.v2-export-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #666;
    font-size: 0.85rem;
    font-weight: 700;
}

.v2-export-preview i {
    transition: transform 0.3s ease;
}

.v2-export-collapsible.active .v2-export-preview i {
    transform: rotate(180deg);
}

.v2-export-panel {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #0a0a0a;
}

.v2-export-collapsible.active .v2-export-panel {
    max-height: 300px;
    padding: 1.5rem;
    border-top: 1px solid #1c1c1c;
}

.v2-export-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.v2-export-btn {
    background: #161616;
    border: 1px solid #333;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.v2-export-btn:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
    transform: translateY(-2px);
}

.light-theme .v2-export-btn {
    background: #fff;
    color: #111;
    border-color: #ddd;
}

/* Simulator Card */
.v2-simulator {
    padding: 1.5rem 2rem;
}

.v2-sim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.v2-sim-header span:first-child {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.light-theme .v2-sim-header span:first-child {
    color: #111;
}

.v2-speed-badge {
    background: #1c1c1c;
    color: var(--primary-red);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    border: 1px solid #333;
}

.v2-slider-container {
    margin-bottom: 2rem;
}

.v2-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #1c1c1c;
    border-radius: 2px;
    outline: none;
}

.v2-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-red);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 62, 62, 0.4);
}

.v2-slider-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #444;
    font-size: 0.7rem;
    font-weight: 700;
}

.v2-sim-result {
    text-align: left;
}

.v2-sim-result h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.light-theme .v2-sim-result h2 {
    color: #111;
}

.v2-at-speed {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

/* Daily Goal Card */
.v2-daily-goal {
    padding: 1.5rem 2rem;
    text-align: left;
}

.v2-goal-result-inline {
    margin-left: 0.2rem;
    font-weight: 700;
}

.v2-goal-result-inline .v2-highlight {
    font-size: 1.4rem;
    margin: 0 0.1rem;
}

.v2-goal-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.v2-goal-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.v2-goal-hint {
    font-size: 0.85rem;
    color: var(--primary-red);
    font-weight: 600;
    opacity: 0.9;
    font-style: italic;
    margin-top: 0.2rem;
}

.v2-goal-input {
    background: #1a1a1a;
    border: 1px solid #333;
    border-bottom: 2px solid var(--primary-red);
    color: var(--primary-red);
    font-size: 1.2rem;
    font-weight: 800;
    width: 60px;
    text-align: center;
    padding: 4px 8px;
    border-radius: 6px 6px 0 0;
    outline: none;
    transition: all 0.2s;
}

.v2-goal-input:focus {
    background: #222;
    border-color: var(--primary-red);
}

.v2-goal-row>span {
    color: #888;
}

.v2-goal-select {
    background: #1a1a1a;
    border: 1.5px solid var(--primary-red);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.v2-goal-select:focus {
    border-color: var(--primary-red);
}

.v2-goal-footer {
    margin-top: 2rem;
    border-top: 1px solid #1c1c1c;
    padding-top: 1.5rem;
}

.v2-goal-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.v2-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.v2-stat-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.v2-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.v2-stat-divider {
    width: 1px;
    height: 30px;
    background: #1c1c1c;
}

.v2-goal-caption {
    font-size: 0.8rem;
    color: #555;
    font-style: italic;
    line-height: 1.4;
    text-align: center;
    margin-top: 0.5rem;
}

.light-theme .v2-goal-summary-text,
.light-theme .v2-goal-row,
.light-theme .v2-stat-value {
    color: #111;
}

.light-theme .v2-goal-footer {
    border-color: #eee;
}

.light-theme .v2-stat-divider {
    background: #eee;
}

.light-theme .v2-goal-row>span,
.light-theme .v2-stat-label {
    color: #555;
}

.light-theme .v2-goal-select {
    background: #fff;
    border-color: #ccc;
    color: #111;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.v2-chart-container {
    width: 100%;
    margin-top: 1.5rem;
    position: relative;
    height: 300px;
    /* Fixed height for consistency */
}

@media (max-width: 768px) {
    .v2-daily-goal {
        padding: 1.5rem 1.25rem;
    }

    .v2-goal-summary-text {
        font-size: 1.1rem;
    }

    .v2-goal-summary-text .v2-highlight {
        font-size: 1.4rem;
    }

    .v2-goal-row {
        display: block !important;
        font-size: 1rem;
        line-height: 1.8;
        padding: 0;
    }

    .v2-goal-row>span {
        display: inline-block;
        vertical-align: middle;
        margin: 2px 0;
        color: #888;
    }

    .v2-goal-result-inline {
        display: block !important;
        margin-top: 1rem;
        width: 100%;
        color: #fff !important;
    }

    .v2-goal-result-inline .v2-highlight {
        font-size: 1.4rem;
        display: inline;
    }

    .v2-goal-input {
        font-size: 1.1rem;
        width: 45px;
        border-bottom-width: 2px;
    }

    .v2-goal-select {
        font-size: 0.9rem;
        padding: 5px 10px;
        padding-right: 28px;
    }

    .v2-speeds-row {
        gap: 0.5rem;
    }

    .v2-speed-card {
        flex: 1 1 calc(50% - 0.5rem);
        /* 2x2 on mobile */
        min-width: unset;
        padding: 1rem 0.5rem;
    }

    .v2-speed-val {
        font-size: 1.1rem;
    }
}

.v2-highlight {
    color: #FFC107;
    /* Amber for result highlight */
    font-size: 2rem;
    font-weight: 900;
    margin: 0 0.4rem;
}

@media (max-width: 768px) {
    .v2-highlight {
        font-size: 1.5rem;
    }
}

/* Engagement Card */
.v2-engagement {
    cursor: pointer;
}

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

.v2-engagement-header span:first-child {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.light-theme .v2-engagement-header span:first-child {
    color: #111;
}

.v2-engagement-sub {
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
}

.v2-engagement-details {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 0;
    opacity: 0;
}

.v2-engagement.active .v2-engagement-details {
    max-height: 200px;
    margin-top: 1.5rem;
    opacity: 1;
}

.v2-toggle-icon {
    transition: transform 0.3s ease;
}

.v2-engagement.active .v2-toggle-icon {
    transform: rotate(180deg);
}

.v2-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #1c1c1c;
    font-size: 0.9rem;
    color: #888;
}

.light-theme .v2-detail-item {
    border-bottom: 1px solid #eee;
}

.v2-detail-item span:last-child {
    font-weight: 800;
    color: #fff;
}

.light-theme .v2-detail-item span:last-child {
    color: #111;
}

/* Mobile Adjustments for V2 Dashboard */
@media (max-width: 600px) {
    .v2-huge-duration {
        font-size: 2.8rem;
    }

    .v2-breakdown {
        font-size: 0.95rem;
    }

    .v2-stats-row {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .v2-stat-item.border-left {
        padding-left: 0;
        border-left: none;
    }

    .v2-stat-item {
        flex: 1 1 30%;
        min-width: 80px;
    }

    .v2-goal-row {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        font-size: 1.15rem;
        gap: 0.6rem;
        flex-wrap: nowrap;
    }

    .v2-goal-input {
        font-size: 1.5rem;
        width: 55px;
    }

    .v2-goal-result {
        font-size: 1.25rem;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.4rem;
    }

    .v2-highlight {
        font-size: 1.6rem;
    }

    .v2-sim-result h2 {
        font-size: 2rem;
    }

    .v2-card {
        padding: 1.25rem;
    }
}

@media (max-width: 400px) {
    .v2-huge-duration {
        font-size: 2.2rem;
    }

    .v2-stats-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .v2-stat-item:last-child {
        grid-column: span 2;
    }

    .v2-playlist-title {
        font-size: 0.8rem;
    }
}

/* =====================================================
   SEO CONTENT SECTION STYLES
   ===================================================== */
.seo-content-section {
    margin-top: 60px;
    padding: 60px 0;
    text-align: left;
    border-top: 1px solid var(--border-color);
}

.seo-container {
    max-width: 850px;
    margin: 0 auto;
}

.seo-main-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.seo-lead {
    font-size: 1.15rem;
    color: #888;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.seo-divider {
    border: none;
    border-top: 2px solid var(--primary-red);
    width: 60px;
    margin: 2rem 0;
    opacity: 0.3;
}

.seo-block {
    margin-bottom: 3rem;
}

.seo-block h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.25rem;
}

.seo-block p {
    font-size: 1rem;
    color: #999;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.seo-block strong {
    color: var(--primary-red);
}

.seo-steps {
    padding-left: 1.2rem;
    color: #999;
}

.seo-steps li {
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.seo-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 40px 0;
}

.seo-feature-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
    transition: var(--transition);
}

.seo-feature-card:hover {
    border-color: rgba(255, 62, 62, 0.4);
    transform: translateY(-5px);
}

.seo-feature-card i {
    font-size: 2.2rem;
    color: var(--primary-red);
    margin-bottom: 1.5rem;
    display: inline-block;
    filter: drop-shadow(0 8px 12px rgba(255, 45, 85, 0.35));
    animation: floatingIcon 3s ease-in-out infinite;
}

@keyframes floatingIcon {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Stagger the animations slightly for a more organic feel */
.seo-feature-card:nth-child(2) i {
    animation-delay: 0.2s;
}

.seo-feature-card:nth-child(3) i {
    animation-delay: 0.4s;
}

.seo-feature-card:nth-child(4) i {
    animation-delay: 0.6s;
}

.seo-feature-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.seo-feature-card p {
    font-size: 0.9rem;
    color: #777;
    line-height: 1.5;
}

.seo-use-cases {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.use-case {
    background: rgba(255, 62, 62, 0.05);
    border-left: 3px solid var(--primary-red);
    padding: 1.25rem;
    border-radius: 0 12px 12px 0;
    font-size: 1rem;
    color: #999;
}

.use-case strong {
    display: block;
    margin-bottom: 0.25rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.faq-item h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.faq-item p {
    font-size: 1rem;
    color: #888;
    margin-bottom: 0;
}

.seo-footer-text {
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 4rem;
}

/* Light Theme Adjustments */
.light-theme .seo-main-title,
.light-theme .seo-block h3,
.light-theme .seo-feature-card h4,
.light-theme .seo-item h4 {
    color: #111;
}

.light-theme .seo-lead,
.light-theme .seo-block p,
.light-theme .faq-item p,
.light-theme .use-case {
    color: #555;
}

.light-theme .seo-feature-card {
    background: #fdfdfd;
}

@media (max-width: 768px) {
    .seo-main-title {
        font-size: 1.8rem;
    }

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

    .seo-divider {
        margin: 1.5rem auto;
    }
}

/* =====================================================
   DESKTOP OPTIMIZATION (min-width: 1024px)
   ===================================================== */

/* --- V2 Dashboard Dropdowns & Collapsibles --- */

/* 1. Export Collapsible */
.v2-export-collapsible {
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.v2-export-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #888;
}

.v2-export-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.v2-export-collapsible.active .v2-export-panel {
    max-height: 500px;
    opacity: 1;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.v2-export-collapsible.active .v2-export-header i {
    transform: rotate(180deg);
}

.v2-export-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.v2-export-btn {
    background: #1a1a1a;
    border: 1px solid #333;
    color: white;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.v2-export-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
    background: rgba(255, 62, 62, 0.05);
}

/* 2. Engagement Dropdown */
.v2-engagement {
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.v2-engagement-sub {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.v2-toggle-icon {
    transition: transform 0.3s ease;
    color: #555;
    font-size: 0.8rem;
}

.v2-engagement.active .v2-toggle-icon {
    transform: rotate(180deg);
    color: var(--primary-red);
}

.v2-engagement-details {
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.v2-engagement.active .v2-engagement-details {
    max-height: 500px;
    opacity: 1;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.v2-detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #888;
}

.v2-detail-item span:last-child {
    color: white;
    font-weight: 700;
}

.light-theme .v2-detail-item span:last-child {
    color: #111;
}

.light-theme .v2-export-btn {
    background: #f9f9f9;
    color: #333;
    border-color: #ddd;
}

@media (min-width: 1024px) {
    .v2-dashboard-container {
        max-width: 1100px;
        margin: 0 auto;
        padding: 0 24px;
        gap: 12px;
    }

    .v2-card {
        padding: 10px 16px;
        border-radius: 8px;
        margin-bottom: 0;
    }

    /* 1. COMPACT HEADER (Horizontal Grid - Refined) */
    .v2-main-info {
        padding: 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-height: none;
        gap: 8px;
    }

    /* No longer needed in vertical centered layout */
    .v2-duration-group {
        display: contents;
    }

    .v2-playlist-title {
        display: block;
        font-size: 0.95rem;
        font-weight: 700;
        margin-bottom: 2px;
        color: #fff;
    }

    .v2-label {
        display: block;
        font-size: 0.65rem;
        color: #666;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        margin-bottom: 5px;
    }

    .v2-huge-duration {
        font-size: 3.5rem;
        font-weight: 900;
        margin-bottom: 0;
        line-height: 1.1;
        color: var(--primary-red);
    }

    .v2-breakdown {
        font-size: 1rem;
        margin-bottom: 12px;
        color: #ccc;
        font-weight: 600;
        white-space: normal;
    }

    .v2-stats-divider {
        width: 100%;
        height: 1px;
        background: rgba(255, 255, 255, 0.05); /* Very subtle line */
        margin: 10px 0 15px;
    }

    .v2-main-info .v2-stats-row {
        display: flex;
        justify-content: center;
        width: 100%;
        border-top: none;
        padding-top: 0;
        gap: 3.5rem; /* Larger gap for centered look */
    }

    .v2-stat-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .v2-stat-val {
        font-size: 1.25rem;
        font-weight: 800;
    }

    .v2-stat-label {
        font-size: 0.7rem;
        color: #666;
        text-transform: uppercase;
    }

    .v2-stat-item.border-left {
        padding-left: 0;
        border-left: none;
        position: relative;
    }

    /* Vertical Separators */
    .v2-stat-item.border-left::before {
        content: '';
        position: absolute;
        left: -1.75rem;
        top: 20%;
        height: 60%;
        width: 1px;
        background: rgba(255, 255, 255, 0.1);
    }

    /* 2. MERGED TOP ROW (Speeds, Export, Slider) */
    .v2-dashboard-top-row {
        display: grid;
        grid-template-columns: 1.4fr 1.4fr 1fr; /* Export same size as Standard speeds */
        gap: 12px;
        align-items: stretch;
    }

    .v2-scroll-wrapper {
        padding: 12px 16px !important;
        margin: 0 !important;
        background: #0f0f0f;
        border: 1px solid #1c1c1c;
        border-radius: 8px;
        height: 100%;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    .v2-speeds-row {
        gap: 8px;
    }

    .v2-speed-card {
        padding: 6px 4px;
        min-width: unset;
        flex: 1;
        border-radius: 6px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .v2-speed-label {
        font-size: 0.65rem; /* Smaller label */
    }

    .v2-speed-val {
        font-size: 0.85rem; /* Reduced to fit on one line */
        margin: 2px 0;
        white-space: nowrap;
    }

    .v2-speed-days {
        font-size: 0.65rem; /* Smaller days */
    }

    /* Export compact - Permanently Visible on Desktop */
    .v2-export-collapsible {
        cursor: default !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 12px 16px !important;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    .v2-export-header {
        background: transparent !important;
        padding: 0 0 8px 0 !important;
        pointer-events: none; /* Disable click in this view */
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .v2-export-preview {
        display: none !important;
    }

    .v2-export-panel {
        max-height: none !important;
        opacity: 1 !important;
        padding: 0 !important;
        overflow: visible !important;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .v2-export-grid {
        gap: 8px;
        grid-template-columns: repeat(2, 1fr);
    }

    .v2-export-btn {
        padding: 10px 14px;
        font-size: 0.75rem;
    }

    /* Simulator compact */
    .v2-simulator {
        padding: 12px 16px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        height: 100%;
        justify-content: center;
        box-sizing: border-box;
        margin: 0 !important;
    }

    .v2-sim-header {
        margin-bottom: 8px;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .v2-slider-container {
        margin-bottom: 12px;
        width: 100%;
    }

    .v2-slider-ticks {
        display: flex;
        justify-content: space-between;
        width: 100%;
        font-size: 0.65rem;
        color: #555;
        margin-top: 4px;
    }

    .v2-sim-result h2 {
        font-size: 1.6rem;
    }

    /* 3. DAILY GOAL / GRAPH */
    .v2-daily-goal {
        padding: 12px 20px;
    }

    .v2-goal-controls {
        margin-bottom: 15px;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .v2-goal-row {
        font-size: 0.95rem;
        gap: 0.5rem;
    }

    .v2-goal-input {
        width: 70px;
        font-size: 1rem;
        padding: 4px 8px;
        text-align: center;
        background: #1a1a1a;
        border: 1.5px solid var(--primary-red);
        color: var(--primary-red);
        border-radius: 4px;
        font-weight: 700;
    }

    .v2-goal-select {
        font-size: 0.9rem;
        padding: 4px 10px;
        padding-right: 30px;
        background: #1a1a1a;
        color: white;
        border: 1.5px solid var(--primary-red);
        border-radius: 4px;
        font-weight: 600;
    }

    .light-theme .v2-goal-input,
    .light-theme .v2-goal-select {
        background: #fff;
        border-color: #ddd;
    }

    .v2-highlight {
        font-size: 1.35rem;
        margin: 0 0.2rem;
    }

    .v2-chart-container {
        height: 220px !important;
        margin-top: 5px;
    }

    .v2-goal-footer {
        margin-top: 10px;
        padding-top: 8px;
    }

    .v2-goal-stats {
        margin-bottom: 5px;
    }

    .v2-stat-value {
        font-size: 0.95rem;
    }

    /* 4. ENGAGEMENT */
    .v2-engagement {
        padding: 8px 15px;
    }

    .v2-engagement-header span:first-child {
        font-size: 0.85rem;
    }

    /* Global Typography Density */
    h1, h2, h3 {
        letter-spacing: -0.2px;
    }

    .v2-scroll-header {
        margin-bottom: 8px !important;
        padding: 0 !important;
    }

    .v2-scroll-header span {
        font-size: 0.85rem !important;
        font-weight: 800 !important;
    }

    .v2-export-label {
        font-size: 0.85rem !important;
        font-weight: 800 !important;
    }

    .v2-sim-header span:first-child {
        font-size: 0.85rem !important;
        font-weight: 800 !important;
    }

    .v2-at-speed {
        font-size: 0.8rem;
    }

    .v2-speed-hint {
        margin-top: 12px;
        font-size: 0.75rem;
        color: #888;
        font-weight: 500;
        text-align: center;
        letter-spacing: 0.2px;
    }

    .v2-speed-hint strong {
        color: var(--primary-red);
        font-weight: 700;
    }
}
/* =====================================================
   ADDITIONAL UI REFINEMENTS (Reset Button & Actions)
   ===================================================== */
.actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1.5px solid #222;
    color: #888;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 48px;
}

.share-btn:hover {
    border-color: #444;
    color: #ff3e3e;
    background: rgba(255, 62, 62, 0.05);
}

.share-btn i {
    font-size: 0.9rem;
}

.light-theme .share-btn {
    border-color: #000;
    color: #000;
    background: #fff;
}

.light-theme .share-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.reset-btn {
    background: transparent;
    border: 1.5px solid #222;
    color: #888;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-btn:hover {
    border-color: #444;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.light-theme .reset-btn {
    border-color: #000;
    color: #000;
    background: #fff;
}

.light-theme .reset-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}
