@charset "utf-8";

/* RESET (IMPORTANT - prevents layout issues) */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* DESIGN TOKENS */
:root {
    --primary: #4F7CFF;
    --primary-dark: #3A5EDB;

    --carbon-black: #080a12;
    --carbon-mid: #14141C;

    --bright-snow: #F2F2F7;
    --text-light: #A8A8B3;
    --text-dark: #0A0A0F;

    --glass-bg: rgba(20, 20, 28, 0.85);
    --glass-border: rgba(255, 255, 255, 0.06);
    --hover-bg: rgba(255, 255, 255, 0.05);

    --red-logout: #FF4C4C;

    --shadow-soft: 0 3px 10px rgba(0, 0, 0, 0.22);

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 36px;
    --space-xxl: 60px;

    --radius-sm: 4px;
    --radius-md: 8px;

    --transition: 0.3s ease;

    --ff-display: 'Poppins', sans-serif;
    --ff-body: 'Poppins', sans-serif;

    --fs-display-xl: 40px;
    --fs-display-lg: 30px;
    --fs-display-md: 20px;

    --fs-body-lg: 16px;
    --fs-body-md: 14px;
    --fs-body-sm: 12px;

    --fw-semibold: 600;
    --fw-bold: 700;

    --section-padding: var(--space-xl);
    --container-max: 1300px;

    --heading-line-height: 1.1;
    --body-line-height: 1.55;

    /* MOTION TOKENS */
    --motion-xs: 120ms;
    --motion-sm: 200ms;
    --motion-md: 350ms;
    --motion-lg: 600ms;
    --motion-xl: 900ms;

    --ease-smooth: cubic-bezier(0.33, 0.85, 0.4, 0.96);
    --ease-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
    --ease-emphasized: cubic-bezier(0.2, 0.0, 0, 1);

    --delay-1: 0ms;
    --delay-2: 120ms;
    --delay-3: 240ms;
    --delay-4: 360ms;
    --delay-5: 480ms;
}

/* ----------------------------------- *
   GLOBAL STYLING
* ----------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--ff-body);
    font-size: var(--fs-body-lg);
    font-weight: var(--fw-semibold);
    line-height: var(--body-line-height);
    background: var(--carbon-black);
    color: var(--bright-snow);
    padding-top: 80px;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.footer {
    margin-top: auto;
}

/* TYPOGRAPHY */
h1, h2, h3 {
    font-family: var(--ff-display);
    font-weight: var(--fw-bold);
    line-height: var(--heading-line-height);
}

h1 { font-size: var(--fs-display-xl); }

h2 {
    font-size: var(--fs-display-lg);
    position: relative;
    display: inline-block;
}

h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

h3 { font-size: var(--fs-display-md); }

p {
    font-size: var(--fs-body-lg);
    color: var(--text-light);
    line-height: var(--body-line-height);
}

/* LINKS & BUTTONS */
a {
    text-decoration: none;
    color: inherit;
    transition: color var(--motion-sm) var(--ease-standard),
                opacity var(--motion-sm) var(--ease-standard);
}

a:hover { opacity: 0.8; }

button {
    font-family: var(--ff-body);
    font-weight: var(--fw-semibold);
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: transform var(--motion-sm) var(--ease-standard),
                box-shadow var(--motion-sm) var(--ease-standard),
                background var(--motion-sm) var(--ease-standard);
}

/* SECTION */
section {
    padding: var(--section-padding) 0;
    scroll-margin-top: 88px;
}

/* CONTAINER */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background: var(--carbon-mid);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    padding: 12px 0;
}

.navbar .container {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(12px, 2vw, var(--space-lg));
    min-height: 48px;
}

/* LOGO */
.logo {
    font-family: var(--ff-display);
    font-size: clamp(22px, 2vw, 26px);
    font-weight: var(--fw-bold);
    letter-spacing: 0;
    color: var(--bright-snow);
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
}

.logo:hover {
    color: var(--primary);
    opacity: 1;
}

