@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
        @import url('../fapro/css/all.css');
        /* @import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.3.0/css/all.min.css"); */

        /* =========================================
           1. VARIABLES & GLOBALS
        ========================================= */
        :root {
            --background-color: #15100c;
            --foreground-color: #EFE8E1;
            --accent-color: #f1cd96;
            --nav-background-color: #201812;
            --nav-hover-color: #33271c;
            --border-color: #33271c;

            /* Shared timing so every transition in the file feels consistent */
            --ease: cubic-bezier(0.4, 0, 0.2, 1);
            --transition-fast: 0.18s var(--ease);
            --transition-medium: 0.28s var(--ease);
            --transition-slow: 0.4s var(--ease);
        }

        *, *::before, *::after {
            box-sizing: border-box;
        }

        html {
            /* Lets rem-based sizing below scale gently on very small/large screens */
            font-size: 100%;
        }

        body {
            margin-top: 80px;
            padding: 20px 10px;
            background-color: var(--background-color);
            color: var(--foreground-color);
            font-family: "Inter", sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            min-height: 100vh;
        }

        @media (max-width: 768px) {
            body {
                margin-top: 96px; /* mobile nav can grow taller once open; avoid content jump */
            }
        }

        img, svg {
            max-width: 100%;
            height: auto;
        }

        /* =========================================
           2. NAVIGATION (BASE & MOBILE)
        ========================================= */
        .fixed-nav {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            justify-content: center;
            align-items: center;
            width: 85%;
            max-width: 1400px;
            z-index: 99999;
            height: 60px; /* Matches navitem height so it doesn't overflow */
            will-change: transform;
            transition: height var(--transition-medium);
        }

        .navitem {
            background-color: var(--nav-background-color);
            border-radius: 30px;
            display: flex;
            align-items: center;
            padding: 12px 24px;
            height: 60px;
            min-width: 0; /* allow flex children to shrink instead of overflowing */
        }

        .navitem.main-nav {
            flex: 1 1 auto; /* yields space to account-nav instead of forcing a fixed 75% */
            justify-content: space-between;
            min-width: 0;
        }

        .navitem.account-nav {
            flex: 0 1 auto;
            min-width: max-content; /* grows to fit a long username instead of clipping it */
            padding-left: 20px;
            padding-right: 20px;
            justify-content: center;
            cursor: pointer;
            transition: background-color var(--transition-fast);
            white-space: nowrap;
        }

        .navitem.account-nav:hover {
            background-color: var(--nav-hover-color);
        }

        .nav-top-mobile, .logo-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .logo-container-mobile {
            display: none;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .logo-container img {
            margin-right: 15px;
            flex-shrink: 0;
        }

        .logo-container h2 {
            margin: 0;
            font-size: clamp(1rem, 1.5vw, 1.2rem);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Ensure the outer container spans the full width and handles items correctly */
        .nav-links-container {
            display: flex;
            justify-content: space-between; /* Pushes main-nav left and account-nav right */
            align-items: center;
            gap: 20px;
            width: 100%;
            box-sizing: border-box;
        }

        /* Make sure your main-nav items don't have unintended left margins */
        .navitem.main-nav .navitem.account-nav{
            display: flex;
            align-items: center;
            gap: 20px;
            margin-left: 0; /* Clear any accidental offset */
            padding-left: 0;
        }

        .header-items {
            display: flex;
            gap: 15px;
            align-items: center;
            min-width: 0;
        }

        .header-items span,
        .header-items a {
            padding: 8px 12px;
            font-weight: bold;
            cursor: pointer;
            transition: color var(--transition-fast), background-color var(--transition-fast);
            display: inline-flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap; /* never let a nav label wrap onto two lines */
            border-radius: 12px;
        }

        .header-items span:hover,
        .header-items a:hover {
            color: var(--accent-color);
        }

        .header-items span:last-child,
        .header-items a:last-child {
            margin-right: 0;
        }

        .mobile-menu-btn {
            display: none;
            background: none;
            align-items: center;
            justify-content: center;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: inherit;
            flex-shrink: 0;
            transition: color var(--transition-fast), transform var(--transition-medium);
        }

        .mobile-menu-btn:hover {
            background: none;
            border: none;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            cursor: pointer;
            color: inherit;
            flex-shrink: 0;
            transition: color var(--transition-fast), transform var(--transition-medium);
        }

        .mobile-menu-btn.active {
            color: var(--accent-color);
            transform: rotate(90deg);
        }

        .logout-text {
            display: none !important;
        }

        /* --- Mobile Nav Styles --- */
        @media (max-width: 1060px) {
            .logout-text {
                display: block !important; 
            }

            .fixed-nav {
                flex-direction: column;
                align-items: stretch;
                height: auto; /* Fixes height constraint when menu opens */
                width: 80%;
                background: transparent; /* Removes the ugly white box issue completely */
                padding: 0;
            }

            .logo-container {
                display: none;
                align-items: center;
                gap: 10px;
                min-width: 0;
            }
            .logo-container-mobile {
                display: flex;
                align-items: center;
                gap: 10px;
                min-width: 0;
            }

            .nav-top-mobile {
                justify-content: space-between;
                align-items: center;
                width: 100%;
                background-color: var(--nav-background-color); /* Adds the dark pill background specifically to the top row */
                padding: 12px 24px;
                border-radius: 30px;
                height: 60px;
                flex-shrink: 0;
            }

            .mobile-menu-btn {
                width: 50px;
                justify-content: center;
                align-items: center;
                display: flex;
                background-color: transparent;
            }

            .nav-links-container {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                margin-left: 0;
                width: 100%;
                gap: 15px;
                max-height: 0;
                opacity: 0;
                overflow: hidden;
                padding: 0 4px;
                transform: translateY(-8px);
                transition: max-height var(--transition-slow),
                            opacity var(--transition-medium),
                            transform var(--transition-medium),
                            padding var(--transition-medium);
                pointer-events: none;
            }

            .nav-links-container.active {
                max-height: 600px; /* generous cap so long menus still fit */
                opacity: 1;
                transform: translateY(0);
                padding: 4px;
                pointer-events: auto;
            }

            .navitem {
                width: 100%;
                justify-content: center; /* Centering fix for inner text */
                flex-direction: column;
                height: auto; /* Allows menu to stretch downwards naturally */
                padding: 15px;
            }

            .navitem.main-nav, .navitem.account-nav {
                flex: none; /* Resets the 75%/25% split from desktop */
                width: 100%;
            }

            .header-items {
                flex-direction: column;
                width: 100%;
                align-items: center; /* Centering fix for links */
                gap: 15px;
            }

            .account-nav {
                flex-direction: column !important;
                align-items: center !important;
                justify-content: center !important;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            * {
                transition-duration: 0.01ms !important;
                animation-duration: 0.01ms !important;
            }
        }

        /* =========================================
           3. MODALS
        ========================================= */
        .modal-container {
            display: none;
            border-radius: 30px;
            align-items: center;
            justify-content: center;
            position: fixed;
            top: 0;
            left: 0;
            height: 100vh;
            width: 100vw;
            padding: 20px;
        }

        .modal-container.active {
            display: flex;
        }

        .modal {
            background-color: var(--nav-background-color);
            border-radius: 30px;
            padding: 30px 50px;
            width: 600px;
            max-width: 100%;
            text-align: center;
        }

        .modal p {
            background-color: var(--nav-background-color);
        }

        .modal h1 {
            margin: 0;
            background-color: var(--nav-background-color);
            font-size: clamp(1.4rem, 3vw, 2rem);
        }

        /* =========================================
           4. EXPLORE CARDS
        ========================================= */
        .explore-card {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
            width: 100%;
            max-width: 300px;
            margin: 20px;
            padding: 20px;
            border-radius: 30px;
            background-color: var(--nav-background-color);
            transition: transform var(--transition-medium), background-color var(--transition-medium);
        }

        .explore-card:hover {
            transform: translateY(-4px);
        }

        .explore-card-2 {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
            width: 100%;
            max-width: 300px;
            margin: 20px;
            padding: 20px;
            border-radius: 30px;
            background-color: var(--background-color);
            transition: transform var(--transition-medium);
        }

        .explore-card h3 {
            margin: 0;
            font-size: clamp(1rem, 1.4vw, 1.15rem);
        }

        .explore-card-preview {
            width: 100%;
            height: 200px;
            margin: 0;
            border-radius: 10px;
            object-fit: cover;
        }

        .explore-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 5px 10px;
            border-radius: 10px;
            background-color: darkgreen;
            color: white;
            font-weight: 600;
            white-space: nowrap;
        }

        .explore-author-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px;
            border-radius: 10px;
            min-width: 0;
        }

        .centered-author-row {
            justify-content: center;
        }

        .level-meta-row {
            display: flex;
            justify-content: center;
            width: 100%;
            padding: 0 10px;
            box-sizing: border-box;
        }

        .level-meta-column {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            width: 100%;
            text-align: center;
        }

        .explore-author-row p {
            margin: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .explore-author-avatar {
            width: 30px;
            height: 30px;
            margin: 0;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0;
        }

        /* =========================================
           5. GLOBAL TYPOGRAPHY & ELEMENTS
        ========================================= */
        a {
            text-decoration: none;
            color: inherit;
        }

        h1, h2, h3, h4, p, label, li {
            color: var(--foreground-color);
        }

        .description-text {
            text-indent: 1.5em;
        }

        button, .button,
        input, select, textarea {
            font: inherit;
        }

        canvas {
            margin: 3px;
            touch-action: none;
            border-radius: 30px;
            border: 3px solid white;
            max-width: 100%;
        }

        /* =========================================
           6. LAYOUT & CONTAINERS
        ========================================= */
        .central {
            flex-direction: row;
            display: flex;
            flex-wrap: wrap;
        }

        /* =========================================
           7. LEADERBOARD
        ========================================= */
        .leaderboard-container {
            width: 100%;
            max-width: 800px;
            margin: 20px auto;
            border-radius: 30px;
            overflow: hidden;
            overflow-x: auto; /* keeps table usable instead of squashing on small screens */
            -webkit-overflow-scrolling: touch;
        }

        .leaderboard-table {
            width: 100%;
            min-width: 480px; /* preserves column layout; container scrolls instead of crushing it */
            border-collapse: collapse;
            text-align: left;
        }

        .leaderboard-table th {
            background-color: var(--nav-background-color);
            color: var(--accent-color);
            font-weight: 700;
            padding: 20px 24px;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            font-size: clamp(0.75rem, 1vw, 0.85rem);
            border-bottom: 2px solid #33271c;
            white-space: nowrap;
        }

        .leaderboard-table td {
            padding: 16px 24px;
            font-weight: 500;
            border-bottom: 1px solid rgba(239, 232, 225, 0.05);
            transition: background-color var(--transition-fast), color var(--transition-fast);
        }

        .leaderboard-table tbody tr:last-child td {
            border-bottom: none;
        }

        .leaderboard-table tbody tr:hover td {
            background-color: rgba(241, 205, 150, 0.05);
            color: var(--accent-color);
            cursor: default;
        }

        .rank-1 td {
            color: var(--accent-color);
            font-weight: 700;
        }
        .rank-1 td:first-child::before {
            font-weight: 900;
            margin-right: 12px;
            color: var(--accent-color);
        }

        .rank-2 td:first-child::before {
            font-weight: 900;
            margin-right: 12px;
            color: var(--foreground-color);
            opacity: 0.8;
        }

        .rank-3 td:first-child::before {
            font-weight: 900;
            margin-right: 12px;
            color: #cd7f32;
        }

        /* =========================================
           8. LAYOUT MEDIA QUERIES & TOOLBOX
        ========================================= */
        .toolbox {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            gap: 20px;
            width: 80%;
            justify-content: center;
            align-items: center;
        }

        @media (max-width: 980px) {
            .central {
                flex-direction: column;
                display: flex;
            }

            .toolbox {
                display: flex;
                flex-direction: column;
                gap: 20px;
                width: 90%;
                justify-content: center;
                align-items: center;
            }
        }

        /* =========================================
           9. STATIC HEADER (NON-APP PAGES)
        ========================================= */
        header {
            background-color: var(--nav-background-color);
            border-radius: 30px;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            padding: 12px 24px;
            width: 100%;
        }

        header .logo-container img {
            margin-left: 10px;
            margin-right: 15px;
        }

        header .header-items a {
            margin-right: 15px;
            color: inherit;
            text-decoration: none;
            transition: color var(--transition-fast);
            white-space: nowrap;
        }

        header .header-items a:hover {
            color: #f1cd96;
        }

        header .header-items a i {
            margin-right: 5px;
        }

        /* =========================================
           10. AUTH & SHARED FORMS
        ========================================= */
        body.signup-page,
        body.login-page {
            font-family: "Inter", sans-serif;
            background-color: var(--background-color);
            color: var(--foreground-color);
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            padding: 20px;
        }

        /* Shared card/form styling matching nav/leaderboard style */
        form, .container, .panel, .card {
            background-color: var(--nav-background-color);
            padding: 24px;
            border-radius: 30px;
            width: min(90vw, 420px); /* was 50vh — that tied width to viewport height,
                                        which shrank the form on short screens */
        }

        /* Full-width inputs matching the dark theme and rounded style */
        input[type=text], input[type=password], input[type=number], input[type=email], textarea, select {
            width: 100%;
            padding: 10px 16px;
            margin: 6px 0;
            display: inline-block;
            background-color: var(--background-color);
            color: var(--foreground-color);
            border: none;
            box-sizing: border-box;
            border-radius: 15px;
            transition: all var(--transition-fast);
        }

        .password-field {
            position: relative;
            display: flex;
            align-items: center;
        }

        .confirm-password {
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            transform: translateY(-8px);
            transition: max-height var(--transition-medium), opacity var(--transition-medium), transform var(--transition-medium);
            pointer-events: none;
        }

        .confirm-password.is-visible {
            max-height: 60px;
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .icon-toggle {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: transparent;
            border: none;
            color: var(--foreground-color);
            cursor: pointer;
            padding: 0;
            margin: 0;
            width: auto;
            transition: color var(--transition-fast);
        }

        .icon-toggle:hover {
            color: var(--accent-color);
        }

        input:focus[type="text"], input:focus[type=number], input:focus[type="password"], input:focus[type="email"],
        input:hover[type="text"], input:hover[type=number], input:hover[type="password"], input:hover[type="email"] {
            background-color: var(--background-color);
            border-color: var(--accent-color);
            outline: none;
            box-shadow: 0 0 8px rgba(241, 205, 150, 0.2);
        }

        button, .button {
            background-color: var(--accent-color);
            color: var(--background-color);
            padding: 12px 18px;
            margin: 10px 0 4px 0;
            border: none;
            cursor: pointer;
            width: 100%;
            font-weight: 700;
            letter-spacing: 0.5px;
            border-radius: 15px;
            transition: background-color var(--transition-fast), transform var(--transition-fast);
        }

        button:active, .button:active {
            transform: scale(0.98);
        }

        /* =========================================
           11. TERMS FORM
        ========================================= */
        .terms-form {
            max-width: 760px;
            width: min(92vw, 760px);
            margin-top: 100px;
            text-align: left;
            padding: clamp(20px, 4vw, 32px) clamp(20px, 4vw, 36px);
        }

        .terms-form .terms-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            border-radius: 999px;
            background-color: rgba(241, 205, 150, 0.12);
            color: var(--accent-color);
            font-size: 0.86rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            margin-bottom: 18px;
        }

        .terms-form h1 {
            font-size: clamp(1.5rem, 4vw, 2rem);
            font-weight: 800;
            margin: 0 0 12px;
            color: var(--accent-color);
            text-align: center;
        }

        .terms-form .terms-intro {
            line-height: 1.8;
            margin: 0 0 16px;
            font-size: 1rem;
        }

        .terms-form .terms-section {
            padding-top: 16px;
            margin-top: 18px;
            border-top: 1px solid rgba(239, 232, 225, 0.12);
        }

        .terms-form h2 {
            font-size: clamp(0.95rem, 2vw, 1.05rem);
            margin: 0 0 8px;
            color: var(--accent-color);
        }

        .terms-form p {
            line-height: 1.8;
            margin: 0 0 10px;
            font-size: 1rem;
        }

        .terms-form ul {
            padding-left: 20px;
            margin: 0;
            display: grid;
            gap: 8px;
        }

        .terms-form li {
            line-height: 1.7;
        }

        .terms-form .terms-actions {
            margin-top: 24px;
            text-align: center;
        }

        .terms-form .auth-link {
            display: inline-block;
            margin-top: 0;
            font-weight: 700;
        }

        .terms-checkbox {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 6px 0 8px;
            font-size: 0.95rem;
        }

        .terms-checkbox input {
            width: auto;
            margin: 0;
        }

        /* =========================================
           12. BUTTONS & CONTAINERS
        ========================================= */
        button:hover, .button:hover {
            background-color: #ffffff;
        }

        .container {
            padding: 30px;
            max-width: 400px;
            width: 100%;
        }

        /* =========================================
           13. AUTH LINKS
        ========================================= */
        body.signup-page a,
        body.login-page a {
            color: inherit;
            text-decoration: none;
            font-size: inherit;
            font-family: inherit;
            transition: color var(--transition-fast);
        }

        body.signup-page a:hover,
        body.login-page a:hover {
            color: var(--accent-color);
            text-decoration: underline;
        }

        .auth-link {
            margin-top: 10px;
            font-size: clamp(1.1rem, 2.5vw, 1.5rem); /* was a flat 24px — scales down on small phones */
        }

        /* =========================================
           14. HERO SECTION
        ========================================= */
        .home-hero {
            display: grid;
            grid-template-columns: 1.1fr 0.9fr;
            align-items: center;
            gap: 40px;
            width: min(1200px, 92vw);
            margin-top: 90px;
        }

        .hero-copy {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            min-width: 0;
        }

        .eyebrow {
            font-weight: 500;
            text-transform: uppercase;
            font-size: clamp(0.8rem, 1.2vw, 0.95rem);
        }

        .dramatic {
            font-size: clamp(2.6rem, 7vw, 5.2rem); /* previous min (6rem) overflowed on phones */
            line-height: 0.95;
            font-weight: 900;
            text-align: left;
            margin: 0 0 14px;
        }

        .hero-text {
            font-size: clamp(1rem, 1.6vw, 1.25rem);
            line-height: 1.8;
            max-width: 560px;
            margin: 0 0 20px;
            color: rgba(239, 232, 225, 0.85);
        }

        .hero-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 14px;
            align-items: center;
        }

        .hero-button {
            display: inline-flex;
            justify-content: center;
            align-items: center;
            width: auto;
            padding: 12px 22px;
            margin: 0;
            transition: background-color var(--transition-fast), transform var(--transition-fast);
        }

        .hero-button:hover {
            transform: translateY(-2px);
        }

        .text-link {
            color: var(--accent-color);
            font-weight: 700;
            transition: color var(--transition-fast);
        }

        .hero-visual {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .hero-logo {
            width: min(100%, 380px);
            height: auto;
            filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.35));
        }

        @media (max-width: 860px) {
            .home-hero {
                grid-template-columns: 1fr;
                text-align: center;
            }

            .hero-copy {
                align-items: center;
                text-align: center;
            }

            .dramatic {
                text-align: center;
            }

            .hero-actions {
                justify-content: center;
            }
        }

        /* =========================================
           15. ACCOUNT PAGE
        ========================================= */
        .account-page {
            width: 100%;
            display: flex;
            flex-direction: column;
        }

        .account-shell {
            width: 100%;
            margin: 0 auto;
            display: flex;
            justify-content: center;
            padding: 0 20px;
        }

        .account-card {
            display: flex;
            align-items: center;
            justify-content: center;
            width: fit-content; /* grows with the name/handle instead of a fixed 84% */
            min-width: 85%;
            max-width: 100%;
            gap: 22px;
            padding: 28px;
            background: var(--nav-background-color);
            border-radius: 28px;
        }

        .account-avatar {
            width: 112px;
            height: 112px;
            border-radius: 50%;
            border: 2px solid rgba(241, 205, 150, 0.45);
            object-fit: contain;
            object-position: center;
            flex-shrink: 0;
            display: block;
            background-color: rgba(255, 255, 255, 0.04);
            transition: transform var(--transition-fast), border-color var(--transition-fast);
        }

        .account-info {
            display: flex;
            flex-direction: column;
            gap: 6px;
            flex-shrink: 0; /* let the name/handle dictate the width instead of getting squeezed */
        }

        .account-name-row,
        .account-handle-row {
            display: flex;
            align-items: center;
            gap: 8px;
            width: max-content;
        }

        .account-name-row h1 {
            margin: 0;
            font-size: clamp(1.4rem, 3vw, 2rem);
            white-space: nowrap; /* single line — the row grows to fit rather than truncating */
        }

        .account-handle-row h3 {
            margin: 0;
            color: var(--accent-color);
            font-weight: 700;
            font-size: clamp(1rem, 2vw, 1.25rem);
            white-space: nowrap; /* single line — the row grows to fit rather than truncating */
        }

        .account-badges {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: clamp(1.2rem, 2vw, 1.5rem);
            color: rgb(117, 117, 255);
            flex-shrink: 0;
        }

        .badge-tooltip {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: help;
        }

        .badge-tooltip::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: calc(100% + 8px);
            left: 50%;
            transform: translateX(-50%) translateY(4px);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            white-space: nowrap;
            padding: 6px 10px;
            border-radius: 10px;
            background: rgba(21, 16, 12, 0.95);
            color: var(--foreground-color);
            font-size: 0.75rem;
            font-weight: 600;
            transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
            z-index: 10;
        }

        .badge-tooltip:hover::after,
        .badge-tooltip:focus-visible::after {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        .account-badge-danger {
            color: rgb(254, 86, 86);
        }

        .avatar-picker-trigger {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 128px;
            height: 128px;
            padding: 0;
            margin: 0;
            background: transparent;
            border: none;
            cursor: pointer;
            border-radius: 50%;
            overflow: hidden;
        }

        .avatar-picker-trigger:hover .account-avatar {
            transform: scale(1.03);
            border-color: var(--accent-color);
        }

        .avatar-picker-label {
            position: absolute;
            inset: auto 0 0 0;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 6px 10px;
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--foreground-color);
            background: rgba(21, 16, 12, 0.8);
            border-radius: 0 0 50% 50%;
            transition: background-color var(--transition-fast);
        }

        .profile-modal-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(7, 5, 3, 0.75);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            z-index: 99999;
            animation: modal-backdrop-in var(--transition-medium) var(--ease) forwards;
        }

        .profile-modal-backdrop[hidden] {
            display: none;
        }

        .profile-modal {
            width: fit-content;
            max-width: min(100%, 720px);
            max-height: 88vh;
            overflow: auto;
            background: linear-gradient(135deg, rgba(32, 24, 18, 0.98), rgba(51, 39, 28, 0.95));
            border: 1px solid var(--border-color);
            border-radius: 28px;
            padding: 22px;
            box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
            animation: modal-pop-in var(--transition-medium) var(--ease) forwards;
        }

        @keyframes modal-backdrop-in {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes modal-pop-in {
            from { transform: scale(0.96) translateY(6px); opacity: 0; }
            to { transform: scale(1) translateY(0); opacity: 1; }
        }

        .profile-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
        }

        .profile-modal-header h2 {
            margin: 0;
            font-size: 1rem;
        }

        .profile-modal-close {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            padding: 0;
            border: none;
            background: rgba(255, 255, 255, 0.08);
            color: var(--foreground-color);
            font-size: 1rem;
            line-height: 1;
            border-radius: 50%;
            cursor: pointer;
            transition: background-color var(--transition-fast), color var(--transition-fast);
        }

        .profile-modal-close:hover {
            background: rgba(241, 205, 150, 0.16);
            color: var(--accent-color);
        }

        .profile-modal-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 10px;
        }

        @media (max-width: 480px) {
            .profile-modal-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        .profile-option {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            width: 100%;
            max-width: 124px;
            background: rgba(255, 255, 255, 0.03);
            border: none;
            border-radius: 18px;
            padding: 12px;
            color: var(--foreground-color);
            cursor: pointer;
            transition: transform var(--transition-fast), background-color var(--transition-fast);
        }

        .profile-option:hover {
            transform: translateY(-2px);
            background: var(--background-color);
        }

        .profile-option img {
            width: 96px;
            height: 96px;
            border-radius: 50%;
            object-fit: contain;
            object-position: center;
            border: 1px solid rgba(241, 205, 150, 0.25);
            background-color: rgba(255, 255, 255, 0.04);
        }

        .profile-option span {
            max-width: 100%;
            text-align: center;
            line-height: 1.2;
            font-size: 0.9rem;
            overflow-wrap: anywhere;
        }

        @media (max-width: 640px) {
            .account-shell {
                padding: 0 12px;
            }

            .account-card {
                width: 100%;
                flex-direction: column;
                align-items: center;
                padding: 20px;
            }

            .account-avatar {
                width: 96px;
                height: 96px;
            }

            /* On narrow screens there's no room to keep names on one line
               without truncating too aggressively, so allow wrapping here
               only — the nav bar rule above stays nowrap regardless. */
            .account-name-row h1,
            .account-handle-row h3 {
                white-space: normal;
                text-align: center;
            }
        }

        /* =========================================
           16. FOOTER
        ========================================= */
        .site-footer {
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            gap: 64px;
            padding: 40px 24px 48px;
            margin: 40px 0 0;
        }

        .site-footer > .footer-content {
            width: min(1100px, 100%);
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: flex-start;
            gap: 64px;
        }

        .footer-brand,
        .footer-columns {
            display: flex;
            gap: 24px;
        }

        .footer-brand {
            flex-direction: column;
            min-width: 240px;
        }

        .footer-meta {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .footer-columns {
            flex-wrap: wrap;
            flex: 1;
            justify-content: center;
        }

        .footer-column {
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-width: 120px;
        }

        .footer-heading {
            font-weight: 700;
            color: var(--accent-color);
            margin-bottom: 4px;
        }

        .footer-link,
        .footer-text {
            color: inherit;
            text-decoration: none;
            transition: color var(--transition-fast);
        }

        .footer-link:hover {
            color: var(--accent-color);
            text-decoration: underline;
        }

        .footer-link-highlight {
            color: var(--accent-color);
        }

        @media (max-width: 860px) {
            .site-footer {
                flex-direction: column;
                gap: 28px;
            }

            .footer-brand,
            .footer-columns {
                width: 100%;
            }
        }

        /* =========================================
           17. COMMENTS
        ========================================= */
        .comments-section {
            width: 80%;
            display: flex;
            flex-direction: column;
            border-top: 2px solid var(--border-color);
            margin-top: 20px;
        }

        .comment {
            width: 100%;
        }

        .comment-input-row {
            display: flex;
            gap: 20px;
            align-items: center;
            justify-content: center;
            width: 100%;
            min-height: 40px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        .comment-input-row input {
            flex: 1;
            min-width: 180px;
            height: 40px;
            padding: 0 12px;
        }

        .comment-input-row button {
            height: 40px;
            width: 160px;
            flex-shrink: 0;
        }

        @media (max-width: 640px) {
            .comments-section {
                width: 100%;
            }
        }

        /* =========================================
           18. METABALL / FLUID BLOB BACKGROUND
           Decorative "goo" effect: blur softens each blob's edge,
           then the extreme contrast snaps overlapping edges back to
           sharp, so drifting circles visually melt into one shape.

           Usage — wrap 3–5 <div class="blob"> in a <div class="blob-field">,
           placed inside any `position: relative` parent, e.g.:

             <div class="hero-visual">
               <div class="blob-field">
                 <div class="blob"></div>
                 <div class="blob"></div>
                 <div class="blob"></div>
                 <div class="blob"></div>
               </div>
               <img class="hero-logo" ...>
             </div>

           Keep the field's parent `position: relative` and don't nest
           real content inside `.blob-field` — it's filtered/blurred too.
        ========================================= */
        .blob-field {
            position: absolute;
            inset: -20%; /* overshoot so blobs don't get clipped mid-goo at the edges */
            z-index: -1;
            overflow: hidden;
            pointer-events: none;
            filter: blur(22px) contrast(30);
        }

        .blob {
            position: absolute;
            border-radius: 50%;
            background: var(--accent-color);
            opacity: 0.55;
            will-change: transform;
            animation: blob-drift 16s var(--ease) infinite;
        }

        .blob:nth-child(1) {
            width: 220px;
            height: 220px;
            top: 12%;
            left: 15%;
            animation-duration: 14s;
        }

        .blob:nth-child(2) {
            width: 180px;
            height: 180px;
            top: 55%;
            left: 55%;
            background: var(--foreground-color);
            opacity: 0.32;
            animation-duration: 18s;
            animation-delay: -4s;
        }

        .blob:nth-child(3) {
            width: 150px;
            height: 150px;
            top: 30%;
            left: 62%;
            animation-duration: 12s;
            animation-delay: -7s;
        }

        .blob:nth-child(4) {
            width: 170px;
            height: 170px;
            top: 62%;
            left: 12%;
            background: var(--nav-hover-color);
            opacity: 0.5;
            animation-duration: 20s;
            animation-delay: -2s;
        }

        @keyframes blob-drift {
            0%, 100% { transform: translate(0, 0) scale(1); }
            25%      { transform: translate(30px, -22px) scale(1.12); }
            50%      { transform: translate(-24px, 26px) scale(0.9); }
            75%      { transform: translate(16px, 16px) scale(1.05); }
        }

        /* Smaller field on tight viewports so blobs don't dominate the layout */
        @media (max-width: 640px) {
            .blob-field {
                inset: -10%;
            }

            .blob {
                transform: scale(0.7);
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .blob {
                animation: none;
            }
        }