/* ----------------------------------- *
   NAV LINKS
* ----------------------------------- */

.nav-pill-wrap {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;                
    justify-content: center;
    min-width: 0;
}

.nav-links a {
    position: relative;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ff-display);
    font-size: 14px;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-light);
    line-height: 1;
    padding: 0 12px;
    border-radius: var(--radius-md);
    transition: background var(--motion-sm) var(--ease-standard),
                color var(--motion-sm) var(--ease-standard);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: width var(--motion-sm) var(--ease-standard),
                left var(--motion-sm) var(--ease-standard),
                opacity var(--motion-sm) var(--ease-standard);
    opacity: 0;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 60%;
    left: 20%;
    opacity: 1;
}

.nav-links a:hover {
    color: var(--primary);
    background: rgba(79, 124, 255, 0.12);
    opacity: 1;
}

.nav-links a.active {
    color: var(--primary);
    background: rgba(79, 124, 255, 0.18);
}

/* ----------------------------------- *
   NAV ACTIONS
* ----------------------------------- */

.nav-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    flex: 0 0 auto;
}

.nav-search {
    position: relative;
    width: clamp(180px, 17vw, 250px);
    min-width: 150px;
}

.nav-search input {
    width: 100%;
    height: 40px;
    padding: 0 38px 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    outline: none;
    background: rgba(255, 255, 255, 0.045);
    color: var(--bright-snow);
    font-family: var(--ff-body);
    font-size: var(--fs-body-md);
    font-weight: var(--fw-semibold);
}

.nav-search input::placeholder {
    color: rgba(168, 168, 179, 0.72);
}

.nav-search input:focus {
    border-color: rgba(79, 124, 255, 0.52);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.14);
}

.nav-search input:focus-visible,
.nav-icon-btn:focus-visible,
.nav-play-btn:focus-visible,
.nav-avatar-chip:focus-visible,
.nav-toggle:focus-visible,
.nav-links a:focus-visible {
    outline: 2px solid rgba(79, 124, 255, 0.72);
    outline-offset: 2px;
}

.nav-search-shortcut {
    position: absolute;
    top: 50%;
    right: 10px;
    min-width: 20px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.48);
    font-size: 13px;
    line-height: 1;
}

.nav-notification-wrap {
    position: relative;
}

.nav-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.045);
    color: var(--bright-snow);
    transition:
        background var(--motion-sm) var(--ease-standard),
        border-color var(--motion-sm) var(--ease-standard),
        transform var(--motion-sm) var(--ease-standard);
}

.nav-icon-btn:hover,
.nav-icon-btn.active {
    background: rgba(79, 124, 255, 0.12);
    border-color: rgba(79, 124, 255, 0.36);
    transform: translateY(-1px);
}

.nav-activity-icon {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.28));
}

.nav-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--carbon-mid);
    border-radius: 999px;
    background: #ff4c4c;
    color: #fff;
    font-size: 10px;
    font-weight: var(--fw-bold);
    line-height: 1;
}

.nav-notification-badge[hidden] {
    display: none;
}

.nav-notification-panel {
    position: absolute;
    top: calc(100% + 16px);
    right: 0;
    width: min(340px, calc(100vw - 32px));
    max-height: 420px;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    z-index: 1001;
    background: rgba(20, 20, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-md);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
    transition:
        opacity var(--motion-sm) var(--ease-standard),
        transform var(--motion-sm) var(--ease-standard),
        visibility var(--motion-sm) var(--ease-standard);
}

.nav-notification-panel.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-notification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 14px 14px 10px;
    color: var(--bright-snow);
    font-size: var(--fs-body-md);
    font-weight: var(--fw-bold);
}

.nav-notification-head button {
    min-height: 28px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    font-size: 12px;
}

.nav-notification-head button:hover {
    background: rgba(255, 255, 255, 0.10);
    color: var(--bright-snow);
}

.nav-notification-empty {
    padding: 6px 14px 16px;
    color: rgba(255, 255, 255, 0.48);
    font-size: var(--fs-body-sm);
}

.nav-notification-list {
    display: grid;
    gap: 1px;
    max-height: 350px;
    overflow-y: auto;
    list-style: none;
    padding: 0 8px 8px;
}

.nav-notification-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 8px;
    border-radius: var(--radius-sm);
    color: var(--bright-snow);
}

.nav-notification-item.unread {
    background: rgba(79, 124, 255, 0.10);
}

.nav-notification-dot {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.nav-notification-dot.success { background: #22c55e; }
.nav-notification-dot.error { background: #ef4444; }
.nav-notification-dot.warning { background: #f59e0b; }
.nav-notification-dot.info { background: #3b82f6; }

.nav-notification-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.nav-notification-message {
    color: var(--bright-snow);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    line-height: 1.35;
}

.nav-notification-time {
    color: rgba(255, 255, 255, 0.42);
    font-size: 11px;
    font-weight: var(--fw-semibold);
}

.nav-play-btn,
.login-btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ff-display);
    font-size: 15px;
    font-weight: var(--fw-bold);
    text-transform: none;
    letter-spacing: 0;
    border-radius: var(--radius-md);
    line-height: 1;
    white-space: nowrap;
    transition: background var(--motion-sm) var(--ease-standard),
                border-color var(--motion-sm) var(--ease-standard),
                color var(--motion-sm) var(--ease-standard),
                transform var(--motion-sm) var(--ease-standard);
}

.nav-play-btn {
    gap: 9px;
    padding: 0 18px;
    background: var(--primary);
    border: 1px solid rgba(79, 124, 255, 0.72);
    color: var(--text-dark);
}

.nav-play-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}

.nav-play-btn:hover {
    background: var(--primary-dark);
    border-color: rgba(79, 124, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
    opacity: 1;
    transform: translateY(-1px);
}

.login-btn {
    display: none;
    padding: 0 17px;
    background: var(--primary);
    color: var(--text-dark);
    visibility: hidden;
    opacity: 0;
}

/* When JS reveals it */
.login-btn.visible {
    visibility: visible;
    opacity: 1;
}

.login-btn.is-logout {
    background: rgba(255, 76, 76, 0.12);
    border: 1px solid rgba(255, 76, 76, 0.34);
    color: #ff8585;
}

.login-btn:hover {
    background: var(--primary-dark);
    opacity: 1;
    transform: translateY(-1px);
}

.login-btn.is-logout:hover {
    background: rgba(255, 76, 76, 0.22);
    border-color: rgba(255, 76, 76, 0.5);
    color: #ffb0b0;
}

.nav-avatar-chip {
    min-height: 40px;
    width: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 3px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    color: var(--bright-snow);
}

.nav-avatar-chip.visible {
    display: inline-flex;
}

.nav-avatar-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    opacity: 1;
}

.nav-avatar-chip.active {
    background: rgba(79, 124, 255, 0.14);
    border-color: rgba(79, 124, 255, 0.36);
}

.nav-avatar-img {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    background: var(--primary);
    object-fit: cover;
}

.nav-avatar-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.nav-profile-menu {
    position: absolute;
    top: calc(100% + 16px);
    right: 0;
    width: min(260px, calc(100vw - 32px));
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    z-index: 1002;
    padding: 8px;
    background: rgba(20, 20, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-md);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
    transition:
        opacity var(--motion-sm) var(--ease-standard),
        transform var(--motion-sm) var(--ease-standard),
        visibility var(--motion-sm) var(--ease-standard);
}

.nav-profile-menu.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-profile-summary {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 6px;
}

.nav-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    object-fit: cover;
}

.nav-profile-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.nav-profile-label {
    color: rgba(255, 255, 255, 0.46);
    font-size: 11px;
    font-weight: var(--fw-bold);
    line-height: 1;
    text-transform: uppercase;
}

.nav-profile-name {
    overflow: hidden;
    color: var(--bright-snow);
    font-size: var(--fs-body-md);
    font-weight: var(--fw-bold);
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-profile-action {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--bright-snow);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-bold);
    line-height: 1;
    text-align: left;
}

.nav-profile-action:hover,
.nav-profile-action:focus-visible {
    background: rgba(79, 124, 255, 0.12);
    color: var(--bright-snow);
    opacity: 1;
    outline: none;
}

.nav-profile-logout {
    color: #ff8585;
}

.nav-profile-logout:hover,
.nav-profile-logout:focus-visible {
    background: rgba(255, 76, 76, 0.14);
    color: #ffb0b0;
}

.nav-auth-mobile {
    display: none;
}

/* Hamburger button (hidden on desktop) */
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--bright-snow);
    border-radius: 3px;
    transition: transform var(--motion-sm) var(--ease-standard),
                opacity var(--motion-sm) var(--ease-standard);
}

@media (max-width: 1180px) {
    .nav-search {
        width: clamp(150px, 15vw, 190px);
        min-width: 140px;
    }

    .nav-links a {
        padding: 0 9px;
        font-size: 13px;
    }
}

@media (max-width: 1080px) {
    .nav-search {
        display: none;
    }
}

@media (max-width: 1024px) {
    .navbar .container {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: var(--space-sm);
    }

    .logo {
        flex: 1 1 auto;
        min-width: 0;
    }

    .nav-right {
        order: 2;
        flex: 0 0 auto;
        gap: 7px;
    }

    .nav-pill-wrap {
        position: absolute;
        top: calc(100% + 16px);
        left: var(--space-lg);
        right: var(--space-lg);
        z-index: 998;
        transform: translateY(-10px) scale(0.985);
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform-origin: top center;
        transition:
            opacity var(--motion-sm) var(--ease-standard),
            transform var(--motion-sm) var(--ease-standard),
            visibility var(--motion-sm) var(--ease-standard);
    }

    .nav-pill-wrap.open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .nav-links {
        width: 100%;
        flex-direction: column;
        gap: 4px;
        padding: 10px;
        background:
            linear-gradient(180deg, rgba(20, 20, 28, 0.98), rgba(10, 12, 20, 0.96));
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: var(--radius-md);
        box-shadow: 0 22px 55px rgba(0, 0, 0, 0.62);
    }

    .nav-links li {
        width: 100%;
    }

    .nav-auth-mobile {
        display: block;
        margin-top: 4px;
        padding-top: 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-links a {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
        padding: 0 var(--space-md);
        border-radius: var(--radius-md);
        color: rgba(242, 242, 247, 0.88);
        font-size: 13px;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-auth-link.is-logout {
        color: #ff8585;
    }

    .nav-auth-link.is-logout:hover {
        background: rgba(255, 76, 76, 0.14);
        color: #ffb0b0;
    }

    .nav-toggle {
        order: 3;
        flex: 0 0 40px;
        display: flex;
        margin-left: 2px;
        transition:
            background var(--motion-sm) var(--ease-standard),
            border-color var(--motion-sm) var(--ease-standard),
            transform var(--motion-sm) var(--ease-standard);
    }

    .nav-toggle:hover,
    .nav-toggle.active {
        background: rgba(79, 124, 255, 0.12);
        border-color: rgba(79, 124, 255, 0.34);
        transform: translateY(-1px);
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 8px 0;
    }

    .navbar .container {
        padding: 0 var(--space-md);
        min-height: 44px;
    }

    .logo {
        font-size: 20px;
    }

    .nav-play-btn,
    .login-btn,
    .nav-icon-btn,
    .nav-avatar-chip,
    .nav-toggle {
        min-height: 38px;
        height: 38px;
    }

    .nav-search {
        display: none;
    }

    .nav-icon-btn,
    .nav-play-btn {
        width: 38px;
        padding: 0;
    }

    .play-label {
        display: none;
    }

    .nav-avatar-chip {
        width: 38px;
        padding: 2px;
    }

    .nav-avatar-img {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .nav-activity-icon {
        width: 22px;
        height: 22px;
    }

    .nav-notification-panel {
        position: fixed;
        top: 72px;
        left: 12px;
        right: 12px;
        width: auto;
        max-height: calc(100dvh - 86px);
        transform: translateY(-6px);
    }

    .nav-profile-menu {
        top: calc(100% + 16px);
    }

    .nav-notification-panel.open {
        transform: translateY(0);
    }

    .nav-notification-list {
        max-height: calc(100dvh - 170px);
    }
}

@media (max-width: 576px) {
    .navbar .container {
        padding: 0 10px;
        gap: 6px;
    }

    .logo {
        font-size: 18px;
    }

    .nav-right {
        gap: 5px;
    }

    .nav-play-btn,
    .nav-icon-btn,
    .nav-avatar-chip,
    .nav-toggle {
        width: 36px;
        min-height: 36px;
        height: 36px;
    }

    .nav-notification-panel {
        top: 68px;
        left: 8px;
        right: 8px;
        max-height: calc(100dvh - 78px);
    }

    .nav-notification-head {
        padding: 12px 12px 8px;
    }

    .nav-notification-list {
        max-height: calc(100dvh - 156px);
    }

    .nav-pill-wrap {
        top: calc(100% + 16px);
        left: 8px;
        right: 8px;
    }

    .login-btn {
        padding: 0 12px;
        font-size: 11px;
    }
}

/* ----------------------------------- *
   CUSTOM SCROLLBAR
* ----------------------------------- */

::-webkit-scrollbar { width: 10px; }

::-webkit-scrollbar-track {
    background: var(--carbon-mid);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* Standard properties (for Firefox and future support) */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--carbon-mid);
}

/* ----------------------------------- *
   FOOTER
* ----------------------------------- */

.footer {
    position: relative;
    margin-top: auto;
    padding: 22px 0;
    color: var(--text-light);
    background:
        linear-gradient(180deg, rgba(20, 20, 28, 0.05), rgba(20, 20, 28, 0.62)),
        #080a12;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
}

.footer-links a,
.footer-links button {
    min-width: 92px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--bright-snow);
    background: rgba(10, 10, 15, 0.7);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-bold);
    line-height: 1;
    transition:
        background var(--motion-sm) var(--ease-standard),
        border-color var(--motion-sm) var(--ease-standard),
        color var(--motion-sm) var(--ease-standard),
        transform var(--motion-sm) var(--ease-standard);
}

.footer-links a:hover,
.footer-links button:hover {
    color: var(--text-dark);
    background: var(--primary);
    border-color: var(--primary);
    opacity: 1;
    transform: translateY(-1px);
}

.footer-copy {
    color: rgba(255, 255, 255, 0.46);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    text-align: center;
    line-height: 1.4;
}

@media (max-width: 760px) {
    .footer-links {
        width: 100%;
    }

    .footer-links a,
    .footer-links button {
        flex: 1 1 120px;
    }
}

/* ----------------------------------- *
   ANIMATIONS - TOKEN DRIVEN
* ----------------------------------- */

/* HERO ANIMATION */
@keyframes slideInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
    animation: slideInUp var(--motion-lg) var(--ease-smooth) forwards;
}

/* USER CARD STAGGER */
@keyframes fadeStagger {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.cards-grid .user-card {
    opacity: 0;
    animation: fadeStagger var(--motion-md) var(--ease-smooth) forwards;
}

.cards-grid .user-card:nth-child(1) { animation-delay: var(--delay-2); }
.cards-grid .user-card:nth-child(2) { animation-delay: var(--delay-3); }
.cards-grid .user-card:nth-child(3) { animation-delay: var(--delay-4); }

/* .glow-pulse retained as a no-op for backwards compatibility.
   The perpetual pulsing halo was removed — it read as a generic
   "AI template" effect rather than a premium CTA. */
.glow-pulse {
    animation: none;
}

/*-----------------------------------*\
  #REVEAL ANIMATION
\*-----------------------------------*/

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--motion-lg) var(--ease-smooth),
                transform var(--motion-lg) var(--ease-smooth);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/*-----------------------------------*
  #LEADERBOARD NOTIFICATION
*-----------------------------------*/

#rankup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(4px);
    transition: opacity 0.4s ease;
    padding: var(--space-lg);
}

.rankup-label {
    font-size: 11px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 700;
    opacity: 0;
    margin-bottom: 8px;
    text-align: center;
}

.rankup-heading {
    font-size: clamp(16px, 4vw, 22px);
    font-weight: 700;
    color: #F2F2F7;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    opacity: 0;
    margin-bottom: 6px;
}

.rankup-sub {
    font-size: 11px;
    color: #A8A8B3;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0;
    margin-bottom: 28px;
    text-align: center;
}

.rankup-card {
    background: #14141C;
    border: 2px solid rgba(79, 124, 255, 0.5);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0;
    width: min(100%, 420px);
    box-sizing: border-box;
}

.rankup-rank {
    font-size: clamp(32px, 8vw, 44px);
    font-weight: 700;
    color: var(--primary);
    min-width: clamp(52px, 12vw, 72px);
    text-align: center;
    line-height: 1;
    flex-shrink: 0;
}

.rankup-divider {
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.rankup-pfp {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2a2a3a;
    border: 2px solid rgba(79, 124, 255, 0.3);
    flex-shrink: 0;
}

.rankup-info {
    flex: 1;
    min-width: 0;
}

.rankup-name {
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 700;
    color: #F2F2F7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rankup-username {
    font-size: 12px;
    color: #A8A8B3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rankup-amount {
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 700;
    color: #4ade80;
    white-space: nowrap;
    flex-shrink: 0;
}

.rankup-progress {
    width: min(100%, 420px);
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
    opacity: 0;
    box-sizing: border-box;
}

.rankup-progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    width: 100%;
}

/*-----------------------------------*
  #KEYFRAMES
*-----------------------------------*/

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

@keyframes ruFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes ruPopIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes ruShrink {
    from { width: 100%; }
    to   { width: 0%; }
}

/*-----------------------------------*
  #RESPONSIVE
*-----------------------------------*/

@media (max-width: 400px) {
    .rankup-card {
        padding: 12px 14px;
        gap: 10px;
    }

    .rankup-divider {
        display: none;
    }

    .rankup-pfp {
        width: 36px;
        height: 36px;
    }

    .rankup-sub {
        margin-bottom: 18px;
    }
}

/*-----------------------------------*\
  #MESSAGES POPUPS
\*-----------------------------------*/

/* Toast container */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10000;
}

/* Toast base */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    animation: toastSlideIn 0.35s ease forwards;
    position: relative;
    overflow: hidden;
}

/* Icons */
.toast-icon {
    font-size: 20px;
}

/* Close button */
.toast-close {
    margin-left: auto;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.7;
}

.toast-close:hover {
    opacity: 1;
}

/* Types */
.toast.success { background: #22c55e; }
.toast.error   { background: #ef4444; }
.toast.warning { background: #f59e0b; }
.toast.info    { background: #3b82f6; }

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: rgba(255,255,255,0.4);
    animation: toastProgress linear forwards;
}

/* Animation keyframes */
@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Slide-in animation */
@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* Fade-out animation */
@keyframes toastFadeOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(120%); }
}

/*-----------------------------------*
  #SCROLL TO SECTION BUTTON
*-----------------------------------*/

#scroll-nav-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-dark);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    z-index: 9999;
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
}

/* Show button */
#scroll-nav-btn.show {
    opacity: 1;
    pointer-events: auto;
}

/* Hover lift */
#scroll-nav-btn:hover {
    transform: translateY(-3px);
}

/* Center the arrow container perfectly */
#scroll-nav-btn .arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Arrow image */
#scroll-nav-btn .arrow img {
    width: 22px;
    height: 22px;
    display: block; /* removes inline spacing */
    transition: transform 0.25s ease;
    pointer-events: none;      /* prevents selection + clicking */
    -webkit-user-drag: none;   /* Safari, iOS */
    -webkit-user-select: none; /* older Safari */
    -moz-user-select: none;    /* older Firefox */
    -ms-user-select: none;     /* old IE/Edge */
    user-select: none;         /* modern browsers */
    display: block;
}

/* When JS adds .up → rotate arrow */
#scroll-nav-btn.up .arrow img {
    transform: rotate(180deg);
}

/*-----------------------------------*
  #RESPONSIVE BUTTON SIZING
*-----------------------------------*/

@media (max-width: 600px) {
    #scroll-nav-btn {
        width: 42px;
        height: 42px;
        bottom: 20px;
        right: 20px;
    }

    #scroll-nav-btn .arrow img {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 400px) {
    #scroll-nav-btn {
        width: 38px;
        height: 38px;
        bottom: 16px;
        right: 16px;
    }

    #scroll-nav-btn .arrow img {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 330px) {
    #scroll-nav-btn {
        width: 34px;
        height: 34px;
        bottom: 14px;
        right: 14px;
    }

    #scroll-nav-btn .arrow img {
        width: 16px;
        height: 16px;
    }
}

/*-----------------------------------*
  #ADMIN FPS MONITOR
*-----------------------------------*/

.admin-fps-monitor {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 176px;
    z-index: 10050;
    border: 1px solid rgba(117, 255, 205, 0.42);
    border-radius: 8px;
    background: rgba(8, 14, 24, 0.86);
    color: #f8fafc;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(12px);
    font-family: "Poppins", Arial, sans-serif;
    overflow: hidden;
    pointer-events: auto;
}

.admin-fps-monitor-head {
    display: grid;
    grid-template-columns: 1fr auto 28px;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 8px 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-fps-monitor-title {
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.admin-fps-monitor-head strong {
    color: #75ffcd;
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: 1.28rem;
    line-height: 1;
}

.admin-fps-monitor-toggle {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    cursor: pointer;
    font: 700 1rem/1 Consolas, "Liberation Mono", monospace;
}

.admin-fps-monitor-toggle:hover,
.admin-fps-monitor-toggle:focus-visible {
    background: rgba(117, 255, 205, 0.18);
    outline: none;
}

.admin-fps-monitor-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.admin-fps-monitor-body div {
    min-width: 0;
    padding: 9px 10px;
    background: rgba(8, 14, 24, 0.72);
}

.admin-fps-monitor-body span {
    display: block;
    color: rgba(226, 232, 240, 0.62);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}

.admin-fps-monitor-body strong {
    display: block;
    margin-top: 4px;
    color: #f8fafc;
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
    line-height: 1.2;
}

.admin-fps-monitor.is-warning {
    border-color: rgba(250, 204, 21, 0.5);
}

.admin-fps-monitor.is-warning .admin-fps-monitor-head strong {
    color: #fde047;
}

.admin-fps-monitor.is-slow {
    border-color: rgba(248, 113, 113, 0.58);
}

.admin-fps-monitor.is-slow .admin-fps-monitor-head strong {
    color: #fb7185;
}

.admin-fps-monitor.is-collapsed {
    width: 128px;
}

.admin-fps-monitor.is-collapsed .admin-fps-monitor-head {
    border-bottom: 0;
}

.admin-fps-monitor.is-collapsed .admin-fps-monitor-body {
    display: none;
}

@media (max-width: 560px) {
    .admin-fps-monitor {
        right: 12px;
        bottom: 12px;
        width: 154px;
    }

    .admin-fps-monitor.is-collapsed {
        width: 116px;
    }

    .admin-fps-monitor-head {
        grid-template-columns: 1fr auto 26px;
        min-height: 38px;
        padding: 7px 7px 7px 10px;
    }

    .admin-fps-monitor-toggle {
        width: 26px;
        height: 26px;
    }

    .admin-fps-monitor-body div {
        padding: 8px;
    }
}
