* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html[data-theme="light"] {
    min-height: 100%;
    background-color: #edf4fc;
    color-scheme: light;
}

html[data-theme="light"] body.page-dashboard {
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #edf4fc;
}

/* Light mode art direction: airy daylight glass with real depth and color. */
html[data-theme="light"] body.page-dashboard {
    --interactive-dots-bg: transparent;
    --interactive-dots-color: #b7c7dc;
    background:
        radial-gradient(ellipse 62% 48% at 8% 4%, rgba(59, 130, 246, 0.18), transparent 66%),
        radial-gradient(ellipse 50% 42% at 94% 16%, rgba(16, 185, 129, 0.13), transparent 64%),
        radial-gradient(ellipse 54% 42% at 52% 96%, rgba(124, 58, 237, 0.1), transparent 66%),
        linear-gradient(145deg, #f8fbff 0%, #edf4fc 46%, #e7f0fa 100%);
    background-attachment: fixed;
}

html[data-theme="light"] .page-dashboard .dashboard-greeting,
html[data-theme="light"] .page-user-stats .ustat-head h1 {
    color: #10213d;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .dash-rewards-stats::before {
    content: "";
    position: absolute;
    inset: 4% 8% 12%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 28% 32%, rgba(37, 99, 235, 0.13), transparent 42%),
        radial-gradient(circle at 72% 42%, rgba(16, 185, 129, 0.1), transparent 44%),
        radial-gradient(circle at 54% 74%, rgba(124, 58, 237, 0.08), transparent 46%);
    filter: blur(34px);
    pointer-events: none;
}

html[data-theme="light"] .dash-rewards-stat {
    --card-tint: 37, 99, 235;
    background:
        radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, 0.92), transparent 34%),
        radial-gradient(circle at 12% 0%, rgba(var(--card-tint), 0.19), transparent 48%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.93), rgba(226, 237, 250, 0.86));
    border-color: rgba(var(--card-tint), 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -10px 24px rgba(71, 85, 105, 0.045),
        0 18px 42px rgba(30, 64, 175, 0.12),
        0 2px 8px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
}

html[data-theme="light"] .dash-rewards-stat:nth-child(2),
html[data-theme="light"] .dash-rewards-stat:nth-child(5) { --card-tint: 5, 150, 105; }
html[data-theme="light"] .dash-rewards-stat:nth-child(3) { --card-tint: 124, 58, 237; }
html[data-theme="light"] .dash-rewards-stat:nth-child(4) { --card-tint: 14, 116, 144; }
html[data-theme="light"] .dash-rewards-stat:nth-child(6) { --card-tint: 217, 119, 6; }

html[data-theme="light"] .dash-rewards-stat::after {
    border-color: rgba(255, 255, 255, 0.76);
}

html[data-theme="light"] .dash-rewards-stat span {
    color: #607089;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.88);
}

html[data-theme="light"] .dash-rewards-stat strong {
    color: #12233f;
}

html[data-theme="light"] .dash-rewards-stat strong.is-up {
    color: #047857;
}

html[data-theme="light"] .dash-rewards-stat:hover,
html[data-theme="light"] .dash-rewards-stat:focus-visible {
    border-color: rgba(var(--card-tint), 0.4);
    box-shadow:
        inset 0 1px 0 #ffffff,
        0 24px 54px rgba(var(--card-tint), 0.18),
        0 0 0 1px rgba(var(--card-tint), 0.08);
}

html[data-theme="light"] .dash-premium-button {
    color: #ffffff;
    border-color: rgba(30, 64, 175, 0.32);
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 12px 28px rgba(37, 99, 235, 0.28),
        0 2px 5px rgba(30, 64, 175, 0.2);
}

html[data-theme="light"] .dash-premium-button:hover,
html[data-theme="light"] .dash-premium-button:focus-visible {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 16px 34px rgba(37, 99, 235, 0.36),
        0 3px 7px rgba(30, 64, 175, 0.22);
}

html[data-theme="light"] .dash-dock-orbit {
    opacity: 0.9;
    background:
        radial-gradient(closest-side at 50% 50%, rgba(37, 99, 235, 0.24), transparent 68%),
        radial-gradient(closest-side at 18% 54%, rgba(16, 185, 129, 0.18), transparent 60%),
        radial-gradient(closest-side at 82% 54%, rgba(124, 58, 237, 0.17), transparent 60%);
}

html[data-theme="light"] .dash-dock {
    border-color: rgba(59, 130, 246, 0.2);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(218, 232, 248, 0.84)),
        #e8f1fb;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        0 20px 48px rgba(30, 64, 175, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.56);
    backdrop-filter: blur(26px) saturate(150%);
}

html[data-theme="light"] .dash-dock__item {
    color: #14213a;
    border-color: rgba(var(--dock-color), 0.24);
    background:
        radial-gradient(circle at 50% 0%, rgba(var(--dock-color), 0.22), transparent 58%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(214, 227, 243, 0.88));
    box-shadow:
        inset 0 1px 0 #ffffff,
        0 12px 25px rgba(var(--dock-color), 0.13),
        0 2px 5px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .dash-dock__item:hover,
html[data-theme="light"] .dash-dock__item:focus-visible {
    border-color: rgba(var(--dock-color), 0.48);
    box-shadow:
        inset 0 1px 0 #ffffff,
        0 16px 32px rgba(var(--dock-color), 0.24);
}

@media (max-width: 760px) {
    html[data-theme="light"] .dash-dock,
    html[data-theme="light"] .dash-dock__item {
        color: #14213a;
    }
}

:root,
[data-theme="dark"] {
    --accent: #60a5fa;
    --accent-light: #93c5fd;
    --accent-dark: #3b82f6;
    --accent-secondary: #52525b;
    --accent-tertiary: #71717a;
    --accent-rgb: 96, 165, 250;
    --accent-secondary-rgb: 82, 82, 91;
    --accent-tertiary-rgb: 113, 113, 122;
    --accent-deep-rgb: 59, 130, 246;
    --bubble-tint-rgb: 255, 255, 255;
    --bg-dark: #09090b;
    --bg-darker: #050506;
    --surface: #141416;
    --surface-elevated: #1c1c1f;
    --surface-deep: #0f0f11;
    --text-primary: #fafafa;
    --text-secondary: rgba(250, 250, 250, 0.58);
    --text-accent-muted: #71717a;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.16);
    --profit: #4ade80;
    --profit-rgb: 74, 222, 128;
    --loss: #f87171;
    --loss-rgb: 248, 113, 113;
    --warning: #fbbf24;
    --panel: rgba(20, 20, 22, 0.92);
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(var(--accent-rgb), 0.12);
    --nav-bg: rgba(9, 9, 11, 0.88);
    --noise-opacity: 0.035;
    --chart-fill: rgba(var(--accent-rgb), 0.12);
    --interactive-dots-bg: var(--bg-darker);
    --interactive-dots-color: #3f3f46;
    --interactive-dots-spacing: 32;
    --primary-purple: var(--accent);
    --primary-purple-light: var(--accent-light);
    --primary-purple-dark: var(--accent-dark);
    --gradient-brand: var(--accent);
    --gradient-purple: var(--accent);
}

[data-theme="light"] {
    --accent: #2563eb;
    --accent-light: #3b82f6;
    --accent-dark: #1d4ed8;
    --accent-secondary: #71717a;
    --accent-tertiary: #a1a1aa;
    --accent-rgb: 37, 99, 235;
    --accent-secondary-rgb: 113, 113, 122;
    --accent-tertiary-rgb: 161, 161, 170;
    --accent-deep-rgb: 29, 78, 216;
    --bg-dark: #fafafa;
    --bg-darker: #f4f4f5;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --surface-deep: #f4f4f5;
    --text-primary: #18181b;
    --text-secondary: rgba(24, 24, 27, 0.72);
    --text-accent-muted: #64748b;
    --border-subtle: rgba(15, 23, 42, 0.06);
    --border-default: rgba(15, 23, 42, 0.1);
    --border-strong: rgba(15, 23, 42, 0.16);
    --profit: #059669;
    --profit-rgb: 5, 150, 105;
    --loss: #dc2626;
    --loss-rgb: 220, 38, 38;
    --panel: rgba(255, 255, 255, 0.96);
    --glass: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 16px 48px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 0 40px rgba(var(--accent-rgb), 0.08);
    --nav-bg: rgba(255, 255, 255, 0.9);
    --noise-opacity: 0.025;
    --chart-fill: rgba(var(--accent-rgb), 0.08);
    --interactive-dots-bg: #f8fafc;
    --interactive-dots-color: #e2e8f0;
    --interactive-dots-spacing: 32;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    font-family: "Inter", sans-serif;
    position: relative;
}

.interactive-dots-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

body .background-pattern,
body .cursor-glow,
body .rb-click-spark,
body .lp-sparkles,
body .lp-grid,
body .lp-cursor-glow {
    display: none !important;
    opacity: 0 !important;
}

/* Purple glowing grid lines only */
.background-pattern {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.4s ease;
    background-color: var(--bg-dark);
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 63px,
            rgba(var(--accent-rgb), 0.14) 63px,
            rgba(var(--accent-rgb), 0.14) 64px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 63px,
            rgba(var(--accent-rgb), 0.14) 63px,
            rgba(var(--accent-rgb), 0.14) 64px
        );
    background-size: 64px 64px;
}

.background-pattern::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 63px,
            rgba(var(--accent-rgb), 0.12) 63px,
            rgba(var(--accent-rgb), 0.12) 64px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 63px,
            rgba(var(--accent-rgb), 0.12) 63px,
            rgba(var(--accent-rgb), 0.12) 64px
        );
    background-size: 64px 64px;
    filter: blur(1.6px);
    opacity: 0.35;
}


/* Minimal ambient depth â€” neutral only */
.cursor-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(
        720px circle at var(--x, 50%) var(--y, 50%),
        rgba(255, 255, 255, 0.03),
        transparent 70%
    );
    filter: blur(32px);
    transition: opacity 0.3s ease;
}

/* Show grid when mouse is hovering - always show on body */
body .background-pattern {
    opacity: 1;
}

/* Landing page: slightly brighter grid with subtle glow */
body.page-home .background-pattern {
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 63px,
            rgba(var(--accent-rgb), 0.22) 63px,
            rgba(var(--accent-rgb), 0.22) 64px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 63px,
            rgba(var(--accent-rgb), 0.22) 63px,
            rgba(var(--accent-rgb), 0.22) 64px
        );
}
body.page-home .background-pattern::after {
    filter: blur(2px);
    opacity: 0.45;
}

/* Make sure content sits above the glow */
main, nav, header, section, .content, .navbar {
  position: relative;
    z-index: 2;
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
    background: rgba(12, 12, 14, 0.38);
    backdrop-filter: blur(36px) saturate(200%) brightness(1.08);
    -webkit-backdrop-filter: blur(36px) saturate(200%) brightness(1.08);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 14px 22px;
    height: auto;
    min-height: 52px;
    position: fixed;
    top: 16px;
    left: 20px;
    right: 20px;
    z-index: 100;
    border-radius: 10px;
    font-family: "Inter", sans-serif;
    font-size: 15px;
    margin-bottom: 5px;
    animation: slideDown 0.5s ease-out;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.11),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

.navbar:hover {
    background: rgba(12, 12, 14, 0.52);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.nav-logo {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.03em;
    font-size: 24px;
}

.x-icon {
    width: 22px;
    height: 22px;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.2s ease;
    filter: brightness(0) invert(1);
}

.x-icon:hover {
    opacity: 1;
}

.ca-badge {
    margin-left: auto;
    margin-right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1.5px solid rgba(var(--accent-rgb), 0.75);
    background: rgba(var(--accent-rgb), 0.18);
    color: #fff;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.ca-badge:hover {
    background: rgba(var(--accent-rgb), 0.3);
    border-color: rgba(var(--accent-rgb), 1);
    transform: translateY(-1px);
}

.ca-badge:active {
    transform: translateY(0);
}

.ca-badge .ca-label {
    font-weight: 800;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.95);
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(var(--accent-rgb), 0.45);
    font-size: 11px;
}

.ca-badge .ca-value {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ca-badge .ca-copy {
    opacity: 0.85;
    font-size: 14px;
}

.ca-badge.is-copied {
    border-color: rgba(120, 220, 160, 0.9);
    background: rgba(120, 220, 160, 0.2);
    color: rgb(200, 250, 215);
}

.ca-badge.is-copied .ca-label {
    background: rgba(120, 220, 160, 0.45);
}

@media (max-width: 600px) {
    .ca-badge {
        padding: 7px 12px;
        font-size: 12px;
        gap: 6px;
        margin-right: 10px;
    }
    .ca-badge .ca-label {
        font-size: 10px;
        padding: 2px 5px;
    }
}

h1 {
    font-family: "Inter", sans-serif;
    font-size: 24px;
    font-weight: 600;
}
/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.container {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 60px;
}

.main-title {
    font-family: "Inter", sans-serif;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.15;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: -0.035em;
    color: var(--text-primary);
}

.psol {
    color: var(--accent-light);
    position: relative;
    display: inline-block;
}

.psol::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    opacity: 0.45;
    transform: scaleX(0);
    transform-origin: left;
    animation: underlineExpand 0.8s ease-out 0.5s forwards;
}

.subtxt {
    font-family: "Inter", sans-serif;
    font-size: clamp(16px, 2.2vw, 20px);
    line-height: 1.65;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 560px;
    margin: 0 auto;
    letter-spacing: 0;
}

/* Button â€” same glass effect as .navbar */
.btn {
    position: relative;
    margin-top: 36px;
    margin-bottom: 40px;
    width: auto;
    min-width: 220px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-primary);
    background: rgba(12, 12, 14, 0.38);
    backdrop-filter: blur(36px) saturate(200%) brightness(1.08);
    -webkit-backdrop-filter: blur(36px) saturate(200%) brightness(1.08);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 14px 28px;
    height: auto;
    min-height: 52px;
    border-radius: 10px;
    font-family: "Inter", sans-serif;
    font-size: 15px;
    font-weight: 600;
    animation: slideDown 0.5s ease-out;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.11),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}
.btn:hover {
    background: rgba(20, 20, 24, 0.48);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}
.btn:active {
    transform: translateY(1px);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-arrow {
    position: relative;
    z-index: 1;
    font-size: 16px;
    font-weight: 500;
}

/* Dashboard Styles */

.dashboard-greeting {
    font-family: "Inter", sans-serif;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: -0.03em;
}

.dashboard-cards {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    max-width: 2000px;
    width: 100%;
    margin: 0 auto;
}

/* Swipe deck: stacked cards (dashboard) */
.dashboard-cards.deck-shell {
    display: block;
    max-width: 360px;
    min-height: 400px;
    position: relative;
}

.works-deck {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    min-height: 400px;
    touch-action: none;
}

.works-deck .work-swipe-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    flex: none;
    max-width: 320px;
    width: 100%;
    touch-action: none;
    transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.3s ease;
    will-change: transform, opacity;
}

.works-deck .work-swipe-card.is-dragging {
    transition: none;
}

.works-deck .work-swipe-card.is-active {
    z-index: 3;
    transform: translateX(0) rotate(0deg);
}

.works-deck .work-swipe-card.is-next {
    z-index: 2;
    transform: scale(0.96) translateY(14px);
    pointer-events: none;
}

.works-deck .work-swipe-card.is-last {
    z-index: 1;
    transform: scale(0.92) translateY(28px);
    pointer-events: none;
}

.works-deck .work-swipe-card.is-active:hover {
    transform: translateX(0) rotate(0deg);
    box-shadow: var(--shadow-md);
}

.dashboard-card.work-swipe-card.is-active {
    border: 1px solid rgba(var(--accent-rgb), 0.45);
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.2), var(--shadow-md);
}

/* Dashboard desktop: side-by-side cards, no swipe stack */
@media (min-width: 769px) {
    .dashboard-cards.deck-shell {
        display: flex;
        max-width: 1040px;
        min-height: auto;
    }

    .works-deck {
        display: flex;
        gap: 20px;
        position: static;
        min-height: auto;
        max-width: 100%;
        touch-action: auto;
    }

    .works-deck .work-swipe-card {
        position: relative;
        flex: 1;
        max-width: 320px;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto;
    }

    .works-deck .work-swipe-card.is-next,
    .works-deck .work-swipe-card.is-last {
        transform: none !important;
        pointer-events: auto;
    }

    .swipe-hint {
        display: none;
    }
}

.dashboard-card {
    flex: 1;
    min-width: 280px;
    max-width: 320px;
    height: 400px;
    background: var(--surface);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.32s ease, box-shadow 0.32s ease, transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.dashboard-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.09) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.32s ease;
    pointer-events: none;
}

@media (hover: hover) and (min-width: 769px) {
    .dashboard-card:hover {
        transform: translateY(-10px) scale(1.02);
        border-color: rgba(var(--accent-rgb), 0.5);
        box-shadow: 0 28px 52px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(var(--accent-rgb), 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    }

    .dashboard-card:hover::after {
        opacity: 1;
    }
}

.dashboard-card.active {
    border: 1px solid rgba(var(--accent-rgb), 0.45);
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.15), var(--shadow-md);
}

.card-content {
    padding: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

.card-number {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(var(--accent-rgb), 0.55);
    margin-bottom: auto;
}

.card-description {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 6px;
    line-height: 1.4;
}

.swipe-hint {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.45;
    letter-spacing: 0.04em;
    margin-top: 20px;
    text-align: center;
    user-select: none;
}

.card-title {
    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: -0.02em;
}


/* Responsive */
@media (max-width: 768px) {
    .dashboard-cards {
        flex-direction: column;
        align-items: center;
    }

    .dashboard-card {
        width: 100%;
        max-width: 100%;
        height: 500px;
    }

    .dashboard-cards.deck-shell {
        max-width: 100%;
        min-height: 500px;
    }

    .works-deck {
        max-width: 100%;
        min-height: 500px;
    }

    .works-deck .work-swipe-card {
        max-width: 100%;
        height: 500px;
    }

    .greeting-block {
        margin-bottom: 28px;
    }

    .greeting-label {
        font-size: 13px;
        font-weight: 500;
        color: var(--text-secondary);
        letter-spacing: 0.04em;
        text-transform: uppercase;
        margin: 0 0 4px 0;
        text-align: center;
    }

    .dashboard-greeting {
        font-size: 26px;
        margin-bottom: 0;
        word-break: break-word;
    }

    .main-content.dashboard-main {
        padding-top: 90px;
        justify-content: flex-start;
    }

    .card-content {
        justify-content: flex-end;
        align-items: flex-start;
        padding: 28px 24px;
    }

    .card-title {
        font-size: 22px;
    }

    .card-description {
        font-size: 13px;
        color: var(--text-secondary);
        margin-top: 6px;
        font-weight: 400;
        line-height: 1.4;
    }
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes underlineExpand {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 16px;
    }

    .navbar {
        padding: 12px 18px;
        font-size: 15px;
        margin-bottom: 30px;
    }

    .main-content {
        padding: 20px 0;
    }

    .container {
        margin-bottom: 40px;
    }

    .btn {
        min-width: 180px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 10px 16px;
        font-size: 14px;
    }

    .main-title {
        font-size: 32px;
    }

    .subtxt {
        font-size: 16px;
    }

    .btn {
        min-width: 160px;
        font-size: 14px;
    }
}

.footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: auto;
    position: relative;
    z-index: 2;
}

/* Authentication Styles */
.auth-container {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 28px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(40px) saturate(200%) brightness(1.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.auth-title {
    font-family: "Inter", sans-serif;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
    margin-top: 0;
    font-weight: 400;
    line-height: 1.5;
}

.auth-section {
    margin-bottom: 24px;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-dark);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-default);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: var(--surface-elevated);
    color: var(--text-primary);
    box-shadow: none;
}

.auth-form {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.auth-form.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideInForm 0.4s ease-out;
}

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

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.password-toggle:hover {
    opacity: 1;
}

.eye-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.eye-icon img {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.password-toggle:hover .eye-icon img {
    transform: scale(1.1);
    opacity: 1;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: "Inter", sans-serif;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.password-group .form-input {
    padding-right: 50px;
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-input:focus {
    border-color: rgba(var(--accent-rgb), 0.55);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.auth-btn {
    position: relative;
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto 16px;
    overflow: hidden;
}


.primary-btn {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(24px) saturate(180%) brightness(1.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.primary-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

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

.primary-btn .btn-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.primary-btn:hover .btn-arrow {
    transform: translateX(4px);
}


.auth-message {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    min-height: 20px;
    transition: all 0.3s ease;
}

.auth-message:empty {
    display: none;
}

.auth-message.loading {
    color: var(--primary-purple-light);
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.auth-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        padding: 32px 24px;
        margin: 20px;
    }

    .auth-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 24px 20px;
        margin: 16px;
    }

    .auth-title {
        font-size: 24px;
    }
}

/* Floating Back Button */
.floating-back-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-default);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 20px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.floating-back-btn:hover {
    background: var(--surface-elevated);
    border-color: var(--border-strong);
    transform: none;
    box-shadow: var(--shadow-md);
}

.floating-back-btn:active {
    transform: translateY(-2px) scale(1);
}

.floating-back-btn span {
    display: block;
    transition: transform 0.3s ease;
}

.floating-back-btn:hover span {
    transform: translateX(-3px);
}

@media (max-width: 768px) {
    .floating-back-btn {
        bottom: max(42px, calc(24px + env(safe-area-inset-bottom, 0px)));
        right: max(20px, env(safe-area-inset-right, 0px));
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* Admin Panel Styles */
.admin-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

.stat-card {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    padding: 24px 32px;
    text-align: center;
    min-width: 150px;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    display: block;
    font-family: "Inter", sans-serif;
    font-size: 32px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.users-table-container {
    margin-top: 30px;
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    overflow: hidden;
}

.users-table thead {
    background: var(--bg-dark);
}

.users-table th {
    padding: 16px;
    text-align: left;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table td {
    padding: 16px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    border-top: 1px solid rgba(var(--accent-secondary-rgb), 0.1);
}

.users-table tbody tr:hover {
    background: rgba(var(--accent-rgb), 0.1);
}

.uid-cell {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-secondary);
    word-break: break-all;
}

.loading-text,
.no-users,
.error-text {
    text-align: center;
    padding: 40px !important;
    color: var(--text-secondary);
    font-style: italic;
}

.error-text {
    color: #fca5a5;
}

/* Course Layout Styles */
.course-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.page-course .course-main {
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.course-layout {
    display: flex;
    gap: 20px;
    width: 100%;
    padding: 0 20px;
    align-items: flex-start;
}

/* Left sidebar â€” liquid glass panel */
.course-sidebar {
    width: 280px;
    min-width: 280px;
    background: rgba(12, 12, 14, 0.38);
    backdrop-filter: blur(36px) saturate(200%) brightness(1.08);
    -webkit-backdrop-filter: blur(36px) saturate(200%) brightness(1.08);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.11),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

.sidebar-title {
    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: lowercase;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-item {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: lowercase;
}

.sidebar-item:hover {
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--text-primary);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
}

.sidebar-item.completed {
    opacity: 0.5;
    position: relative;
}

.sidebar-item.completed::after {
    content: "âœ“";
    position: absolute;
    right: 16px;
    color: rgba(34, 197, 94, 0.8);
    font-weight: bold;
}

/* Main lesson content panel */
.course-content {
    flex: 1;
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 24px 32px;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 830px;
}

.content-inner {
    width: 100%;
    max-width: 100%;
    text-align: left;
}

.content-title {
    font-family: "Inter", sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-transform: none;
    text-align: left;
}

.content-body {
    color: var(--text-secondary);
    font-family: "Inter", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
    width: 100%;
    max-width: 100%;
}

/* Lesson Content Styles */
.lesson-content {
    padding: 0;
}

.lesson-section {
    margin-bottom: 40px;
}

.section-title {
    font-family: "Inter", sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-transform: none;
}

.lesson-section p {
    margin-bottom: 16px;
    line-height: 1.8;
}

/* Crypto Examples */
.crypto-examples {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.crypto-item {
    background: var(--bg-dark);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    padding: 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.crypto-item:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
    transform: none;
}

.crypto-name {
    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.crypto-item p {
    margin: 0;
    color: var(--text-secondary);
}

/* Info Box */
.info-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-default);
    border-left: 3px solid rgba(var(--accent-rgb), 0.55);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.info-title {
    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: "â†’";
    position: absolute;
    left: 0;
    color: rgba(var(--accent-secondary-rgb), 0.8);
    font-weight: bold;
}

/* Feature Cards */
.feature-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}

.feature-title {
    font-family: "Inter", sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-card p {
    margin-bottom: 12px;
}

/* Example Box */
.example-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    border-left: 3px solid rgba(var(--accent-rgb), 0.45);
}

.example-box strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 8px;
}

.example-box p {
    margin-bottom: 8px;
    font-size: 14px;
}

.example-box p:last-child {
    margin-bottom: 0;
}

/* Next Lesson Button */
.next-lesson-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent);
    border: 1px solid var(--accent-dark);
    border-radius: 8px;
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    margin-top: 40px;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.next-lesson-btn:hover {
    background: var(--accent-light);
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
    transform: none;
}

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

/* Platform Links */
.platform-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 20px;
    background: var(--bg-dark);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.platform-link:hover {
    background: var(--bg-dark);
    border-color: rgba(var(--accent-rgb), 0.35);
    transform: none;
    box-shadow: var(--shadow-md);
}

.platform-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all 0.3s ease;
}

.platform-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.platform-link:hover .platform-icon {
    color: var(--accent-light);
    transform: none;
}

.platform-name {
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.platform-link:hover .platform-name {
    color: var(--accent-light);
}

/* Hamburger Menu Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
    position: relative;
    opacity: 0.75;
}

.hamburger-btn span {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Sidebar Overlay for Mobile - Removed to prevent blocking */

/* Responsive */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    .course-main {
        margin-top: 72px;
        margin-bottom: 20px;
    }

    .course-layout {
        flex-direction: column;
        gap: 20px;
        padding: 0 20px;
    }

    .course-sidebar {
        position: fixed;
        top: 100px;
        right: -100%;
        left: auto;
        width: 280px;
        min-width: 280px;
        max-height: calc(100vh - 120px);
        border-radius: 12px;
        z-index: 100;
        transition: right 0.3s ease;
        overflow-y: auto;
        box-shadow:
            -8px 0 40px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.11),
            inset 0 -1px 0 rgba(0, 0, 0, 0.18);
    }

    .course-sidebar.sidebar-open {
        right: 20px;
    }
    
    /* Make content always interactive */
    .course-content {
        position: relative;
        z-index: 1;
        pointer-events: auto;
    }

    /* Strip card chrome â€” plain reading surface on mobile */
    .course-content {
        width: 100%;
        min-height: auto;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        padding: 4px 0;
    }

    .content-title {
        font-size: 19px;
        margin-bottom: 18px;
        line-height: 1.4;
    }

    .content-body {
        font-size: 15px;
        line-height: 1.75;
    }

    .section-title {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .lesson-section {
        margin-bottom: 28px;
    }

    .lesson-section p {
        margin-bottom: 12px;
        line-height: 1.75;
    }

    .feature-card {
        padding: 16px;
        margin-bottom: 14px;
    }

    .feature-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .info-box {
        padding: 14px 16px;
        margin: 14px 0;
    }

    .info-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .crypto-item {
        padding: 14px 16px;
    }

    .crypto-name {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .example-box {
        padding: 12px 14px;
        margin-top: 12px;
    }

    .example-box p {
        font-size: 13px;
    }

    /* Dim the background grid so text is the only focus */
    .page-course .background-pattern {
        opacity: 0.15;
    }
}

/* AI Assistant Styles */
.page-ai {
    padding: 0 20px 20px;
}

.page-ai .ai-container {
    margin-top: 102px;
}

.ai-main-wrapper {
    position: relative;
    z-index: 2;
    padding: 24px 20px 12px;
    margin-top: 72px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ai-main-wrapper h1 {
    font-family: "Inter", sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin: 0;
}

.ai-container {
    height: 85vh;
    margin: auto;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.025) 55%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 24px 24px 18px;
    max-height: calc(100vh - 240px);
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    box-shadow:
        0 16px 44px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}

.ai-header {
    text-align: left;
    margin-bottom: 12px;
}

.ai-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

.ai-title {
    font-family: "Inter", sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}




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

.ai-message-content {
    border: 1px solid rgba(255, 255, 255, 0.09);
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 9px;
    line-height: 1.5;
    word-wrap: break-word;
    margin-bottom: 8px;
}

.ai-message-content ul {
    margin: 0;
    padding-left: 18px;
}

.ai-message-content li {
    margin: 0 0 3px 0;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.92);
}

.ai-message-content li:last-child {
    margin-bottom: 0;
}



#chat-form {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 0;
    margin-bottom: 6px;
    flex-shrink: 0;
}

#chat-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 8px;
    border-radius: 16px;
    transition: all 0.3s ease;

    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

#chat-container::-webkit-scrollbar {
    width: 8px;
}

#chat-container::-webkit-scrollbar-track {
    background: rgba(var(--accent-rgb), 0.08);
    border-radius: 999px;
}

#chat-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

#chat-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

.ai-chat-input {
    flex: 1;
    padding: 12px 14px;
    background: rgba(5, 5, 6, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    min-height: 46px;
    font-family: "Inter", sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-chat-input:focus {
    outline: none;
    border-color: rgba(var(--accent-rgb), 0.5);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.ai-chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-send-btn {
    padding: 12px 16px;
    background: var(--accent);
    border: 1px solid var(--accent-dark);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    font-family: "Inter", sans-serif;
    min-height: 46px;
}

.ai-send-btn:hover:not(:disabled) {
    transform: none;
    background: var(--accent-light);
    box-shadow: 0 2px 12px rgba(var(--accent-rgb), 0.35);
}

.ai-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.ai-confirm-content {
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 28px;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-md);
}

.ai-confirm-content h3 {
    font-family: "Inter", sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: -0.02em;
}

.ai-confirm-details {
    background: var(--bg-dark);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    color: var(--text-primary);
    line-height: 1.8;
}

.ai-confirm-details p {
    margin: 8px 0;
}

.ai-confirm-details strong {
    color: var(--primary-purple-light);
}

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

.ai-confirm-btn,
.ai-cancel-btn {
    padding: 12px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    border: 1px solid;
}

.ai-confirm-btn {
    background: var(--accent);
    border-color: var(--accent-dark);
    color: #ffffff;
}

.ai-confirm-btn:hover:not(:disabled) {
    transform: none;
    background: var(--accent-light);
    box-shadow: 0 2px 12px rgba(var(--accent-rgb), 0.35);
}

.ai-confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-cancel-btn {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text-secondary);
}

.ai-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .page-course::after {
        content: "";
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 88px;
        pointer-events: none;
        z-index: 80;
        background: linear-gradient(180deg, rgba(9, 9, 11, 0) 0%, rgba(9, 9, 11, 0.92) 62%, rgba(9, 9, 11, 1) 100%);
    }

    .page-ai {
        padding: 0 10px 10px;
    }

    .page-ai .navbar {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .ai-container {
        width: 100%;
        max-width: none;
        margin: 0;
        margin-top: 52px;
        height: calc(100vh - 146px);
        max-height: calc(100vh - 154px);
        padding: 9px 9px 8px;
        border-radius: 10px;
    }

    .ai-title {
        font-size: 2rem;
    }

    .ai-examples {
        grid-template-columns: 1fr;
    }

    #chat-container {
        max-height: none;
        padding-bottom: 16px;
        margin-bottom: 6px;
    }

    .ai-message-content {
        max-width: 100%;
        width: 100%;
        padding: 8px 9px;
        border-radius: 8px;
        font-size: 12.5px;
        line-height: 1.4;
    }

    .message {
        max-width: 96%;
        padding: 7px 9px;
        border-radius: 12px;
        line-height: 1.3;
    }

    #chat-form {
        gap: 7px;
        margin-top: 8px;
        margin-bottom: 48px;
        position: relative;
        z-index: 120;
    }

    .ai-chat-input {
        margin-bottom: -50px;
        min-width: 0;
        font-size: 13px;
        min-height: 44px;
    }

    .ai-send-btn {
        margin-bottom: -50px;
        min-width: 66px;
        font-size: 13px;
        min-height: 44px;
    }

    .page-ai .floating-back-btn {
        bottom: max(36px, calc(14px + env(safe-area-inset-bottom, 0px)));
        right: max(14px, env(safe-area-inset-right, 0px));
        width: 46px;
        height: 46px;
        font-size: 18px;
        z-index: 110;
    }
}
/* --- Chat bubble UI --- */
.message {
    display: flex;
    padding: 8px 12px;
    border-radius: 14px;
    max-width: 85%;
    white-space: pre-wrap; /* keeps line breaks from the bot */
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
}

.message.user {
    width: fit-content;
    align-self: flex-end;
    justify-content: flex-end;
    background: rgba(var(--accent-rgb), 0.18);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.message.bot {
    width: fit-content;
    align-self: flex-start;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
}

.message.typing {
    opacity: 0.95;
}

.typing-dots {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 1em;
}

.typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: inline-block;
    animation: aiDotBounce 1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

.message.bot:not(.typewriter-done)::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 4px;
    vertical-align: -0.15em;
    background: rgba(255, 255, 255, 0.8);
    animation: aiCaretBlink 0.8s steps(1, end) infinite;
}

.message.typewriter-done::after {
    content: none;
}

.message.bot.price-quote-widget {
    display: flex;
    flex-direction: column;
    width: fit-content;
    padding: 16px 16px 14px;
    color: var(--text-primary);
    box-shadow: none;
    white-space: normal;
}

.price-widget-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.price-widget-image {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-default);
}

.price-widget-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.price-asset {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.price-symbol {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.price-main-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 10px;
}

.price-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.price-change {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.9);
}

.price-up {
    color: #4ade80;
}

.price-down {
    color: #f87171;
}

.price-flat {
    color: var(--text-accent-muted);
}

.message.bot.token-info-widget {
    display: flex;
    flex-direction: column;
    width: min(440px, 100%);
    max-width: 100%;
    padding: 14px;
    white-space: normal;
    gap: 10px;
}

.message.bot.launchpad-volume-widget {
    display: flex;
    flex-direction: column;
    width: min(560px, 100%);
    max-width: 100%;
    padding: 12px;
    gap: 10px;
    white-space: normal;
}

.message.bot.hot-tokens-widget {
    display: flex;
    flex-direction: column;
    width: min(620px, 100%);
    max-width: 100%;
    padding: 12px;
    gap: 10px;
    white-space: normal;
}

.message.bot.wallet-analysis-widget {
    display: flex;
    flex-direction: column;
    width: min(560px, 100%);
    max-width: 100%;
    padding: 12px;
    gap: 10px;
    white-space: normal;
}

.message.bot.swap-quote-widget {
    display: flex;
    flex-direction: column;
    width: min(480px, 100%);
    max-width: 100%;
    padding: 14px;
    gap: 10px;
    white-space: normal;
}

.swap-widget-summary {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.swap-widget-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-accent-muted);
}

.swap-widget-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.swap-widget-grid > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
}

.swap-widget-grid strong {
    font-size: 15px;
    color: var(--text-primary);
}

.swap-widget-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.swap-confirm-btn,
.swap-cancel-btn {
    flex: 1 1 140px;
    min-height: 42px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-default);
    font-family: inherit;
}

.swap-confirm-btn {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    border-color: rgba(34, 197, 94, 0.35);
    color: #041108;
}

.swap-cancel-btn {
    background: transparent;
    color: var(--text-secondary);
}

.swap-widget-status {
    font-size: 13px;
    color: var(--text-secondary);
}

.swap-widget-status a {
    color: var(--accent);
}

.wallet-analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.wallet-analysis-grid > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.wallet-analysis-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.wallet-stack-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.wallet-subvalue {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.wallet-balance-block {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 4px 2px 0;
}

.wallet-balance-usd {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.05;
}

.wallet-balance-sol {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.wallet-net-block {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 2px 2px 0;
}

.wallet-net-usd {
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 1.05;
}

.wallet-net-sol {
    font-size: 0.8rem;
    font-weight: 600;
}

.wallet-net-up .wallet-net-usd,
.wallet-net-up .wallet-net-sol {
    color: #4ade80;
}

.wallet-net-down .wallet-net-usd,
.wallet-net-down .wallet-net-sol {
    color: #f87171;
}

.wallet-trades-title {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.wallet-analysis-error {
    font-size: 0.8rem;
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(127, 29, 29, 0.22);
    border-radius: 8px;
    padding: 7px 8px;
}

.wallet-trades-table {
    border: 1px solid var(--border-default);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.wallet-trades-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(82px, 0.9fr) minmax(82px, 0.9fr) minmax(92px, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.wallet-trades-row:first-child {
    border-top: 0;
}

.wallet-trades-head {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wallet-trade-token {
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-trade-value,
.wallet-trade-pnl {
    justify-self: end;
    font-variant-numeric: tabular-nums;
}

.wallet-trade-value {
    color: var(--text-primary);
}

.wallet-trade-pnl {
    font-weight: 700;
}

.wallet-pnl-up {
    color: #34d399;
}

.wallet-pnl-down {
    color: #f87171;
}

.wallet-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    margin-top: 4px;
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--text-primary);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.wallet-more-btn:hover:not(:disabled) {
    background: rgba(var(--accent-rgb), 0.22);
    border-color: rgba(var(--accent-rgb), 0.55);
}

.wallet-more-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.wallet-more-arrow {
    transition: transform 160ms ease;
}

.wallet-more-btn:hover:not(:disabled) .wallet-more-arrow {
    transform: translateX(2px);
}

.wallet-more-slot {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wallet-more-slot:empty {
    display: none;
}

.wallet-deep-card {
    border: 1px solid var(--border-default);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wallet-deep-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.wallet-deep-sub {
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.wallet-deep-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.wallet-deep-empty {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.wallet-deep-big {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--text-primary);
}

.wallet-deep-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-primary);
}

.wallet-deep-key {
    color: var(--text-secondary);
}

.wallet-deep-val {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.freq-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 4px;
}

.hour-bar-chart {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 3px;
    align-items: end;
    height: 72px;
    padding: 4px 2px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hour-bar-col {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hour-bar-fill {
    width: 100%;
    min-height: 2px;
    background: rgba(var(--accent-rgb), 0.55);
    border-radius: 2px 2px 0 0;
    transition: background 120ms ease, transform 120ms ease;
}

.hour-bar-col:hover .hour-bar-fill {
    background: rgba(var(--accent-rgb), 0.85);
}

.hour-bar-peak {
    background: rgba(var(--accent-rgb), 0.95) !important;
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.35);
}

.hour-bar-axis {
    display: flex;
    justify-content: space-between;
    padding: 2px 2px 0;
    font-size: 0.64rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.day-row-chart {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.day-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 28px;
    gap: 8px;
    align-items: center;
    font-size: 0.74rem;
}

.day-row-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.day-row-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    overflow: hidden;
}

.day-row-fill {
    height: 100%;
    background: rgba(var(--accent-rgb), 0.55);
    border-radius: 999px;
    transition: width 240ms ease;
}

.day-row-peak {
    background: rgba(var(--accent-rgb), 0.95);
}

.day-row-count {
    text-align: right;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.side-wallet-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.side-wallet-row:first-of-type {
    border-top: 0;
    padding-top: 2px;
}

.side-wallet-addr {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
}

.side-wallet-addr:hover {
    text-decoration: underline;
}

.side-wallet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.side-wallet-tag {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.14);
    color: var(--text-primary);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
}

.launchpad-widget-title {
    font-size: 0.98rem;
    font-weight: 700;
}

.launchpad-widget-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.launchpad-daily {
    border: 1px solid var(--border-default);
    border-radius: 10px;
    padding: 8px 9px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.79rem;
    line-height: 1.45;
}

.launchpad-daily-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.launchpad-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.launchpad-item {
    border: 1px solid var(--border-default);
    border-radius: 10px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.02);
}

.launchpad-item-head {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.launchpad-rank {
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.launchpad-name {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: capitalize;
}

.launchpad-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 8px;
    font-size: 0.78rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.launchpad-load-btn {
    border: 1px solid rgba(var(--accent-rgb), 0.45);
    background: rgba(var(--accent-rgb), 0.12);
    color: #ffffff;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
}

.launchpad-load-btn:disabled {
    opacity: 0.75;
    cursor: default;
}

.launchpad-tokens {
    margin-top: 8px;
}

.launchpad-token-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.launchpad-token-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.78rem;
}

.launchpad-token-cards {
    gap: 8px;
    padding-left: 0;
    list-style: none;
}

.launchpad-token-card {
    border: 1px solid var(--border-default);
    border-radius: 9px;
    padding: 7px 8px;
    background: rgba(255, 255, 255, 0.02);
}

.launchpad-token-card-head {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.launchpad-token-rank {
    min-width: 20px;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.launchpad-token-main {
    display: flex;
    gap: 8px;
    align-items: center;
}

.launchpad-token-icon,
.launchpad-token-icon-fallback {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-default);
    flex-shrink: 0;
}

.launchpad-token-icon {
    object-fit: cover;
}

.launchpad-token-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: rgba(var(--accent-rgb), 0.24);
}

.launchpad-token-name-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.launchpad-token-name {
    font-weight: 600;
}

.launchpad-token-meta {
    color: var(--text-secondary);
}

.launchpad-token-list a {
    width: fit-content;
    color: var(--accent-light);
    text-decoration: none;
    font-size: 0.73rem;
    margin-top: 4px;
}

.launchpad-no-tokens {
    font-size: 0.77rem;
    color: var(--text-secondary);
}

.token-widget-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.token-widget-image {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-default);
}

.token-widget-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.token-widget-name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
}

.token-widget-symbol {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.token-widget-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.token-widget-grid > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.token-key {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.token-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
}

.token-widget-address {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-accent-muted);
    overflow-wrap: anywhere;
}

.token-widget-lore {
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--text-primary);
}

.token-widget-lore.is-empty {
    display: none;
}

.token-generate-lore-btn {
    align-self: flex-start;
    border: 1px solid rgba(var(--accent-rgb), 0.45);
    background: rgba(var(--accent-rgb), 0.12);
    color: #ffffff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    font-family: "Inter", sans-serif;
    cursor: pointer;
}

.token-generate-lore-btn:hover:not(:disabled) {
    background: rgba(var(--accent-rgb), 0.2);
}

.token-generate-lore-btn:disabled {
    opacity: 0.75;
    cursor: default;
}

.token-widget-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.token-widget-links a {
    font-size: 0.78rem;
    text-decoration: none;
    color: var(--accent-light);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    padding: 4px 8px;
    border-radius: 999px;
}

.token-widget-links a:hover {
    color: #ffffff;
    border-color: rgba(var(--accent-rgb), 0.55);
    background: rgba(var(--accent-rgb), 0.15);
}

/* â”€â”€ Trade link (green accent) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.token-trade-link {
    color: #4ade80 !important;
    border-color: rgba(74, 222, 128, 0.35) !important;
    font-weight: 600;
}
.token-trade-link:hover {
    color: #ffffff !important;
    border-color: rgba(74, 222, 128, 0.6) !important;
    background: rgba(74, 222, 128, 0.15) !important;
}

/* â”€â”€ Token widget action row â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.token-widget-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.token-bubble-map-btn {
    align-self: flex-start;
    border: 1px solid rgba(168, 85, 247, 0.5);
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    font-size: 0.78rem;
    padding: 5px 11px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.token-bubble-map-btn:hover {
    background: rgba(168, 85, 247, 0.24);
    color: #e9d5ff;
    border-color: rgba(168, 85, 247, 0.75);
}

/* â”€â”€ Bubble map modal â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.bubble-map-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(4px);
}
.bubble-map-modal-overlay.is-open {
    opacity: 1;
}

.bubble-map-modal-box {
    background: #0f0f17;
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    border-radius: 14px;
    width: min(860px, 100%);
    height: min(620px, 90vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    transform: scale(0.97);
    transition: transform 0.2s ease;
}
.bubble-map-modal-overlay.is-open .bubble-map-modal-box {
    transform: scale(1);
}

.bubble-map-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.15);
    flex-shrink: 0;
}

.bubble-map-modal-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent-light);
}

.bubble-map-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}
.bubble-map-modal-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.bubble-map-modal-body {
    flex: 1;
    overflow: hidden;
}

.bubble-map-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

@media (max-width: 768px) {
    .bubble-map-modal-box {
        height: 90vh;
        border-radius: 10px;
    }
}

@media (max-width: 768px) {
    .message.bot.price-quote-widget {
        min-width: 0;
        max-width: 100%;
        width: fit-content;
        padding: 14px;
        border-radius: 12px;
    }

    .price-asset {
        font-size: 1.05rem;
    }

    .price-symbol {
        font-size: 0.74rem;
    }

    .price-value {
        font-size: 1.7rem;
    }

    .price-change {
        font-size: 0.82rem;
    }

    .message.bot.token-info-widget {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        gap: 8px;
        border-radius: 10px;
    }

    .token-widget-header {
        gap: 8px;
    }

    .token-widget-image {
        width: 34px;
        height: 34px;
    }

    .token-widget-name {
        font-size: 0.95rem;
    }

    .token-widget-symbol {
        font-size: 0.74rem;
    }

    .token-widget-grid > div {
        padding: 7px;
        border-radius: 7px;
    }

    .token-key {
        font-size: 0.66rem;
    }

    .token-value {
        font-size: 0.84rem;
    }

    .token-widget-address {
        font-size: 0.68rem;
    }

    .token-generate-lore-btn {
        padding: 5px 9px;
        font-size: 0.72rem;
    }

    .token-widget-links {
        gap: 6px;
    }

    .token-widget-links a {
        font-size: 0.72rem;
        padding: 3px 7px;
    }

    .token-widget-grid {
        grid-template-columns: 1fr;
    }

    .message.bot.launchpad-volume-widget {
        width: 100%;
        padding: 10px;
        border-radius: 10px;
    }

    .message.bot.hot-tokens-widget {
        width: 100%;
        padding: 10px;
        border-radius: 10px;
    }

    .message.bot.wallet-analysis-widget {
        width: 100%;
        padding: 10px;
        border-radius: 10px;
    }

    .wallet-trades-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .wallet-trades-row {
        min-width: 440px;
    }

    .wallet-trades-head span {
        white-space: nowrap;
    }

    .hour-bar-chart {
        height: 60px;
        gap: 2px;
    }

    .hour-bar-axis {
        font-size: 0.6rem;
    }

    .day-row {
        grid-template-columns: 32px minmax(0, 1fr) 24px;
        font-size: 0.7rem;
    }

    .wallet-deep-big {
        font-size: 1.32rem;
    }

    .wallet-more-btn {
        font-size: 0.82rem;
    }

    .wallet-analysis-grid {
        grid-template-columns: 1fr;
    }

    .wallet-analysis-stack {
        grid-template-columns: 1fr;
    }

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


@keyframes aiDotBounce {
    0%, 80%, 100% {
        transform: scale(0.7);
        opacity: 0.45;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes aiCaretBlink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

#chat-form input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Demo trading board */
.page-demo-trading {
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    --demo-vignette-bg: var(--bg-dark);
}

.page-demo-trading .navbar,
.page-demo-trading .floating-back-btn,
.page-demo-trading .noise-overlay {
    display: none !important;
}

.demo-board-main {
    margin-top: calc(var(--landing-header-clearance, 108px) + 12px);
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: min(1600px, calc(100vw - 32px));
    margin-left: auto;
    margin-right: auto;
    padding: 0 clamp(12px, 2vw, 20px) 16px;
    height: calc(100dvh - var(--landing-header-clearance, 108px) - 20px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.page-demo-trading .landing-nav--demo,
.page-demo-trading .landing-nav {
    display: grid;
    grid-template-columns: auto auto auto;
    justify-content: space-between;
    align-items: center;
    gap: 10px 16px;
    max-width: min(1600px, calc(100vw - 32px));
}

.page-demo-trading .landing-nav__search,
.page-demo-trading .token-search {
    min-width: 0;
    width: 220px;
    max-width: 220px;
    margin: 0;
}

.page-demo-trading .landing-nav__actions {
    flex-shrink: 0;
}

.demo-mobile-tabs {
    display: none;
}

.demo-board-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    flex: 1;
    min-height: 0;
    height: auto;
}

.demo-board-column {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: #0c0c0e;
    padding: 0;
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.demo-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px 13px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.35);
}

.demo-board-title {
    font-size: 16px;
    line-height: 1.2;
    font-weight: 600;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-primary);
}

.lp-filter {
    display: inline-flex;
    gap: 3px;
    padding: 2px;
    background: transparent;
    border: none;
    border-radius: 8px;
}

.lp-chip {
    min-width: 26px;
    height: 22px;
    padding: 0 6px;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: transparent;
    color: var(--text-accent-muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 120ms ease, border-color 120ms ease, background 120ms ease;
}

.lp-chip:hover {
    opacity: 0.8;
}

.lp-chip.is-active {
    opacity: 1;
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.22);
    color: var(--text-primary);
}

.demo-token-tag--lp {
    gap: 0;
}

.demo-token-tag--bonk {
    background: rgba(255, 153, 51, 0.2);
    border-color: rgba(255, 153, 51, 0.55);
}

.demo-token-tag--bags {
    background: rgba(255, 214, 102, 0.2);
    border-color: rgba(255, 214, 102, 0.55);
}

.demo-token-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    min-height: 0;
    flex: 1;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb), 0.35) transparent;
}

.demo-token-list::-webkit-scrollbar {
    width: 5px;
}

.demo-token-list::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb), 0.3);
    border-radius: 999px;
}

.demo-token-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px 14px;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    padding: 14px 16px;
    background: transparent;
}

.demo-token-row:last-child {
    border-bottom: none;
}

.demo-token-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 72px;
    flex-shrink: 0;
}

.demo-token-icon {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-block;
    object-fit: cover;
}

.demo-token-mint {
    font-size: 11px;
    line-height: 1.2;
    color: var(--text-accent-muted);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: ui-monospace, "Cascadia Code", monospace;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-token-mint:hover {
    color: rgba(var(--accent-rgb), 0.9);
}

.demo-token-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-token-line1 {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.demo-token-line2 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.demo-token-ticker {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.demo-token-name {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.demo-token-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 22px;
    background: transparent;
    border: none;
    color: var(--text-accent-muted);
    font-size: 9px;
    border-radius: 0;
    width: fit-content;
    padding: 2px 4px;
    cursor: pointer;
    font-family: ui-monospace, "Cascadia Code", monospace;
}

.demo-token-copy:hover {
    color: rgba(var(--accent-rgb), 0.9);
    border-color: transparent;
}

.demo-token-copy__icon {
    font-size: 11px;
    line-height: 1;
}

.demo-token-copy.is-copied {
    color: var(--profit);
}

@media (max-width: 760px) {
    .page-demo-trading .demo-token-copy {
        min-width: 58px;
        min-height: 28px;
        padding: 4px 6px;
        border: 1px solid var(--border-subtle);
        border-radius: 7px;
        background: rgba(255, 255, 255, 0.025);
        font-size: 9px;
        touch-action: manipulation;
    }
}

.demo-token-age {
    color: rgba(var(--accent-rgb), 0.85);
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.demo-token-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.demo-token-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-height: 26px;
    padding: 0;
    border-radius: 6px;
    color: var(--text-secondary);
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    flex-shrink: 0;
    transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.demo-tag-icon {
    width: 14px;
    height: 14px;
    display: block;
}

.demo-token-tag:hover {
    color: var(--text-primary);
    background: rgba(var(--accent-rgb), 0.15);
    border-color: rgba(var(--accent-rgb), 0.3);
}

.demo-token-tag--pump {
    color: rgba(var(--accent-rgb), 0.95);
    background: rgba(var(--accent-rgb), 0.12);
    border-color: rgba(var(--accent-rgb), 0.28);
}

.demo-token-tag--pump:hover {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.2);
}

.demo-token-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.demo-token-cap {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
}

.demo-cap-vol {
    display: block;
    line-height: 1.2;
    color: rgba(var(--accent-rgb), 0.92);
    font-size: 15px;
    font-weight: 600;
}

.demo-cap-mc {
    display: block;
    line-height: 1.2;
    color: #fbbf24;
    font-size: 15px;
    font-weight: 600;
}

.demo-token-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-radius: 9px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    font-family: "Inter", sans-serif;
    line-height: 1;
    min-width: 92px;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 2px 8px rgba(37, 99, 235, 0.35);
    transition: filter 0.12s ease, transform 0.12s ease;
}

.demo-buy-bolt {
    font-size: 15px;
    line-height: 1;
}

.demo-token-buy:hover {
    filter: brightness(1.08);
}

.demo-token-buy:active {
    transform: scale(0.97);
}

.demo-token-buy:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: none;
}

.page-demo-trading .floating-back-btn {
    display: none !important;
}

@media (max-width: 900px) {
    .page-demo-trading {
        overflow: auto;
    }

    .demo-board-main {
        height: auto;
        min-height: calc(100dvh - var(--landing-header-clearance, 108px) - 20px);
        max-width: none;
    }

    .demo-mobile-tabs {
        display: flex;
        gap: 8px;
        margin: 0 0 12px;
        padding: 5px;
        background: var(--surface-elevated);
        border: 1px solid var(--border-default);
        border-radius: 14px;
    }

    .demo-tab-btn {
        flex: 1;
        background: transparent;
        border: none;
        color: var(--text-accent-muted);
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 0.01em;
        line-height: 1.2;
        text-transform: none;
        font-family: "Inter", sans-serif;
        cursor: pointer;
        padding: 13px 16px;
        min-height: 48px;
        border-radius: 10px;
        transition: background 0.15s, color 0.15s;
    }

    .demo-tab-btn.is-active {
        color: var(--text-primary);
        background: rgba(var(--accent-rgb), 0.1);
    }

    .demo-board-columns {
        grid-template-columns: 1fr;
        height: auto;
    }

    .demo-board-column {
        display: none;
        height: auto;
        min-height: 0;
    }

    .demo-board-column.is-active {
        display: flex;
    }

    .demo-board-title {
        display: none;
    }

    .demo-token-list {
        overflow: visible;
    }

    .demo-token-row {
        grid-template-columns: 80px minmax(0, 1fr) auto;
        gap: 12px 14px;
        padding: 14px 12px;
        align-items: start;
    }

    .demo-token-identity {
        width: 80px;
    }

    .demo-token-icon {
        width: 72px;
        height: 72px;
        border-radius: 10px;
    }

    .demo-token-ticker {
        font-size: 19px;
    }

    .demo-token-name {
        font-size: 16px;
    }

    .demo-token-age {
        font-size: 15px;
    }

    .demo-cap-vol,
    .demo-cap-mc {
        font-size: 16px;
    }

    .demo-token-buy {
        padding: 12px 18px;
        font-size: 15px;
        min-width: 96px;
    }
}

/* ── paper redesign: minimal professional UI with dark/light themes ── */

body {
    background: var(--bg-dark);
    transition: background 0.3s ease, color 0.3s ease;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: var(--noise-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.background-pattern {
    opacity: 0;
    display: none;
}

.cursor-glow {
    opacity: 0.5;
    background: radial-gradient(600px circle at var(--x, 50%) var(--y, 50%), rgba(var(--accent-rgb), 0.06), transparent 70%);
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 14px;
    left: 20px;
    right: 20px;
    z-index: 100;
    min-height: 0;
    height: auto;
    padding: 8px 18px;
    background: var(--nav-bg);
    border: 1px solid var(--border-default);
    border-radius: 999px;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: var(--shadow-sm);
    transition: background 0.3s ease, border-color 0.3s ease;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    margin: 0;
    animation: none;
}

.navbar:hover {
    border-color: var(--border-strong);
    background: var(--nav-bg);
    box-shadow: var(--shadow-sm);
}

.navbar--landing {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
    left: 20px;
    right: 20px;
}

.navbar .btn,
.navbar .nav-connect-btn {
    margin: 0;
    min-width: 0;
    min-height: 34px;
    padding: 6px 14px;
    font-size: 13px;
    box-shadow: none;
}

.nav-connect-btn {
    margin: 0;
    min-height: 34px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-default);
    background: var(--glass);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.nav-connect-btn:hover {
    border-color: var(--border-strong);
    background: var(--surface-elevated);
}

.nav-connect-btn.wallet-connected-pill {
    background: rgba(var(--accent-rgb), 0.1);
    border-color: rgba(var(--accent-rgb), 0.28);
    color: var(--accent-light);
}

.nav-links-left {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links-left a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.nav-links-left a:hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.nav-link-ghost {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-link-ghost:hover {
    color: var(--text-primary);
    background: var(--glass);
}

.nav-icon-link {
    display: flex;
    align-items: center;
    padding: 4px;
    line-height: 0;
}

.nav-icon-link .x-icon {
    width: 18px;
    height: 18px;
}

.theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--border-default);
    background: var(--glass);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
    border-color: var(--border-strong);
    background: var(--surface-elevated);
}

[data-theme="light"] .x-icon {
    filter: none;
    opacity: 0.7;
}

.nav-logo {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    line-height: 1;
}

.navbar--app {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.page-demo-trading .navbar--app {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.page-demo-trading .token-search {
    max-width: none;
    width: 100%;
    margin: 0;
}

.demo-board-main {
    margin-top: calc(var(--landing-header-clearance, 108px) + 12px);
}

.nav-logo::before {
    display: none;
}

.ca-badge {
    border-color: rgba(var(--accent-rgb), 0.35);
    background: rgba(var(--accent-rgb), 0.08);
    font-size: 12px;
    padding: 7px 12px;
}

/* Buttons */
.btn,
.auth-btn,
.primary-btn {
    margin: 0;
    min-width: 0;
    min-height: 42px;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    backdrop-filter: none;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    line-height: 1.2;
    width: auto;
    position: relative;
}

.btn-primary,
.auth-btn.primary-btn {
    background: var(--text-primary);
    color: var(--bg-dark);
    border-color: var(--text-primary);
}

.btn-primary:hover,
.auth-btn.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background: var(--text-primary);
    border-color: var(--text-primary);
}

[data-theme="light"] .btn-primary,
[data-theme="light"] .auth-btn.primary-btn {
    background: #0f172a;
    color: #f8fafc;
    border-color: #0f172a;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-primary);
}

.btn-lg {
    min-height: 48px;
    padding: 12px 28px;
    font-size: 15px;
}

/* Landing page (PvX-inspired) */
.page-home {
    overflow-x: hidden;
}

.landing-glow,
.landing-ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% -10%, rgba(var(--accent-rgb), 0.12), transparent 60%),
        radial-gradient(ellipse 40% 30% at 80% 80%, rgba(var(--accent-secondary-rgb), 0.06), transparent 50%);
}

.landing-main {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

.landing-screen {
    min-height: 100dvh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 0 48px;
    text-align: center;
}

.landing-hero {
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-default);
    background: var(--glass);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-accent-muted);
    margin-bottom: 24px;
}

.badge-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(var(--profit-rgb), 0.12);
    color: var(--profit);
    font-size: 10px;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.landing-headline {
    font-size: clamp(38px, 5.2vw, 58px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.landing-sub {
    font-size: clamp(16px, 1.9vw, 18px);
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 28px;
}

.landing-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.landing-learn-more {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.landing-learn-more:hover {
    color: var(--text-primary);
}

.landing-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}

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

.landing-stat strong {
    display: block;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.landing-stat span {
    font-size: 12px;
    color: var(--text-accent-muted);
    font-weight: 500;
}

/* Landing platform — immersive fullscreen scroll */
.landing-platform {
    position: relative;
    z-index: 2;
    width: 100%;
}

.landing-platform-scenes {
    height: 350vh;
    position: relative;
}

.landing-platform-viewport {
    position: sticky;
    top: 0;
    height: 100dvh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 88px 24px 48px;
}

.platform-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.platform-ambient-layer {
    position: absolute;
    inset: -10%;
    opacity: 0;
    will-change: opacity, transform;
}

.platform-ambient-layer[data-index="0"] {
    background:
        radial-gradient(ellipse 55% 45% at 72% 38%, rgba(var(--accent-rgb), 0.16), transparent 65%),
        radial-gradient(ellipse 40% 35% at 20% 70%, rgba(var(--accent-secondary-rgb), 0.08), transparent 60%);
}

.platform-ambient-layer[data-index="1"] {
    background:
        radial-gradient(ellipse 50% 50% at 68% 42%, rgba(var(--profit-rgb), 0.1), transparent 62%),
        radial-gradient(ellipse 45% 40% at 25% 65%, rgba(var(--accent-rgb), 0.12), transparent 58%);
}

.platform-ambient-layer[data-index="2"] {
    background:
        radial-gradient(ellipse 52% 48% at 70% 40%, rgba(var(--accent-rgb), 0.12), transparent 62%),
        radial-gradient(ellipse 42% 38% at 22% 68%, rgba(var(--accent-rgb), 0.1), transparent 58%);
}

.landing-platform-inner {
    position: relative;
    z-index: 1;
    width: min(1160px, 100%);
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(340px, 1.15fr);
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
}

.landing-platform-aside {
    position: relative;
}

.landing-platform-title {
    font-size: clamp(28px, 3.6vw, 44px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--text-primary);
    margin: 0;
    max-width: 13ch;
}

.landing-platform-panels {
    position: relative;
    min-height: 240px;
    margin-top: 32px;
}

.platform-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    will-change: opacity, transform, filter;
}

.platform-panel-index {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 14px;
}

.platform-panel h3 {
    font-size: clamp(24px, 2.8vw, 32px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin: 0 0 14px;
    line-height: 1.12;
}

.platform-panel p {
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 22px;
    max-width: 36ch;
}

.platform-panel-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-light);
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}

.platform-panel-link:hover {
    gap: 12px;
    color: var(--text-primary);
}

.platform-dots {
    display: flex;
    gap: 10px;
    margin-top: 36px;
}

.platform-dot {
    width: 28px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background 0.35s ease, width 0.35s ease, opacity 0.2s ease;
}

.platform-dot:hover {
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.22);
}

.platform-dot.is-active {
    width: 44px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.scene-stage {
    position: relative;
    width: 100%;
    height: min(68vh, 460px);
    min-height: 340px;
    perspective: 1600px;
}

.platform-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    will-change: opacity, transform, filter;
}

.platform-card-shell {
    position: relative;
    display: block;
    width: min(100%, 540px);
    text-decoration: none;
    color: inherit;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.08) 0%, transparent 44%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.25));
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.platform-card-shell--accent {
    border-color: rgba(var(--accent-rgb), 0.28);
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.42),
        0 0 60px rgba(var(--accent-rgb), 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.platform-card-shell:hover {
    border-color: rgba(var(--accent-rgb), 0.45);
}

.platform-card-glow {
    position: absolute;
    inset: -25%;
    background: radial-gradient(circle at 50% 28%, rgba(var(--accent-rgb), 0.22), transparent 58%);
    opacity: 0.85;
    pointer-events: none;
    z-index: 0;
}

.landing-platform--simple .landing-platform-scenes {
    height: auto;
}

.landing-platform--simple .landing-platform-viewport {
    position: relative;
    height: auto;
    min-height: auto;
    padding: 64px 24px;
}

.landing-platform--simple .landing-platform-inner {
    grid-template-columns: 1fr;
    gap: 32px;
}

.landing-platform--simple .landing-platform-panels {
    min-height: 0;
}

.landing-platform--simple .platform-panel {
    position: relative;
    display: none;
}

.landing-platform--simple .platform-panel:first-child {
    display: block;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
}

.landing-platform--simple .scene-stage {
    height: auto;
    min-height: 0;
}

.landing-platform--simple .platform-slide {
    position: relative;
    display: none;
    margin-bottom: 20px;
}

.landing-platform--simple .platform-slide:first-child {
    display: flex;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
}

.platform-preview {
    position: relative;
    z-index: 1;
}

.platform-preview-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

.platform-preview-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.platform-preview-bar span:first-child { background: rgba(248, 113, 113, 0.55); }
.platform-preview-bar span:nth-child(2) { background: rgba(251, 191, 36, 0.55); }
.platform-preview-bar span:nth-child(3) { background: rgba(52, 211, 153, 0.55); }

.platform-preview-bar em {
    margin-left: auto;
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-accent-muted);
}

.platform-preview-content {
    padding: 24px;
    min-height: 280px;
}

/* Training preview */
.lesson-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    font-size: 14px;
    color: var(--text-secondary);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.lesson-row i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.lesson-row span { flex: 1; }

.lesson-row small {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-accent-muted);
}

.lesson-row.is-done {
    opacity: 0.55;
}

.lesson-row.is-done i {
    background: var(--profit);
}

.lesson-row.is-active {
    border-color: rgba(var(--accent-rgb), 0.35);
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--text-primary);
}

.lesson-row.is-active i {
    background: var(--accent-light);
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
}

/* Demo preview */
.board-stat {
    margin-bottom: 20px;
}

.board-stat strong {
    display: block;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--profit);
    line-height: 1;
    margin-bottom: 4px;
}

.board-stat span {
    font-size: 13px;
    color: var(--text-accent-muted);
}

.board-chart {
    height: 80px;
    margin-bottom: 20px;
    color: var(--accent-light);
    opacity: 0.85;
}

.board-chart svg {
    width: 100%;
    height: 100%;
}

.board-tokens {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.board-tokens span {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.board-tokens b {
    margin-left: 6px;
    color: var(--profit);
    font-weight: 700;
}

.board-tokens span:last-child b {
    color: var(--loss);
}

/* AI preview */
.chat-bubble {
    max-width: 92%;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.chat-bubble--user {
    margin-left: auto;
    background: rgba(var(--accent-rgb), 0.15);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
}

.chat-bubble--ai {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-bottom-left-radius: 4px;
}

.chat-input-fake {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    font-size: 13px;
    color: var(--text-accent-muted);
}

.landing-features {
    width: 100%;
}

.landing-features-head {
    text-align: center;
    margin-bottom: 36px;
}

.section-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.landing-features-head h2 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    perspective: 1200px;
}

.feature-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    transform-style: preserve-3d;
}

a.feature-card {
    text-decoration: none;
    color: inherit;
}

.feature-card-inner {
    position: relative;
    height: 100%;
    min-height: 260px;
    transform-style: preserve-3d;
}

.feature-card-edge {
    position: absolute;
    inset: 8px 0 0;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(var(--accent-deep-rgb), 0.12));
    transform: translateY(12px) translateZ(-24px) scale(0.96);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 32px 48px rgba(0, 0, 0, 0.35);
}

.feature-card-face {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 260px;
    padding: 28px 24px;
    border-radius: 20px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, transparent 45%),
        linear-gradient(180deg, var(--surface-elevated), var(--surface));
    border: 1px solid var(--border-default);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    transform: translateZ(16px);
    overflow: hidden;
}

.feature-card-face::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.feature-card-face--accent {
    border-color: rgba(var(--accent-rgb), 0.28);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.32),
        0 0 40px rgba(var(--accent-rgb), 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.feature-icon-ring {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    color: var(--accent-light);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.feature-icon-ring svg {
    width: 26px;
    height: 26px;
}

.feature-card-face h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card-face p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
}

.footer--landing {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border-subtle);
    background: transparent;
}

/* Wallet connect modal */
body.wallet-modal-open {
    overflow: hidden;
}

.wallet-modal-root {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: wallet-modal-fade 0.22s ease;
}

@keyframes wallet-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wallet-modal-root[hidden] {
    display: none !important;
}

.wallet-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(2, 6, 14, 0.72);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    cursor: pointer;
}

[data-theme="light"] .wallet-modal-backdrop {
    background: rgba(15, 23, 42, 0.4);
}

.wallet-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(400px, 100%);
    max-height: min(86vh, 560px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 48px),
        var(--surface);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.35),
        0 24px 48px rgba(0, 0, 0, 0.45),
        0 64px 120px rgba(0, 0, 0, 0.35);
    animation: wallet-modal-rise 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] .wallet-modal-dialog {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.04),
        0 24px 48px rgba(15, 23, 42, 0.12),
        0 64px 120px rgba(15, 23, 42, 0.08);
}

@keyframes wallet-modal-rise {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wallet-modal-accent {
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--accent-rgb), 0.65) 35%,
        rgba(var(--accent-secondary-rgb), 0.45) 65%,
        transparent
    );
    pointer-events: none;
}

.wallet-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 18px;
}

.wallet-modal-header-text {
    min-width: 0;
}

.wallet-modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 0 0 4px;
    line-height: 1.2;
}

.wallet-modal-sub {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary);
    margin: 0;
}

.wallet-modal-close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-top: 2px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.wallet-modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-default);
}

.wallet-modal-body {
    padding: 0 14px 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.wallet-modal-body::-webkit-scrollbar {
    width: 5px;
}

.wallet-modal-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.wallet-modal-msg {
    margin: 10px 8px 0;
    font-size: 12px;
    line-height: 1.45;
    padding: 10px 12px;
    border-radius: 12px;
    text-align: center;
}

.wallet-modal-msg[hidden] {
    display: none !important;
}

.wallet-modal-msg.is-loading {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
}

.wallet-modal-msg.is-success {
    color: var(--profit);
    background: rgba(var(--profit-rgb), 0.1);
}

.wallet-modal-msg.is-error {
    color: #f87171;
    background: rgba(var(--loss-rgb), 0.08);
    border: 1px solid rgba(var(--loss-rgb), 0.15);
}

.wallet-connected-panel {
    margin: 0 8px 14px;
}

.wallet-connected-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb), 0.12) 0%, rgba(var(--accent-rgb), 0.04) 100%);
}

.wallet-connected-logo {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.wallet-connected-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wallet-connected-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.wallet-connected-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.wallet-connected-addr {
    font-size: 12px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    color: var(--accent-light);
    letter-spacing: 0.02em;
}

.wallet-disconnect-btn {
    flex-shrink: 0;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid rgba(var(--loss-rgb), 0.22);
    background: transparent;
    color: rgba(248, 113, 113, 0.9);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.wallet-disconnect-btn:hover {
    background: rgba(var(--loss-rgb), 0.1);
    border-color: rgba(var(--loss-rgb), 0.35);
}

.wallet-username-reminder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 11px 12px 11px 14px;
    border-radius: 14px;
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    background: rgba(var(--accent-rgb), 0.07);
}

.wallet-username-reminder[hidden] {
    display: none;
}

.wallet-username-reminder__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wallet-username-reminder__text strong {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
}

.wallet-username-reminder__text span {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.35;
}

.wallet-add-username-btn {
    flex-shrink: 0;
    padding: 7px 10px;
    border: 1px solid rgba(var(--accent-rgb), 0.28);
    border-radius: 9px;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--text-primary);
    font: 600 11px/1.2 inherit;
    cursor: pointer;
}

.wallet-add-username-btn:hover {
    background: rgba(var(--accent-rgb), 0.2);
}

.wallet-username-panel {
    margin: 0 8px 14px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    background: rgba(var(--accent-rgb), 0.06);
}

.wallet-username-hint {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.wallet-username-field {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 14px;
    margin-bottom: 8px;
    border-radius: 12px;
    border: 1px solid var(--border-default);
    background: var(--surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wallet-username-field:focus-within {
    border-color: rgba(var(--accent-rgb), 0.45);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.wallet-username-prefix {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-accent-muted);
    user-select: none;
}

.wallet-username-field input {
    flex: 1;
    min-width: 0;
    padding: 12px 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.wallet-username-field input::placeholder {
    color: var(--text-accent-muted);
    opacity: 0.7;
}

.wallet-username-rules {
    margin: 0 0 14px;
    font-size: 11px;
    color: var(--text-accent-muted);
}

.wallet-username-submit {
    width: 100%;
    margin: 0;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
}

.wallet-section {
    margin-bottom: 12px;
    padding: 0 8px;
}

.wallet-section--list {
    margin-bottom: 0;
}

.wallet-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-accent-muted);
    margin: 0 0 8px 4px;
    letter-spacing: 0.04em;
}

.wallet-list,
.wallet-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.wallet-option:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.wallet-option:active {
    transform: translateY(0);
}

.wallet-option.is-current {
    border-color: rgba(var(--accent-rgb), 0.35);
    background: rgba(var(--accent-rgb), 0.08);
    pointer-events: none;
}

.wallet-option.is-uninstalled {
    opacity: 0.55;
}

.wallet-option.is-uninstalled:hover {
    opacity: 0.72;
}

.wallet-option-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.wallet-option-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wallet-option-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.wallet-option-name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.wallet-option-desc {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.3;
}

.wallet-option.is-current .wallet-option-desc {
    color: var(--accent-light);
}

.wallet-option-chevron {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    color: var(--text-accent-muted);
    opacity: 0.7;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.wallet-option:hover .wallet-option-chevron {
    opacity: 1;
    transform: translateX(2px);
}

.btn-sm {
    min-height: 36px;
    padding: 8px 16px;
    font-size: 13px;
}

.wallet-connected-pill {
    border-radius: 999px !important;
    background: rgba(var(--accent-rgb), 0.1) !important;
    border: 1px solid rgba(var(--accent-rgb), 0.28) !important;
    color: var(--accent-light) !important;
    font-weight: 600;
}

/* Dashboard */
.page-dashboard {
    min-height: 100vh;
    background: var(--bg-darker);
    color: var(--text-primary);
    font-family: "Inter", sans-serif;
}

[data-theme="light"] .page-dashboard {
    background:
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(var(--accent-rgb), 0.07), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #fafafa 42%, #f1f5f9 100%);
}

.page-dashboard .navbar,
.page-dashboard .noise-overlay,
.page-dashboard .dashboard-ambient,
.page-dashboard .floating-back-btn {
    display: none !important;
}

.dashboard-shell {
    width: 100%;
}

.dashboard-hero {
    text-align: center;
    margin-bottom: 44px;
}

.dashboard-hero__badge {
    margin-bottom: 20px;
}

.dashboard-hero__badge .lp-badge__text {
    letter-spacing: 0.1em;
}

.dashboard-greeting {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 10px;
    text-align: center;
}

.dashboard-sub {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 0;
    line-height: 1.5;
}

[data-theme="light"] .page-dashboard .dashboard-sub {
    color: #52525b;
}

.dashboard-main {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    padding: calc(88px + 32px) clamp(20px, 4vw, 32px) clamp(148px, 14vw, 180px);
}

.page-dashboard .dash-grid[hidden] {
    display: none !important;
}

.dash-lb-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
    gap: 20px;
    align-items: stretch;
    max-width: 980px;
    margin: 0 auto clamp(72px, 10vw, 110px);
}

.dash-lb-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--border-default);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        rgba(12, 15, 22, 0.82);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 24px 70px rgba(0, 0, 0, 0.3);
}

.dash-lb-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 0%, rgba(var(--accent-rgb), 0.14), transparent 34%),
        radial-gradient(circle at 100% 0%, rgba(74, 222, 128, 0.12), transparent 36%);
}

.dash-lb-card--main {
    padding: 22px;
}

.dash-lb-card--info {
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.dash-lb-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.dash-lb-kicker {
    display: inline-flex;
    color: var(--accent-light);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dash-lb-head h2,
.dash-lb-card--info h3 {
    margin: 6px 0 0;
    color: var(--text-primary);
    font-size: clamp(22px, 3vw, 30px);
    letter-spacing: -0.03em;
}

.dash-lb-card--info h3 {
    font-size: 24px;
    line-height: 1.15;
}

.dash-lb-card--info p {
    position: relative;
    z-index: 1;
    margin: 14px 0 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
}

.dash-lb-reset {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--profit);
    background: rgba(var(--profit-rgb), 0.1);
    border: 1px solid rgba(var(--profit-rgb), 0.22);
    font-size: 12px;
    font-weight: 800;
}

.dash-lb-table {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
}

.dash-lb-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 110px 100px;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 0 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.dash-lb-row--head {
    min-height: auto;
    padding: 0 14px 4px;
    background: transparent;
    border: 0;
    color: var(--text-accent-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.dash-lb-rank {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.dash-lb-row--gold .dash-lb-rank { color: #fbbf24; }
.dash-lb-row--silver .dash-lb-rank { color: #cbd5e1; }
.dash-lb-row--bronze .dash-lb-rank { color: #d97706; }

.dash-lb-trader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--text-primary);
    font-weight: 800;
}

.dash-lb-trader i {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}

.dash-lb-row--silver .dash-lb-trader i {
    background: linear-gradient(135deg, #94a3b8, #475569);
}

.dash-lb-row--bronze .dash-lb-trader i {
    background: linear-gradient(135deg, #f59e0b, #92400e);
}

.dash-lb-pnl,
.dash-lb-reward {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.dash-lb-pnl.is-up {
    color: var(--profit);
}

.dash-lb-reward {
    color: var(--text-primary);
}

.dash-reward-stack {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    margin-top: auto;
}

.dash-reward-stack div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-reward-stack span {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
}

.dash-reward-stack strong {
    color: var(--profit);
    font-size: 14px;
}

.dash-lb-cta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 16px;
    border-radius: 999px;
    color: #04130b;
    background: var(--profit);
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
}

[data-theme="light"] .dash-lb-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 240, 250, 0.84)),
        rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 24px 68px rgba(15, 23, 42, 0.14);
}

[data-theme="light"] .dash-lb-row {
    background: rgba(255, 255, 255, 0.62);
    border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .dash-lb-row--head {
    background: transparent;
    border: 0;
}

[data-theme="light"] .dash-reward-stack div {
    background: rgba(255, 255, 255, 0.62);
    border-color: rgba(15, 23, 42, 0.08);
}

.dash-lb-panel {
    display: block;
    max-width: 1088px;
    margin: 0 auto clamp(76px, 10vw, 112px);
}

.dash-lb-hero {
    margin: 0 auto 56px;
    text-align: center;
}

.dash-lb-hero h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(42px, 6vw, 64px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.dash-lb-hero h2 span {
    color: #8b5cf6;
}

.dash-lb-hero p {
    margin: 18px auto 0;
    color: #aeb8d6;
    font-size: 16px;
    line-height: 1.5;
}

.dash-lb-prizes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.dash-lb-prizes strong,
.dash-lb-prizes em {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: #dbe7ff;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.24);
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.dash-lb-prizes em {
    color: var(--profit);
    background: rgba(var(--profit-rgb), 0.1);
    border-color: rgba(var(--profit-rgb), 0.22);
}

.dash-lb-card.dash-lb-card--main {
    padding: 0;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #161617;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.dash-lb-card.dash-lb-card--main::before {
    display: none;
}

.dash-lb-table {
    display: block;
    width: 100%;
}

.dash-lb-row {
    display: grid;
    grid-template-columns: 150px minmax(240px, 1.2fr) 140px 150px 160px;
    min-height: 82px;
    padding: 0 26px;
    gap: 18px;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #181818;
}

.dash-lb-row:last-child {
    border-bottom: 0;
}

.dash-lb-row--head {
    min-height: 48px;
    background: #181818;
    color: #9fb0f3;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.dash-lb-row--gold {
    background: #211c26;
}

.dash-lb-rank {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 900;
}

.dash-lb-rank--crown::before,
.dash-lb-rank--medal::before {
    content: "";
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m5 16-2-9 5 4 4-7 4 7 5-4-2 9H5Zm1 4v-2h12v2H6Z'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m5 16-2-9 5 4 4-7 4 7 5-4-2 9H5Zm1 4v-2h12v2H6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.dash-lb-rank--medal::before {
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M7 3h4l1 4 1-4h4l-3 7a5 5 0 1 1-4 0L7 3Zm5 17a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M7 3h4l1 4 1-4h4l-3 7a5 5 0 1 1-4 0L7 3Zm5 17a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.dash-lb-row--gold .dash-lb-rank { color: #facc15; }
.dash-lb-row--silver .dash-lb-rank { color: #00e5a8; }
.dash-lb-row--bronze .dash-lb-rank { color: #00e5a8; }

.dash-lb-trader {
    display: grid;
    grid-template-columns: 38px minmax(0, max-content) 1fr;
    column-gap: 12px;
    align-items: center;
    color: #ffffff;
}

.dash-lb-trader i {
    grid-row: span 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.dash-lb-trader b {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.dash-lb-trader b::after {
    content: "";
    width: 19px;
    height: 19px;
    margin-left: 8px;
    border: 2px solid #00e58a;
    border-radius: 50%;
    background:
        linear-gradient(135deg, transparent 0 48%, #00e58a 48% 60%, transparent 60%) 7px 9px / 7px 7px no-repeat;
}

.dash-lb-trader small {
    grid-column: 2 / -1;
    color: #aab5d5;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.dash-lb-stat,
.dash-lb-pnl,
.dash-lb-reward {
    color: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    font-weight: 900;
    text-align: right;
}

.dash-lb-pnl.is-up,
.dash-lb-reward {
    color: #8b5cf6;
}

[data-theme="light"] .dash-lb-hero h2 {
    color: #111827;
}

[data-theme="light"] .dash-lb-hero p {
    color: #64748b;
}

[data-theme="light"] .dash-lb-card.dash-lb-card--main,
[data-theme="light"] .dash-lb-row,
[data-theme="light"] .dash-lb-row--head {
    background: #171719;
    border-color: rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .dash-lb-row--gold {
    background: #211c26;
}

@media (max-width: 820px) {
    .dash-lb-card.dash-lb-card--main {
        overflow-x: auto;
    }

    .dash-lb-row {
        min-width: 840px;
    }
}

/* Calmer Paper leaderboard list */
.dash-lb-panel {
    max-width: 860px;
}

.dash-lb-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 12px;
}

.dash-lb-hero h2 {
    color: var(--text-primary);
    font-size: clamp(22px, 3vw, 30px);
    letter-spacing: -0.02em;
}

.dash-lb-hero h2 span {
    color: var(--accent);
}

.dash-lb-hero p {
    grid-column: 1;
    margin: 5px 0 0;
    max-width: 36ch;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.dash-lb-prizes {
    grid-column: 2;
    grid-row: 1 / span 2;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.dash-lb-prizes span {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.dash-lb-card.dash-lb-card--main {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    background: rgba(12, 15, 22, 0.56);
    box-shadow: none;
}

.dash-lb-table {
    display: grid;
    gap: 0;
}

.dash-lb-row {
    grid-template-columns: 68px minmax(0, 1fr) 118px 102px;
    min-height: 56px;
    padding: 0 18px;
    gap: 14px;
    background: transparent;
    border-bottom: 1px solid var(--border-subtle);
}

.dash-lb-row--head {
    min-height: 38px;
    color: var(--text-accent-muted);
    background: transparent;
}

.dash-lb-row--gold {
    background: transparent;
}

.dash-lb-rank {
    color: var(--text-primary);
}

.dash-lb-row--gold .dash-lb-rank,
.dash-lb-row--silver .dash-lb-rank,
.dash-lb-row--bronze .dash-lb-rank {
    color: var(--text-primary);
}

.dash-lb-rank--crown::before,
.dash-lb-rank--medal::before {
    display: none;
}

.dash-lb-trader {
    grid-template-columns: minmax(0, max-content) 1fr;
    color: var(--text-primary);
}

.dash-lb-trader i {
    display: none;
}

.dash-lb-trader b {
    color: var(--text-primary);
    font-size: 14px;
}

.dash-lb-trader b::after {
    display: none;
}

.dash-lb-trader small {
    color: var(--text-secondary);
}

.dash-lb-stat,
.dash-lb-pnl,
.dash-lb-reward {
    color: var(--text-primary);
    font-size: 13px;
}

.dash-lb-pnl.is-up,
.dash-lb-reward {
    color: var(--profit);
}

[data-theme="light"] .dash-lb-card.dash-lb-card--main {
    background: rgba(255, 255, 255, 0.68);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: none;
}

[data-theme="light"] .dash-lb-row,
[data-theme="light"] .dash-lb-row--head {
    background: transparent;
    border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .dash-lb-row--gold {
    background: transparent;
}

@media (max-width: 820px) {
    .dash-lb-hero {
        display: block;
    }

    .dash-lb-prizes {
        margin-top: 10px;
        flex-wrap: wrap;
    }

    .dash-lb-row {
        grid-template-columns: 56px minmax(160px, 1fr) 106px 88px;
        min-width: 480px;
    }
}

/* Polished leaderboard inspired by dense bid tables */
.dash-lb-panel {
    width: min(1120px, calc(100vw - 48px));
    max-width: 1120px;
}

.dash-lb-hero {
    margin-bottom: 16px;
}

.dash-lb-hero h2 {
    font-size: clamp(26px, 3.6vw, 40px);
    letter-spacing: 0;
}

.dash-lb-hero p {
    max-width: 46ch;
    font-size: 14px;
}

.dash-lb-prizes {
    gap: 6px;
}

.dash-lb-prizes span {
    padding: 7px 10px;
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 999px;
    color: var(--text-primary);
    background: rgba(var(--accent-rgb), 0.08);
}

.dash-lb-card.dash-lb-card--main {
    overflow-x: auto;
    border-radius: 14px;
    border-color: rgba(148, 163, 184, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
        rgba(23, 28, 32, 0.9);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 22px 60px rgba(0, 0, 0, 0.22);
}

.dash-lb-row {
    grid-template-columns: 84px minmax(230px, 1.6fr) 140px 90px 118px 108px;
    min-height: 62px;
    min-width: 880px;
    padding: 0 18px;
    border-bottom-color: rgba(148, 163, 184, 0.13);
}

.dash-lb-row--head {
    min-height: 42px;
    color: rgba(203, 213, 225, 0.68);
    background: rgba(255, 255, 255, 0.025);
}

.dash-lb-row--head span {
    font-size: 10px;
}

.dash-lb-row--gold,
.dash-lb-row--silver,
.dash-lb-row--bronze {
    min-height: 74px;
    border: 1px solid transparent;
    border-radius: 12px;
    margin: 4px 0;
}

.dash-lb-row--gold {
    border-color: rgba(247, 196, 68, 0.38);
    background:
        linear-gradient(90deg, rgba(247, 196, 68, 0.22), rgba(255, 255, 255, 0.035) 42%, rgba(255, 255, 255, 0.02)),
        rgba(50, 45, 31, 0.72);
    box-shadow: 0 0 0 1px rgba(247, 196, 68, 0.12), 0 12px 28px rgba(247, 196, 68, 0.08);
}

.dash-lb-row--silver {
    border-color: rgba(203, 213, 225, 0.32);
    background:
        linear-gradient(90deg, rgba(203, 213, 225, 0.15), rgba(255, 255, 255, 0.025) 42%, rgba(255, 255, 255, 0.012)),
        rgba(39, 47, 53, 0.78);
}

.dash-lb-row--bronze {
    border-color: rgba(214, 139, 74, 0.32);
    background:
        linear-gradient(90deg, rgba(214, 139, 74, 0.17), rgba(255, 255, 255, 0.025) 42%, rgba(255, 255, 255, 0.012)),
        rgba(45, 40, 34, 0.78);
}

.dash-lb-rank {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: var(--text-primary);
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-weight: 800;
}

.dash-lb-row--gold .dash-lb-rank,
.dash-lb-row--silver .dash-lb-rank,
.dash-lb-row--bronze .dash-lb-rank {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    color: #121212;
    font-size: 18px;
    box-shadow: 0 9px 22px rgba(0, 0, 0, 0.24);
}

.dash-lb-row--gold .dash-lb-rank {
    background: linear-gradient(180deg, #ffe58b, #f7c444);
    border-color: rgba(255, 230, 139, 0.8);
}

.dash-lb-row--silver .dash-lb-rank {
    background: linear-gradient(180deg, #f1f5f9, #b7c4cf);
    border-color: rgba(241, 245, 249, 0.72);
}

.dash-lb-row--bronze .dash-lb-rank {
    background: linear-gradient(180deg, #ffd2a3, #c88244);
    border-color: rgba(255, 210, 163, 0.68);
}

.dash-lb-trader {
    grid-template-columns: 38px minmax(0, max-content) 1fr;
    gap: 11px;
}

.dash-lb-trader i {
    display: block;
    width: 34px;
    height: 34px;
}

.dash-lb-trader b {
    font-size: 14px;
}

.dash-lb-pnl {
    display: grid;
    gap: 6px;
    color: var(--profit);
}

.dash-lb-pnl::after {
    content: "";
    display: block;
    width: 70px;
    height: 5px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, var(--profit) 72%, rgba(148, 163, 184, 0.25) 72%);
}

.dash-lb-row--silver .dash-lb-pnl::after {
    background: linear-gradient(90deg, var(--profit) 58%, rgba(148, 163, 184, 0.25) 58%);
}

.dash-lb-row--bronze .dash-lb-pnl::after {
    background: linear-gradient(90deg, var(--profit) 46%, rgba(148, 163, 184, 0.25) 46%);
}

.dash-lb-stat,
.dash-lb-reward {
    font-weight: 800;
}

.dash-lb-status {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--text-secondary);
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 11px;
    font-weight: 800;
}

.dash-lb-status--live {
    color: #8cff95;
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.24);
}

[data-theme="light"] .dash-lb-card.dash-lb-card--main {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(228, 236, 247, 0.82)),
        rgba(241, 245, 249, 0.84);
    border-color: rgba(15, 23, 42, 0.13);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 18px 42px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .dash-lb-row {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .dash-lb-row--head {
    color: rgba(71, 85, 105, 0.76);
    background: rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .dash-lb-row--gold {
    background:
        linear-gradient(90deg, rgba(247, 196, 68, 0.28), rgba(255, 255, 255, 0.64) 46%, rgba(255, 255, 255, 0.52)),
        rgba(255, 250, 230, 0.74);
}

[data-theme="light"] .dash-lb-row--silver {
    background:
        linear-gradient(90deg, rgba(148, 163, 184, 0.25), rgba(255, 255, 255, 0.62) 46%, rgba(255, 255, 255, 0.5)),
        rgba(241, 245, 249, 0.78);
}

[data-theme="light"] .dash-lb-row--bronze {
    background:
        linear-gradient(90deg, rgba(214, 139, 74, 0.23), rgba(255, 255, 255, 0.62) 46%, rgba(255, 255, 255, 0.5)),
        rgba(255, 247, 237, 0.76);
}

@media (max-width: 820px) {
    .dash-lb-panel {
        width: min(100%, calc(100vw - 24px));
    }

    .dash-lb-row {
        grid-template-columns: 72px minmax(190px, 1fr) 126px 76px 104px 98px;
        min-width: 720px;
    }
}

.dash-rewards-panel {
    width: min(980px, calc(100vw - 48px));
    margin: 0 auto clamp(88px, 11vw, 128px);
    perspective: 1200px;
}

.dash-rewards-stats {
    position: relative;
    min-height: 390px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.dash-rewards-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.dash-premium-button {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 168px;
    padding: 0 24px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #0a0b0f;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    background:
        linear-gradient(180deg, #f8fafc, #dbe3ed);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 0 0 1px rgba(15, 23, 42, 0.18),
        0 10px 22px rgba(0, 0, 0, 0.16);
    transform: translateZ(0);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dash-premium-button::after {
    display: none;
}

.dash-premium-button span {
    position: relative;
    z-index: 1;
}

.dash-premium-button:hover,
.dash-premium-button:focus-visible {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 0 0 1px rgba(15, 23, 42, 0.18),
        0 12px 24px rgba(0, 0, 0, 0.18);
}

.dash-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-subtle);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.dash-rewards-stats {
    padding: 0;
    border-radius: 0;
    display: block;
}

.dash-rewards-stat {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --float-x: 0px;
    --float-y: 0px;
    --glow-x: 50%;
    --glow-y: 0%;
    --base-rotate: 0deg;
    --motion-x: 1;
    --motion-y: 1;
    --motion-tilt: 1;
    isolation: isolate;
    overflow: hidden;
    position: absolute;
    width: clamp(176px, 15vw, 220px);
    min-height: clamp(132px, 12.5vw, 160px);
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, 0.045), transparent 34%),
        linear-gradient(180deg, rgb(24, 30, 40), rgb(13, 17, 24));
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 -10px 24px rgba(0, 0, 0, 0.12) inset,
        0 12px 26px rgba(0, 0, 0, 0.18);
    transform: translate3d(var(--float-x), var(--float-y), 0) rotateZ(var(--base-rotate)) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateZ(0);
    transform-style: preserve-3d;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    will-change: transform;
}

.dash-rewards-stat:nth-child(1) {
    left: calc(50% - 430px);
    top: 96px;
    --base-rotate: -4deg;
    --motion-x: -1;
    --motion-y: 0.8;
    --motion-tilt: -0.9;
}

.dash-rewards-stat:nth-child(2) {
    left: calc(50% - 214px);
    top: 26px;
    --base-rotate: 2deg;
    --motion-x: 0.65;
    --motion-y: -1;
    --motion-tilt: 1;
    z-index: 2;
}

.dash-rewards-stat:nth-child(3) {
    left: calc(50% + 42px);
    top: 92px;
    --base-rotate: -2deg;
    --motion-x: -0.72;
    --motion-y: -0.62;
    --motion-tilt: -1;
}

.dash-rewards-stat:nth-child(4) {
    left: calc(50% + 250px);
    top: 36px;
    --base-rotate: 4deg;
    --motion-x: 1;
    --motion-y: 0.72;
    --motion-tilt: 0.85;
}

.dash-rewards-stat:nth-child(5) {
    left: calc(50% - 300px);
    top: 238px;
    --base-rotate: 3deg;
    --motion-x: 0.9;
    --motion-y: -0.82;
    --motion-tilt: -0.75;
}

.dash-rewards-stat:nth-child(6) {
    left: calc(50% + 142px);
    top: 230px;
    --base-rotate: -3deg;
    --motion-x: -0.86;
    --motion-y: 0.94;
    --motion-tilt: 0.78;
}

.dash-rewards-stat::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 40%),
        radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(var(--accent-rgb), 0.06), transparent 44%);
    opacity: 0.22;
    transition: opacity 0.18s ease;
}

.dash-rewards-stat::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.075);
}

.dash-rewards-stat:hover,
.dash-rewards-stat:focus-visible {
    z-index: 6;
    border-color: rgba(var(--accent-rgb), 0.32);
    box-shadow:
        0 13px 28px rgba(0, 0, 0, 0.16),
        0 0 0 1px rgba(var(--accent-rgb), 0.08);
    outline: none;
}

.dash-rewards-stat:hover::before,
.dash-rewards-stat:focus-visible::before {
    opacity: 0.38;
}

.dash-rewards-stat span {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 24px;
    color: rgba(203, 213, 225, 0.68);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dash-rewards-stat strong {
    position: relative;
    z-index: 1;
    display: block;
    color: var(--text-primary);
    font-size: clamp(25px, 2.75vw, 36px);
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    transform: translateZ(22px);
}

.dash-rewards-stat strong.is-up {
    color: var(--profit);
}

@keyframes dash-metal-sheen {
    0%, 18% { transform: translateX(-58%); opacity: 0.42; }
    46% { transform: translateX(54%); opacity: 0.82; }
    100% { transform: translateX(54%); opacity: 0.42; }
}

[data-theme="light"] .dash-rewards-stats {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

[data-theme="light"] .dash-rewards-stat {
    background:
        radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, 0.22), transparent 32%),
        linear-gradient(180deg, rgb(244, 248, 253), rgb(226, 234, 244));
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.72) inset,
        0 -8px 18px rgba(15, 23, 42, 0.045) inset,
        0 8px 20px rgba(15, 23, 42, 0.075);
}

[data-theme="light"] .dash-rewards-stat:hover,
[data-theme="light"] .dash-rewards-stat:focus-visible {
    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.09),
        0 0 0 1px rgba(var(--accent-rgb), 0.08);
}

[data-theme="light"] .dash-secondary-link {
    background: rgba(255, 255, 255, 0.58);
    border-color: rgba(15, 23, 42, 0.1);
}

@media (max-width: 860px) {
    .dash-rewards-panel {
        width: min(100%, calc(100vw - 24px));
        margin-bottom: 118px;
    }

    .dash-rewards-stats {
        min-height: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .dash-rewards-stat,
    .dash-rewards-stat:nth-child(n) {
        position: relative;
        inset: auto;
        width: auto;
        min-height: 156px;
        --base-rotate: 0deg;
        --mobile-card-accent: var(--accent-rgb);
        border-color: rgba(var(--mobile-card-accent), 0.18);
        background:
            linear-gradient(135deg, rgba(var(--mobile-card-accent), 0.16), transparent 42%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
            rgba(13, 18, 28, 0.86);
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.1) inset,
            0 -14px 28px rgba(0, 0, 0, 0.16) inset,
            0 14px 30px rgba(0, 0, 0, 0.22),
            0 0 0 1px rgba(var(--mobile-card-accent), 0.05);
        transform: translateY(0) scale(1);
        transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    }

    .dash-rewards-stat:nth-child(2),
    .dash-rewards-stat:nth-child(5) {
        --mobile-card-accent: 74, 222, 128;
    }

    .dash-rewards-stat:nth-child(3),
    .dash-rewards-stat:nth-child(6) {
        --mobile-card-accent: 129, 140, 248;
    }

    .dash-rewards-stat::before {
        opacity: 0.48;
        background:
            radial-gradient(circle at 16% 0%, rgba(var(--mobile-card-accent), 0.32), transparent 40%),
            linear-gradient(115deg, transparent 0 24%, rgba(255, 255, 255, 0.11) 35%, transparent 48% 100%);
        transform: translateX(-18%);
        animation: dash-mobile-card-sheen 5.8s ease-in-out infinite;
    }

    .dash-rewards-stat:nth-child(2)::before { animation-delay: -1.1s; }
    .dash-rewards-stat:nth-child(3)::before { animation-delay: -2.2s; }
    .dash-rewards-stat:nth-child(4)::before { animation-delay: -3.3s; }
    .dash-rewards-stat:nth-child(5)::before { animation-delay: -4.4s; }
    .dash-rewards-stat:nth-child(6)::before { animation-delay: -5.5s; }

    .dash-rewards-stat::after {
        border-color: rgba(255, 255, 255, 0.095);
        box-shadow:
            0 0 0 1px rgba(var(--mobile-card-accent), 0.06) inset,
            0 12px 30px rgba(var(--mobile-card-accent), 0.04) inset;
    }

    .dash-rewards-stat:active,
    .dash-rewards-stat:focus-visible {
        z-index: 7;
        border-color: rgba(var(--mobile-card-accent), 0.38);
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.12) inset,
            0 -14px 28px rgba(0, 0, 0, 0.16) inset,
            0 18px 38px rgba(0, 0, 0, 0.28),
            0 0 0 1px rgba(var(--mobile-card-accent), 0.14);
        transform: translateY(-3px) scale(1.012);
        outline: none;
    }

    .dash-rewards-stat strong {
        text-shadow: 0 0 22px rgba(var(--mobile-card-accent), 0.18);
    }

    [data-theme="light"] .dash-rewards-stat,
    [data-theme="light"] .dash-rewards-stat:nth-child(n) {
        background:
            linear-gradient(135deg, rgba(var(--mobile-card-accent), 0.14), transparent 42%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(232, 240, 250, 0.84)),
            #ffffff;
        border-color: rgba(var(--mobile-card-accent), 0.2);
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.95) inset,
            0 -12px 24px rgba(15, 23, 42, 0.035) inset,
            0 14px 30px rgba(15, 23, 42, 0.1),
            0 0 0 1px rgba(var(--mobile-card-accent), 0.05);
    }

    [data-theme="light"] .dash-rewards-stat:active,
    [data-theme="light"] .dash-rewards-stat:focus-visible {
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.95) inset,
            0 -12px 24px rgba(15, 23, 42, 0.035) inset,
            0 18px 38px rgba(15, 23, 42, 0.14),
            0 0 0 1px rgba(var(--mobile-card-accent), 0.12);
    }

    .dash-rewards-actions {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        transform: none;
        grid-column: 1 / -1;
        margin-top: 6px;
    }
}

@keyframes dash-mobile-card-sheen {
    0%, 100% {
        transform: translateX(-18%);
        opacity: 0.42;
    }
    50% {
        transform: translateX(18%);
        opacity: 0.62;
    }
}

@media (max-width: 560px) {
    .dashboard-hero {
        margin-bottom: 32px;
    }

    .dashboard-greeting {
        margin-bottom: 0;
    }

    .dash-rewards-panel {
        margin-bottom: 0;
    }

    .dash-rewards-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        min-height: 0;
        padding: 8px;
        overflow: hidden;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 20px;
        background: #0f141c;
        box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
        perspective: none;
    }

    .dash-rewards-stat,
    .dash-rewards-stat:nth-child(n) {
        position: relative;
        inset: auto;
        z-index: 1;
        width: auto;
        min-height: 88px;
        padding: 14px 16px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        transform: none;
    }

    .dash-rewards-stat:nth-child(odd) {
        border-right: 1px solid rgba(148, 163, 184, 0.12);
    }

    .dash-rewards-stat:nth-child(-n + 4) {
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    }

    .dash-rewards-stat::before {
        display: none;
        animation: none;
    }

    .dash-rewards-stat::after {
        display: none;
    }

    .dash-rewards-stat:active,
    .dash-rewards-stat:focus-visible {
        background: rgba(255, 255, 255, 0.035);
        box-shadow: none;
        transform: none;
    }

    .dash-rewards-stat span {
        margin-bottom: 9px;
        font-size: 9px;
        letter-spacing: 0.09em;
    }

    .dash-rewards-stat strong {
        font-size: clamp(20px, 6vw, 25px);
        text-shadow: none;
        transform: none;
        white-space: nowrap;
    }

    .dash-rewards-actions {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        z-index: 2;
        grid-column: 1 / -1;
        width: auto;
        max-width: none;
        padding: 14px 8px 6px;
        border-top: 1px solid rgba(148, 163, 184, 0.12);
        transform: none;
        margin: 0;
    }

    .dashboard-main {
        padding-bottom: calc(170px + env(safe-area-inset-bottom));
    }

    .dash-rewards-actions .dash-premium-button {
        width: 100%;
        min-height: 44px;
        border-color: #d6dee8;
        background: #eef2f7;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
    }

    .dash-rewards-actions .dash-premium-button:hover,
    .dash-rewards-actions .dash-premium-button:focus-visible {
        background: #f8fafc;
        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
    }

    [data-theme="light"] .dash-rewards-stat,
    [data-theme="light"] .dash-rewards-stat:nth-child(n) {
        background: transparent;
        box-shadow: none;
    }

    [data-theme="light"] .dash-rewards-stats {
        border-color: rgba(15, 23, 42, 0.1);
        background: #edf2f7;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
    }
}

.leaderboard-rules {
    width: min(1120px, calc(100vw - 48px));
    margin: 18px auto clamp(110px, 14vw, 160px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.leaderboard-rules div {
    min-height: 154px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--border-default);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
        rgba(12, 15, 22, 0.66);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.07) inset,
        0 18px 48px rgba(0, 0, 0, 0.18);
}

.leaderboard-rules span {
    display: block;
    margin-bottom: 14px;
    color: var(--text-accent-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.leaderboard-rules strong {
    display: block;
    color: var(--text-primary);
    font-size: 16px;
    letter-spacing: -0.02em;
}

.leaderboard-rules p {
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
}

[data-theme="light"] .leaderboard-rules div {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(229, 237, 248, 0.82)),
        rgba(255, 255, 255, 0.78);
    border-color: rgba(15, 23, 42, 0.11);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 18px 42px rgba(15, 23, 42, 0.1);
}

@media (max-width: 940px) {
    .leaderboard-rules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .leaderboard-rules {
        width: min(100%, calc(100vw - 24px));
        grid-template-columns: 1fr;
    }
}

.dash-user-stats {
    max-width: 980px;
    margin: 0 auto clamp(76px, 12vw, 130px);
    padding: 22px;
    border-radius: 24px;
    border: 1px solid var(--border-default);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
        rgba(12, 15, 22, 0.72);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 24px 70px rgba(0, 0, 0, 0.26);
}

.dash-user-stats__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.dash-user-stats__head h2 {
    margin: 5px 0 0;
    color: var(--text-primary);
    font-size: clamp(22px, 3vw, 28px);
    letter-spacing: -0.03em;
}

.dash-user-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dash-user-stat {
    min-height: 112px;
    padding: 16px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 24% 0%, rgba(var(--accent-rgb), 0.16), transparent 44%),
        rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-user-stat span {
    display: block;
    margin-bottom: 18px;
    color: var(--text-accent-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dash-user-stat strong {
    color: var(--text-primary);
    font-size: clamp(22px, 3vw, 30px);
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.dash-user-stat strong.is-up {
    color: var(--profit);
}

[data-theme="light"] .dash-user-stats {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(232, 240, 250, 0.8)),
        rgba(255, 255, 255, 0.76);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.94) inset,
        0 24px 68px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .dash-user-stat {
    background:
        radial-gradient(circle at 24% 0%, rgba(var(--accent-rgb), 0.13), transparent 44%),
        rgba(255, 255, 255, 0.62);
    border-color: rgba(15, 23, 42, 0.08);
}

.dash-dock-wrap {
    position: fixed;
    left: 0;
    right: 0;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 40;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 0 16px;
    pointer-events: none;
}

.dash-dock-orbit {
    position: absolute;
    bottom: -26px;
    width: min(480px, 72vw);
    aspect-ratio: 1 / 0.24;
    border-radius: 999px;
    background:
        radial-gradient(closest-side at 50% 50%, rgba(var(--accent-rgb), 0.2), transparent 66%),
        radial-gradient(closest-side at 18% 54%, rgba(74, 222, 128, 0.12), transparent 58%),
        radial-gradient(closest-side at 82% 54%, rgba(129, 140, 248, 0.16), transparent 58%);
    filter: blur(36px);
    opacity: 0.75;
    pointer-events: none;
}

.dash-dock {
    position: relative;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2.6vw, 18px);
    width: auto;
    min-height: 88px;
    padding: 12px clamp(14px, 3vw, 20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgb(20, 26, 36), rgb(9, 13, 20)),
        #0b0f17;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 18px 44px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.dash-dock__item {
    --dock-scale: 1;
    --dock-lift: 0px;
    --dock-color: var(--accent-rgb);
    position: relative;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 14px;
    color: #f8fafc;
    text-decoration: none;
    background:
        linear-gradient(180deg, rgb(27, 34, 46), rgb(16, 21, 30));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.07) inset,
        0 12px 24px rgba(0, 0, 0, 0.22);
    transform: translateY(var(--dock-lift)) scale(var(--dock-scale));
    transform-origin: center bottom;
    transition: transform 0.12s ease-out, border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
    will-change: transform;
}

.dash-dock__item:hover,
.dash-dock__item:focus-visible {
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 14px 28px rgba(0, 0, 0, 0.26);
    outline: none;
}

.dash-dock__item--train { --dock-color: 96, 165, 250; }
.dash-dock__item--demo { --dock-color: 74, 222, 128; }
.dash-dock__item--ai { --dock-color: 129, 140, 248; }
.dash-dock__item--stats { --dock-color: 251, 191, 36; }

.dash-dock__item::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 0%, rgba(var(--dock-color), 0.18), transparent 62%);
    opacity: 0.42;
}

.dash-dock__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
}

.dash-dock__icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dash-dock__tooltip {
    position: absolute;
    top: -42px;
    left: 50%;
    transform: translateX(-50%) translateY(3px);
    padding: 7px 10px;
    border-radius: 10px;
    color: var(--text-primary);
    background: rgba(12, 15, 22, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.dash-dock__item:hover .dash-dock__tooltip,
.dash-dock__item:focus-visible .dash-dock__tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

[data-theme="light"] .dash-dock {
    background:
        linear-gradient(180deg, rgb(241, 246, 252), rgb(222, 231, 242)),
        #edf3fb;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 14px 34px rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .dash-dock__item {
    color: #111827;
    background:
        linear-gradient(180deg, rgb(238, 244, 251), rgb(207, 219, 234));
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        0 10px 22px rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .dash-dock__tooltip {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(15, 23, 42, 0.12);
}

@media (max-width: 760px) {
    .dash-dock {
        border-radius: 16px;
        background:
            linear-gradient(180deg, rgba(27, 34, 46, 0.92), rgba(10, 14, 22, 0.9)),
            #0b0f17;
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.08) inset,
            0 18px 42px rgba(0, 0, 0, 0.34),
            0 0 0 1px rgba(var(--accent-rgb), 0.05);
    }

    .dash-dock__item {
        width: 58px;
        height: 58px;
        border-radius: 13px;
        background:
            radial-gradient(circle at 50% 0%, rgba(var(--dock-color), 0.18), transparent 58%),
            linear-gradient(180deg, rgb(31, 39, 53), rgb(16, 21, 30));
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.1) inset,
            0 -8px 16px rgba(0, 0, 0, 0.12) inset,
            0 12px 22px rgba(0, 0, 0, 0.24);
    }

    .dash-dock__item:active,
    .dash-dock__item:focus-visible {
        border-color: rgba(var(--dock-color), 0.42);
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.12) inset,
            0 -8px 16px rgba(0, 0, 0, 0.12) inset,
            0 16px 28px rgba(0, 0, 0, 0.3),
            0 0 0 1px rgba(var(--dock-color), 0.14);
        transform: translateY(-5px) scale(1.04);
    }

    .dash-lb-panel,
    .dash-user-stat-grid {
        grid-template-columns: 1fr;
    }

    .dash-user-stats__head {
        display: block;
    }
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.dash-card {
    --dash-accent: var(--accent-rgb);
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 500px;
    padding: 0;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-default);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 22%),
        var(--surface-elevated);
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 1px 2px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 12px 28px rgba(0, 0, 0, 0.14),
        0 24px 48px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s, box-shadow 0.3s;
}

.dash-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgb(var(--dash-accent));
    z-index: 2;
}

.dash-card--train { --dash-accent: 96, 165, 250; }
.dash-card--demo { --dash-accent: 74, 222, 128; }
.dash-card--ai { --dash-accent: 129, 140, 248; }

[data-theme="light"] .dash-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 1) inset,
        0 1px 3px rgba(15, 23, 42, 0.08),
        0 8px 20px rgba(15, 23, 42, 0.1),
        0 20px 44px rgba(15, 23, 42, 0.12);
}

.dash-card:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--dash-accent), 0.22);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.12),
        0 20px 40px rgba(0, 0, 0, 0.18),
        0 32px 64px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .dash-card:hover {
    border-color: rgba(var(--dash-accent), 0.32);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 1) inset,
        0 4px 10px rgba(15, 23, 42, 0.1),
        0 16px 36px rgba(15, 23, 42, 0.14),
        0 32px 64px rgba(15, 23, 42, 0.12);
}

.dash-card__visual {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 18px 18px 0;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.32);
    min-height: 280px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 2px 6px rgba(0, 0, 0, 0.2) inset,
        0 8px 20px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s, transform 0.3s;
}

.dash-card:hover .dash-card__visual {
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 2px 6px rgba(0, 0, 0, 0.18) inset,
        0 10px 24px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .dash-card__visual {
    background: linear-gradient(180deg, #dfe4ec 0%, #d1d8e3 100%);
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 3px 10px rgba(15, 23, 42, 0.14) inset,
        0 6px 18px rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .dash-card:hover .dash-card__visual {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 3px 10px rgba(15, 23, 42, 0.12) inset,
        0 8px 22px rgba(15, 23, 42, 0.12);
}

.dash-card__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 20px 22px 22px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .dash-card__body {
    background: #f8fafc;
    border-top-color: rgba(15, 23, 42, 0.1);
}

.dash-card__tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgb(var(--dash-accent));
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(var(--dash-accent), 0.1);
    border: 1px solid rgba(var(--dash-accent), 0.2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.dash-card__title {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.dash-card__desc {
    margin: 0;
    flex: 1;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}

[data-theme="light"] .dash-card__desc {
    color: #52525b;
}

.dash-card__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: rgb(var(--dash-accent));
    background: rgba(var(--dash-accent), 0.08);
    border: 1px solid rgba(var(--dash-accent), 0.16);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
    transition: gap 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.dash-card:hover .dash-card__link {
    gap: 10px;
    background: rgba(var(--dash-accent), 0.14);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 4px 12px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .dash-card__tag {
    background: rgba(var(--dash-accent), 0.14);
    border-color: rgba(var(--dash-accent), 0.28);
}

[data-theme="light"] .dash-card__link {
    background: rgba(var(--dash-accent), 0.12);
    border-color: rgba(var(--dash-accent), 0.24);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 2px 6px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .dash-card:hover .dash-card__link {
    background: rgba(var(--dash-accent), 0.18);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 4px 12px rgba(15, 23, 42, 0.1);
}

/* Mini UI mocks inside cards */
.dash-mock {
    font-size: 10px;
    line-height: 1.3;
}

.dash-mock--course .dash-mock__head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-accent-muted);
}

.dash-mock--course .dash-mock__head em {
    font-style: normal;
    font-variant-numeric: tabular-nums;
    color: rgb(var(--dash-accent));
}

.dash-mock__progress {
    height: 4px;
    border-radius: 999px;
    background: rgba(var(--dash-accent), 0.15);
    margin-bottom: 10px;
    overflow: hidden;
}

.dash-mock__progress i {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: rgb(var(--dash-accent));
    animation: dashProgress 2.8s ease-in-out infinite alternate;
}

@keyframes dashProgress {
    from { width: 38%; }
    to { width: 46%; }
}

.dash-mock__module {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    margin-bottom: 5px;
    border-radius: 7px;
    color: var(--text-accent-muted);
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(0, 0, 0, 0.18);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .dash-mock__module {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .dash-mock__module.is-active {
    background: rgba(var(--dash-accent), 0.16);
    border-color: rgba(var(--dash-accent), 0.28);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.dash-mock__module.is-active {
    color: rgb(var(--dash-accent));
    background: rgba(var(--dash-accent), 0.12);
    border-color: rgba(var(--dash-accent), 0.2);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.dash-mock__module span {
    width: 18px;
    font-weight: 700;
    font-size: 9px;
    opacity: 0.7;
}

.dash-mock__module.is-done span::after {
    content: "✓";
    font-size: 8px;
    margin-left: 2px;
    color: var(--profit);
}

.dash-mock--demo .dash-mock__board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 10px;
}

.dash-mock--demo .dash-mock__board-head em {
    font-style: normal;
    padding: 3px 7px;
    border-radius: 4px;
    border: 1px solid var(--border-default);
    font-variant-numeric: tabular-nums;
}

.dash-mock__tokens {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-mock__token {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.22);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 2px 6px rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .dash-mock__token {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .dash-mock__pnl {
    background: rgba(var(--profit-rgb), 0.14);
    border-color: rgba(var(--profit-rgb), 0.28);
}

.dash-mock__token.has-pos {
    box-shadow: inset 2px 0 0 var(--profit);
    border-color: rgba(var(--profit-rgb), 0.25);
}

.dash-mock__icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border-default);
}

.dash-mock__icon--bonk { background: #f97316; }
.dash-mock__icon--wif { background: #a16207; }
.dash-mock__icon--cat { background: #eab308; }

.dash-mock--demo {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dash-mock--demo .dash-mock__tokens {
    flex: 1;
}

.dash-mock__token strong {
    display: block;
    font-size: 10px;
}

.dash-mock__token span {
    font-size: 9px;
    color: var(--text-accent-muted);
}

.dash-mock__token b {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 999px;
    color: var(--profit);
    background: rgba(var(--profit-rgb), 0.12);
    border: 1px solid rgba(var(--profit-rgb), 0.3);
}

.dash-mock__pnl {
    margin-top: 10px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    color: var(--text-secondary);
    background: rgba(var(--profit-rgb), 0.08);
    border: 1px solid rgba(var(--profit-rgb), 0.2);
}

.dash-mock__pnl strong {
    color: var(--profit);
}

.dash-mock--ai {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-mock__chat--user {
    align-self: flex-end;
    max-width: 88%;
    padding: 7px 10px;
    border-radius: 10px 10px 3px 10px;
    font-size: 9px;
    color: #fff;
    background: rgb(var(--dash-accent));
}

.dash-mock__chat--ai {
    padding: 9px 11px;
    border-radius: 3px 10px 10px 10px;
    border: 1px solid rgba(var(--dash-accent), 0.15);
    background: rgba(var(--dash-accent), 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .dash-mock__chat--ai {
    background: #ffffff;
    border-color: rgba(var(--dash-accent), 0.22);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .dash-mock__chat--user {
    box-shadow: 0 2px 8px rgba(var(--dash-accent), 0.25);
}

.dash-mock__chat--ai > span {
    display: block;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(var(--dash-accent));
    margin-bottom: 6px;
}

.dash-mock__stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.dash-mock__stat-grid div {
    padding: 6px 5px;
    border-radius: 6px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .dash-mock__stat-grid div {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.08);
}

.dash-mock__stat-grid em {
    display: block;
    font-style: normal;
    font-size: 8px;
    color: var(--text-accent-muted);
    margin-bottom: 2px;
}

.dash-mock__stat-grid strong {
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.dash-mock__stat-grid strong.warn {
    color: var(--warning);
}

@media (prefers-reduced-motion: reduce) {
    .dash-rewards-stat::before {
        animation: none !important;
        transform: none !important;
    }

    .dash-mock__progress i {
        animation: none;
        width: 42%;
    }

    .dash-card:hover,
    .dash-card:hover .dash-card__visual {
        transform: none;
    }
}

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

    .dash-card {
        min-height: 0;
    }

    .dashboard-main {
        padding-top: calc(80px + 20px);
    }
}

@media (max-width: 900px) and (min-width: 769px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}

/* Demo trading — page polish */
.page-demo-trading {
    background: #060608;
}

[data-theme="light"] .page-demo-trading {
    --demo-vignette-bg: #ffffff;
    background:
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(var(--accent-rgb), 0.06), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #fafafa 50%, #f1f5f9 100%);
}

.page-demo-trading::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--landing-header-clearance, 108px) + 48px);
    pointer-events: none;
    z-index: 99;
    background:
        radial-gradient(ellipse 85% 120% at 50% -15%, var(--demo-vignette-bg) 0%, transparent 62%),
        linear-gradient(
            180deg,
            var(--demo-vignette-bg) 0%,
            rgba(10, 10, 12, 0.88) 30%,
            transparent 100%
        );
}

[data-theme="light"] .page-demo-trading::before {
    background:
        radial-gradient(ellipse 85% 120% at 50% -15%, rgba(255, 255, 255, 0.98) 0%, transparent 62%),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.85) 30%,
            transparent 100%
        );
}

.page-demo-trading .demo-board-column {
    background: #0c0c0e;
    border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .page-demo-trading .demo-board-column {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.page-demo-trading .demo-board-head {
    padding: 14px 16px 13px;
    margin-bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .page-demo-trading .demo-board-head {
    background: #f8fafc;
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

.page-demo-trading .demo-board-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-primary);
}

.page-demo-trading .demo-board-title::before {
    display: none;
}

.page-demo-trading .demo-token-row {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    padding: 14px 16px;
    transition: background 0.1s ease;
}

.page-demo-trading .demo-token-row:last-child {
    border-bottom: none;
}

.page-demo-trading .demo-token-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.page-demo-trading .demo-token-row.has-position {
    box-shadow: inset 2px 0 0 var(--profit);
    background: rgba(var(--profit-rgb), 0.04);
}

.page-demo-trading .demo-token-row.is-skeleton {
    opacity: 0.55;
    pointer-events: none;
}

.page-demo-trading .demo-token-buy {
    border-radius: 9px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 18px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 2px 8px rgba(37, 99, 235, 0.35);
}

.page-demo-trading .demo-token-buy:hover {
    filter: brightness(1.08);
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.page-demo-trading .demo-cap-mc {
    color: #fbbf24;
    font-size: 15px;
    font-weight: 600;
}

.page-demo-trading .demo-cap-vol {
    color: rgba(var(--accent-rgb), 0.92);
    font-size: 15px;
    font-weight: 600;
}

[data-theme="light"] .page-demo-trading .demo-token-row {
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .page-demo-trading .demo-token-row:hover {
    background: rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .page-demo-trading .demo-cap-mc {
    color: #d97706;
}

.page-demo-trading .demo-tab-btn.is-active {
    color: var(--text-primary);
}

.page-demo-trading .demo-mobile-tabs {
    border-bottom: none;
    padding: 5px;
    gap: 8px;
    border-radius: 14px;
}

.page-demo-trading .demo-tab-btn {
    font-size: 14px;
    padding: 13px 16px;
    min-height: 48px;
}

.page-demo-trading .token-search input {
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, 0.04);
}

.page-demo-trading .token-search input:focus {
    border-color: rgba(var(--accent-rgb), 0.35);
    background: var(--surface-elevated);
}

[data-theme="light"] .page-demo-trading .token-search input {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .page-demo-trading .demo-token-ticker {
    color: var(--text-primary);
}

[data-theme="light"] .page-demo-trading .demo-token-name {
    color: var(--text-secondary);
}

[data-theme="light"] .page-demo-trading .demo-token-age {
    color: var(--accent);
}

[data-theme="light"] .page-demo-trading .demo-token-mint,
[data-theme="light"] .page-demo-trading .demo-token-copy {
    color: var(--text-accent-muted);
}

[data-theme="light"] .page-demo-trading .demo-token-tag {
    color: var(--text-secondary);
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .page-demo-trading .demo-token-tag:hover {
    color: var(--text-primary);
    background: rgba(var(--accent-rgb), 0.1);
    border-color: rgba(var(--accent-rgb), 0.22);
}

[data-theme="light"] .page-demo-trading .demo-token-tag--pump {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
    border-color: rgba(var(--accent-rgb), 0.22);
}

[data-theme="light"] .page-demo-trading .demo-token-tag--pump:hover {
    background: rgba(var(--accent-rgb), 0.16);
}

.page-demo-trading .wallet-hud {
    border-radius: 999px;
    background: rgba(var(--profit-rgb), 0.1);
    border: 1px solid rgba(var(--profit-rgb), 0.25);
    font-size: 12px;
    font-weight: 600;
    padding: 0 14px;
    min-height: 34px;
}

.page-demo-trading .wallet-hud .wh-bal {
    color: var(--profit);
}

@media (max-width: 900px) {
    .page-demo-trading .demo-board-main {
        margin-top: calc(var(--landing-header-clearance, 92px) + 10px);
    }
}

/* Auth page */
.page-login .main-content,
body:not(.page-home):not(.page-demo-trading) .main-content {
    padding-top: 100px;
}

/* Portfolio modal (dashboard-style balance card) */
.portfolio-balance-card {
    border-radius: 20px;
    padding: 24px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    margin-bottom: 16px;
}

.portfolio-balance-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.portfolio-balance-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-accent-muted);
    font-weight: 500;
}

.portfolio-balance-label .eye-toggle {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    font-size: 14px;
    padding: 0;
    color: inherit;
}

.portfolio-balance-usd {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.portfolio-balance-sol {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.portfolio-change-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(var(--profit-rgb), 0.1);
    color: var(--profit);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.portfolio-change-pill.is-neg {
    background: rgba(var(--loss-rgb), 0.1);
    color: var(--loss);
}

.portfolio-time-tabs {
    display: flex;
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--border-subtle);
}

.portfolio-time-tab {
    padding: 5px 10px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-accent-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.portfolio-time-tab.is-active {
    background: var(--surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.portfolio-chart-wrap {
    margin-top: 16px;
    height: 120px;
    position: relative;
}

.portfolio-chart-wrap svg {
    width: 100%;
    height: 100%;
}

.portfolio-chart-line {
    fill: none;
    stroke: var(--profit);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portfolio-chart-area {
    fill: url(#portfolioChartGrad);
}

.portfolio-modal-dialog {
    background: var(--surface) !important;
    border-color: var(--border-default) !important;
}

.portfolio-modal-backdrop {
    background: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="light"] .portfolio-modal-backdrop {
    background: rgba(15, 23, 42, 0.3) !important;
}

/* Auth & shared */
.auth-container,
.course-sidebar,
.course-content,
.ai-container {
    background: var(--panel);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.form-input,
.ai-chat-input,
.token-search input {
    background: var(--glass);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    color: var(--text-primary);
}

.form-input:focus,
.ai-chat-input:focus,
.token-search input:focus {
    border-color: rgba(var(--accent-rgb), 0.45);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.floating-back-btn,
.terminal-fab-back {
    border-radius: 999px;
    background: var(--nav-bg);
    border-color: var(--border-default);
    backdrop-filter: blur(16px);
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }

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

/* Responsive */
@media (max-width: 768px) {
    .navbar--landing {
        grid-template-columns: 1fr auto;
        grid-template-rows: none;
        border-radius: 999px;
        padding: 8px 14px;
        gap: 10px;
    }

    .nav-links-left {
        display: none;
    }

    .nav-logo {
        grid-column: 1;
        text-align: left;
    }

    .nav-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .ca-badge {
        display: none;
    }

    .nav-link-ghost {
        display: none;
    }

    .landing-screen {
        padding: 88px 0 40px;
        min-height: 100svh;
    }

    .landing-stats {
        gap: 28px;
    }

    .landing-platform-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .landing-platform-title {
        max-width: none;
    }

    .scene-stage {
        height: min(52vh, 380px);
        min-height: 300px;
    }

    .platform-preview-content {
        min-height: 220px;
        padding: 18px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card-face {
        min-height: 0;
    }
}

@media (max-width: 480px) {
    .landing-cta {
        flex-direction: column;
        gap: 16px;
    }

    .btn-lg {
        width: 100%;
    }
}

/* ─── Training page (full rebrand) ─── */
.page-course {
    min-height: 100vh;
    background: var(--bg-darker);
    font-family: "Inter", sans-serif;
    --train-rail-w: 260px;
    --train-panel-gap: 16px;
    --train-vignette-bg: #050506;
}

/* Top fade — content softens under the floating nav */
.page-course::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--landing-header-clearance, 108px) + 72px);
    pointer-events: none;
    z-index: 95;
    background:
        radial-gradient(ellipse 85% 120% at 50% -15%, var(--train-vignette-bg) 0%, transparent 62%),
        linear-gradient(
            180deg,
            var(--train-vignette-bg) 0%,
            rgba(5, 5, 6, 0.92) 28%,
            rgba(5, 5, 6, 0.55) 52%,
            transparent 100%
        );
}

[data-theme="light"] .page-course {
    --train-vignette-bg: #ffffff;
    background:
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(var(--accent-rgb), 0.07), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #fafafa 42%, #f1f5f9 100%);
}

[data-theme="light"] .page-course::before {
    background:
        radial-gradient(ellipse 85% 120% at 50% -15%, rgba(255, 255, 255, 0.98) 0%, transparent 62%),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.88) 28%,
            rgba(255, 255, 255, 0.45) 52%,
            transparent 100%
        );
}

.page-course .noise-overlay,
.page-course .navbar,
.page-course .floating-back-btn,
.page-course .footer {
    display: none !important;
}

.page-course .course-menu-btn {
    display: none;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border-default);
    border-radius: 50%;
    background: var(--glass);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
}

.page-course .course-menu-btn span {
    display: block;
    width: 14px;
    height: 2px;
    border-radius: 1px;
    background: var(--text-primary);
    transition: transform 0.2s, opacity 0.2s;
}

.page-course .course-menu-btn.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.page-course .course-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.page-course .course-menu-btn.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Shell — natural page scroll */
.page-course .train-main,
.page-course .course-main {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: min(1600px, calc(100vw - 32px));
    margin-left: auto;
    margin-right: auto;
    padding: calc(var(--landing-header-clearance, 108px) + var(--train-panel-gap, 16px)) clamp(16px, 2.5vw, 32px) clamp(40px, 5vw, 64px);
}

/* Single panel — sidebar + reader */
.page-course .train-workspace,
.page-course .course-layout {
    display: grid;
    grid-template-columns: var(--train-rail-w) minmax(0, 1fr);
    grid-template-areas: "rail reader";
    align-items: start;
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    border-radius: 20px;
    overflow: visible;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 2px 4px rgba(0, 0, 0, 0.08),
        0 12px 32px rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .page-course .train-workspace,
[data-theme="light"] .page-course .course-layout {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 1) inset,
        0 1px 3px rgba(15, 23, 42, 0.06),
        0 12px 28px rgba(15, 23, 42, 0.08);
}

/* Rail top — back link + progress */
.page-course .train-rail__top {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 8px 20px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-subtle);
}

.page-course .train-rail__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 8px 4px 4px;
    margin-left: -4px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    width: fit-content;
}

.page-course .train-rail__back:hover {
    color: var(--text-primary);
    background: rgba(var(--accent-rgb), 0.06);
}

.page-course .train-rail__progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page-course .train-rail__track {
    height: 4px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.12);
    overflow: hidden;
}

.page-course .train-rail__fill {
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-course .train-rail__label {
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-accent-muted);
}

.page-course .train-reader__mobile-meta {
    display: none;
}

/* Left rail */
.page-course .train-rail,
.page-course .course-sidebar {
    grid-area: rail;
    width: auto;
    min-width: 0;
    background: var(--surface-elevated);
    border: none;
    border-right: 1px solid var(--border-subtle);
    border-radius: 20px 0 0 20px;
    padding: 20px 14px 24px;
    position: sticky;
    top: calc(var(--landing-header-clearance, 108px) + var(--train-panel-gap, 16px));
    align-self: start;
    max-height: calc(100vh - var(--landing-header-clearance, 108px) - var(--train-panel-gap, 16px) - 24px);
    overflow-y: auto;
    box-shadow: none;
}

[data-theme="light"] .page-course .train-rail,
[data-theme="light"] .page-course .course-sidebar {
    background: #ffffff;
    border-right-color: rgba(15, 23, 42, 0.08);
}

.page-course .train-rail__head {
    padding: 20px 8px 16px;
    margin-bottom: 4px;
}

.page-course .train-rail__title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 4px;
    text-transform: none;
}

.page-course .train-rail__meta {
    margin: 0;
    font-size: 12px;
    color: var(--text-accent-muted);
    line-height: 1.4;
}

.page-course .train-rail__nav,
.page-course .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.page-course .train-step,
.page-course .sidebar-item {
    display: flex;
    align-items: stretch;
    gap: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    padding: 0;
    margin: 0;
    border-radius: 0;
    border: none;
    text-transform: none;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    position: relative;
}

.page-course .train-step__track {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 28px;
    flex-shrink: 0;
    padding-top: 14px;
}

.page-course .train-step__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    background: var(--surface-elevated);
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 1;
}

.page-course .train-step__track::after {
    content: "";
    flex: 1;
    width: 2px;
    min-height: 12px;
    margin: 4px 0;
    background: var(--border-subtle);
}

.page-course .train-step:last-child .train-step__track::after {
    display: none;
}

.page-course .train-step__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 10px 10px 6px;
    border-radius: 10px;
    margin: 2px 0;
}

.page-course .sidebar-item__num {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-accent-muted);
    width: auto;
    padding: 0;
}

.page-course .sidebar-item__label {
    font-size: 13px;
    font-weight: inherit;
    color: inherit;
}

.page-course .train-step:hover .train-step__body {
    background: rgba(var(--accent-rgb), 0.06);
}

.page-course .train-step:hover,
.page-course .sidebar-item:hover {
    color: var(--text-primary);
    background: transparent;
}

.page-course .train-step.active,
.page-course .sidebar-item.active {
    color: var(--text-primary);
    background: transparent;
    border: none;
    box-shadow: none;
    font-weight: 600;
}

.page-course .train-step.active .train-step__body {
    background: rgba(var(--accent-rgb), 0.1);
}

.page-course .train-step.active .train-step__dot {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
}

.page-course .train-step.active .sidebar-item__num {
    color: var(--accent-light);
}

[data-theme="light"] .page-course .train-step.active .sidebar-item__num {
    color: var(--accent-dark);
}

.page-course .train-step.completed .train-step__dot {
    border-color: var(--profit);
    background: rgba(34, 197, 94, 0.15);
}

.page-course .train-step.completed .train-step__dot::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: 800;
    color: var(--profit);
}

.page-course .sidebar-item.completed .sidebar-item__num::after {
    display: none;
}

.page-course .sidebar-item.completed::after {
    display: none;
}

/* Reader pane */
.page-course .train-reader,
.page-course .course-content {
    grid-area: reader;
    min-height: auto;
    background: var(--surface-elevated);
    border: none;
    border-radius: 0 20px 20px 0;
    padding: 0;
    box-shadow: none;
    display: block;
}

[data-theme="light"] .page-course .train-reader,
[data-theme="light"] .page-course .course-content {
    background: #ffffff;
}

.page-course .train-reader__head {
    padding: 28px 36px 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.page-course .train-reader__scroll {
    display: block;
}

.page-course .train-reader__tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 12px;
}

[data-theme="light"] .page-course .train-reader__tag {
    color: var(--accent-dark);
}

.page-course .train-reader__title,
.page-course .content-title {
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin: 0;
    padding: 0;
    border: none;
    color: var(--text-primary);
    max-width: 28ch;
}

.page-course .train-reader__body,
.page-course .content-body {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-secondary);
    padding: 28px 36px 40px;
}

[data-theme="light"] .page-course .train-reader__body,
[data-theme="light"] .page-course .content-body {
    color: #3f3f46;
}

/* Lesson content typography */
.page-course .lesson-section {
    margin-bottom: 40px;
}

.page-course .lesson-section:last-child {
    margin-bottom: 0;
}

.page-course .section-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.page-course .lesson-section p {
    margin-bottom: 18px;
    max-width: 72ch;
}

.page-course .crypto-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.page-course .crypto-item {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border-default);
    border-radius: 14px;
    padding: 20px;
    box-shadow: none;
    transition: border-color 0.2s;
}

.page-course .crypto-item:hover {
    border-color: rgba(var(--accent-rgb), 0.25);
}

.page-course .crypto-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

[data-theme="light"] .page-course .crypto-item {
    background: #f4f4f5;
    border-color: rgba(15, 23, 42, 0.1);
}

.page-course .info-box {
    background: rgba(var(--accent-rgb), 0.06);
    border: 1px solid rgba(var(--accent-rgb), 0.12);
    border-left: 3px solid var(--accent);
    border-radius: 14px;
    padding: 20px 22px;
    margin: 24px 0;
}

[data-theme="light"] .page-course .info-box {
    background: rgba(var(--accent-rgb), 0.04);
    border-color: rgba(var(--accent-rgb), 0.14);
}

.page-course .feature-card {
    background: rgba(0, 0, 0, 0.14);
    border: 1px solid var(--border-default);
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 16px;
}

[data-theme="light"] .page-course .feature-card {
    background: #fafafa;
    border-color: rgba(15, 23, 42, 0.1);
}

.page-course .feature-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
}

.page-course .example-box {
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid rgba(var(--accent-rgb), 0.5);
    border-radius: 12px;
    padding: 16px 18px;
    margin-top: 14px;
}

[data-theme="light"] .page-course .example-box {
    background: #f4f4f5;
    border-color: rgba(15, 23, 42, 0.08);
}

.page-course .feature-list li::before {
    content: "·";
    color: var(--accent);
    font-weight: 700;
}

.page-course .next-lesson-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
    padding: 13px 26px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.3);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.page-course .next-lesson-btn:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(var(--accent-rgb), 0.35);
}

/* Mobile overlay for rail */
.page-course .train-rail-backdrop {
    display: none;
}

@media (max-width: 900px) {
    .page-course .train-workspace,
    .page-course .course-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "reader";
    }

    .page-course .train-reader__mobile-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 16px 20px;
        border-bottom: 1px solid var(--border-subtle);
    }

    .page-course .train-reader__mobile-meta .train-rail__progress {
        flex: 1;
        max-width: 200px;
        align-items: flex-end;
    }

    .page-course .train-rail,
    .page-course .course-sidebar {
        position: fixed;
        top: calc(var(--landing-header-clearance, 92px) + 8px);
        right: -100%;
        left: auto;
        width: min(300px, calc(100vw - 32px));
        max-height: calc(100dvh - var(--landing-header-clearance, 92px) - 24px);
        background: var(--surface-elevated);
        border-right: none;
        border-radius: 16px;
        border: 1px solid var(--border-default);
        z-index: 200;
        transition: right 0.32s cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow:
            -12px 0 40px rgba(0, 0, 0, 0.35),
            0 1px 0 rgba(255, 255, 255, 0.06) inset;
    }

    [data-theme="light"] .page-course .train-rail,
    [data-theme="light"] .page-course .course-sidebar {
        background: #ffffff;
    }

    .page-course .train-rail.sidebar-open,
    .page-course .course-sidebar.sidebar-open {
        right: 16px;
    }

    .page-course .train-rail-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 199;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }

    .page-course .train-rail-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .page-course .train-reader__head {
        padding: 24px 24px 20px;
    }

    .page-course .train-reader__body,
    .page-course .content-body {
        padding: 24px 24px 36px;
    }

    .page-course .train-reader__title,
    .page-course .content-title {
        max-width: none;
        font-size: 22px;
    }

    .page-course .train-main,
    .page-course .course-main {
        max-width: none;
        padding-top: calc(var(--landing-header-clearance, 92px) + 12px);
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .page-course .course-menu-btn {
        display: flex;
    }

    .page-course .landing-nav__connect {
        padding: 7px 12px;
        font-size: 12px;
    }
}

/* paper AI workspace */
.page-ai {
    min-height: 100vh;
    padding: 0;
    background: var(--bg-darker);
    color: var(--text-primary);
    font-family: "Inter", sans-serif;
    overflow: hidden;
}

[data-theme="light"] .page-ai {
    background:
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(var(--accent-rgb), 0.07), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #fafafa 42%, #f1f5f9 100%);
}

.page-ai .navbar,
.page-ai .floating-back-btn {
    display: none !important;
}

.page-ai .landing-nav__connect {
    color: #020617;
    background: #f8fafc;
    border-color: rgba(255, 255, 255, 0.62);
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.18);
}

.page-ai .landing-nav__connect:hover {
    background: #ffffff;
    border-color: rgba(var(--accent-rgb), 0.38);
}

.page-ai .landing-nav__connect.wallet-connected-pill {
    background: rgba(var(--accent-rgb), 0.14) !important;
    border-color: rgba(var(--accent-rgb), 0.36) !important;
    color: var(--accent-light) !important;
    box-shadow: none;
}

.ai-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.16s ease, background 0.16s ease;
}

.ai-nav-link:hover {
    color: var(--text-primary);
    background: var(--glass);
}

.ai-page-shell {
    position: relative;
    z-index: 2;
    display: block;
    width: min(1320px, calc(100vw - 48px));
    height: calc(100dvh - var(--landing-header-clearance, 108px) - 34px);
    margin: 0 auto;
    padding-top: calc(var(--landing-header-clearance, 108px) + 10px);
}

.ai-side-panel,
.page-ai .ai-container {
    min-height: 0;
    border: 1px solid var(--border-default);
    background: rgba(20, 20, 22, 0.74);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .ai-side-panel,
[data-theme="light"] .page-ai .ai-container {
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ai-side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 22px;
    border-radius: 18px;
}

.ai-side-kicker {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-light);
}

.ai-side-head h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.ai-status-list {
    display: grid;
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
}

.ai-status-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    background: rgba(255, 255, 255, 0.035);
}

[data-theme="light"] .ai-status-row {
    background: rgba(15, 23, 42, 0.025);
}

.ai-status-row span {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.ai-status-row strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.ai-prompt-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: auto;
}

.page-ai .ai-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        rgba(13, 13, 15, 0.88);
    border-color: rgba(255, 255, 255, 0.11);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 255, 255, 0.025) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.page-ai .ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
    padding: 22px 26px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.page-ai .ai-subtitle {
    margin: 0 0 6px;
    color: var(--text-accent-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-ai .ai-title {
    margin: 0;
    color: var(--text-primary);
    max-width: 760px;
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 750;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.ai-header-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 390px;
}

.ai-header-status span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 650;
}

.page-ai .ai-message-content {
    display: flex;
    gap: 10px;
    width: auto;
    margin: 0;
    padding: 13px 26px;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.018);
    overflow-x: auto;
}

.page-ai .ai-message-content span {
    display: inline-flex;
    align-items: center;
    color: var(--text-accent-muted);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.page-ai .ai-message-content span::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.75);
}

.page-ai .ai-message-content ul {
    display: none;
}

.page-ai #chat-container {
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 28px 26px;
    gap: 14px;
    border-radius: 0;
    scroll-padding-bottom: 20px;
}

.page-ai #chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin: 0;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(5, 5, 6, 0.28);
}

[data-theme="light"] .page-ai #chat-form {
    background: rgba(255, 255, 255, 0.58);
}

.page-ai .ai-chat-input {
    width: 100%;
    min-height: 52px;
    margin: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-default);
    padding: 0 18px;
    font-size: 15px;
}

[data-theme="light"] .page-ai .ai-chat-input {
    background: #ffffff;
}

.page-ai .ai-send-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-width: 92px;
    min-height: 52px;
    border-radius: 18px;
    border: 1px solid rgba(191, 219, 254, 0.68);
    background:
        radial-gradient(circle at 34% 10%, rgba(255, 255, 255, 0.95), transparent 17%),
        radial-gradient(circle at 74% 112%, rgba(96, 165, 250, 0.7), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(96, 165, 250, 0.68) 38%, rgba(37, 99, 235, 0.82));
    color: #ffffff;
    text-shadow: 0 1px 10px rgba(15, 23, 42, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        inset 0 -14px 28px rgba(30, 64, 175, 0.18),
        0 10px 22px rgba(37, 99, 235, 0.2);
    backdrop-filter: blur(16px) saturate(1.35);
    -webkit-backdrop-filter: blur(16px) saturate(1.35);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.page-ai .ai-send-btn::before,
.page-ai .ai-send-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.page-ai .ai-send-btn::before {
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.74), transparent 42%),
        radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.3), transparent 42%);
    opacity: 0.72;
}

.page-ai .ai-send-btn::after {
    background:
        linear-gradient(105deg, transparent 0 16%, rgba(255, 255, 255, 0.1) 28%, rgba(255, 255, 255, 0.86) 40%, rgba(125, 211, 252, 0.32) 50%, transparent 64% 100%);
    mix-blend-mode: screen;
    transform: translateX(-72%);
    opacity: 0.72;
    animation: ai-send-liquid-sheen 3.8s ease-in-out infinite;
}

.page-ai .ai-send-btn:hover:not(:disabled),
.page-ai .ai-send-btn:focus-visible:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(219, 234, 254, 0.82);
    filter: saturate(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        inset 0 -14px 28px rgba(30, 64, 175, 0.2),
        0 12px 26px rgba(37, 99, 235, 0.24);
}

.page-ai .ai-send-btn:disabled {
    filter: grayscale(0.12);
    opacity: 0.58;
}

[data-theme="light"] .page-ai .ai-send-btn {
    border-color: rgba(96, 165, 250, 0.5);
    background:
        radial-gradient(circle at 34% 8%, rgba(255, 255, 255, 0.98), transparent 18%),
        radial-gradient(circle at 76% 112%, rgba(96, 165, 250, 0.42), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(147, 197, 253, 0.64) 38%, rgba(59, 130, 246, 0.72));
    color: #082044;
    text-shadow: 0 1px 10px rgba(255, 255, 255, 0.65);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        inset 0 -14px 28px rgba(37, 99, 235, 0.12),
        0 10px 22px rgba(37, 99, 235, 0.14);
}

@keyframes ai-send-liquid-sheen {
    0%, 18% {
        transform: translateX(-74%) skewX(-12deg);
        opacity: 0.48;
    }
    48% {
        transform: translateX(74%) skewX(-12deg);
        opacity: 0.86;
    }
    100% {
        transform: translateX(74%) skewX(-12deg);
        opacity: 0.48;
    }
}

.page-ai .message {
    max-width: min(76%, 820px);
    padding: 12px 15px;
    border-radius: 17px;
    line-height: 1.45;
    font-size: 15px;
}

.page-ai .message.user {
    background: rgba(var(--accent-rgb), 0.16);
    border-color: rgba(var(--accent-rgb), 0.34);
    border-bottom-right-radius: 6px;
}

.page-ai .message.bot {
    background: rgba(255, 255, 255, 0.055);
    border-color: var(--border-default);
    border-bottom-left-radius: 6px;
}

.page-ai .message.bot.swap-quote-widget,
.page-ai .message.bot.wallet-analysis-widget,
.page-ai .message.bot.hot-tokens-widget,
.page-ai .message.bot.launchpad-volume-widget,
.page-ai .message.bot.token-info-widget {
    width: min(680px, 100%);
    max-width: min(84%, 760px);
    padding: 18px;
    border-radius: 18px;
}

.page-ai .swap-widget-grid {
    gap: 10px;
}

.page-ai .swap-widget-grid > div {
    border-radius: 12px;
    padding: 12px 13px;
}

.page-ai .swap-confirm-btn,
.page-ai .swap-cancel-btn {
    min-height: 44px;
    border-radius: 12px;
}

@media (max-width: 980px) {
    .page-ai {
        overflow: auto;
    }

    .ai-page-shell {
        width: min(760px, calc(100vw - 24px));
        height: auto;
        min-height: calc(100dvh - var(--landing-header-clearance, 92px) - 16px);
        padding-top: calc(var(--landing-header-clearance, 92px) + 10px);
        padding-bottom: 20px;
    }

    .ai-side-panel {
        padding: 16px;
        gap: 14px;
    }

    .ai-prompt-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 0;
    }

    .page-ai .ai-container {
        min-height: 68dvh;
    }
}

@media (max-width: 640px) {
    .page-ai .landing-header {
        padding: 12px 12px;
    }

    .page-ai .landing-nav {
        border-radius: 18px;
    }

    .ai-nav-link {
        display: none;
    }

    .ai-page-shell {
        width: calc(100vw - 20px);
        gap: 12px;
    }

    .ai-status-list {
        display: none;
    }

    .ai-prompt-grid {
        display: flex;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .page-ai .ai-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 16px 14px;
    }

    .ai-header-status {
        justify-content: flex-start;
        max-width: 100%;
    }

    .page-ai .ai-message-content {
        padding: 10px 16px;
    }

    .page-ai #chat-container {
        padding: 16px;
    }

    .page-ai #chat-form {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .page-ai .ai-send-btn {
        width: 100%;
    }

    .page-ai .message,
    .page-ai .message.bot.swap-quote-widget,
    .page-ai .message.bot.wallet-analysis-widget,
    .page-ai .message.bot.hot-tokens-widget,
    .page-ai .message.bot.launchpad-volume-widget,
    .page-ai .message.bot.token-info-widget {
        max-width: 100%;
    }

    .page-ai .swap-widget-grid {
        grid-template-columns: 1fr;
    }
}

/* Global mobile resilience. Keep this final so page-level desktop rules cannot win. */
html,
body {
    max-width: 100%;
}

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

@media (max-width: 640px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body {
        overflow-x: hidden;
        padding-bottom: calc(86px + env(safe-area-inset-bottom));
    }

    main,
    .dashboard-main,
    .course-main,
    .ai-main,
    .user-stats-main {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    button,
    input,
    select,
    textarea {
        max-width: 100%;
        font-size: max(16px, 1em);
    }

    .dash-dock-wrap {
        bottom: max(8px, env(safe-area-inset-bottom)) !important;
        padding: 0 10px !important;
    }

    .dash-dock {
        width: min(100%, 286px) !important;
        min-height: 62px !important;
        gap: 8px !important;
        padding: 8px !important;
        border-radius: 16px !important;
    }

    .dash-dock__item {
        width: 48px !important;
        height: 48px !important;
        border-radius: 11px !important;
    }

    .dash-dock__icon {
        width: 27px !important;
        height: 27px !important;
    }

    .dash-dock__icon svg {
        width: 25px !important;
        height: 25px !important;
    }

    .dash-dock__tooltip,
    .dash-dock-orbit {
        display: none !important;
    }

    .modal,
    .wallet-modal,
    .portfolio-modal,
    .pnl-card-dialog {
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100dvh - 24px) !important;
    }

    .wallet-modal-root {
        padding: 12px !important;
    }

    .wallet-modal-dialog {
        width: calc(100vw - 24px) !important;
        max-width: 400px !important;
        max-height: calc(100dvh - 24px) !important;
    }

    .wallet-modal-header {
        padding: 18px 16px 14px !important;
    }

    .wallet-modal-body {
        padding: 0 10px 14px !important;
    }

    .page-ai .ai-page-shell {
        width: calc(100vw - 20px);
        min-height: 0;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }

    .page-ai .ai-container {
        height: calc(100dvh - var(--landing-header-clearance, 92px) - 92px);
        min-height: 460px;
        overflow: hidden;
    }

    .page-ai #chat-form {
        grid-template-columns: minmax(0, 1fr) 76px;
        gap: 8px;
        margin: 0;
        padding: 10px;
    }

    .page-ai .ai-chat-input {
        min-width: 0;
        min-height: 48px;
    }

    .page-ai .ai-send-btn {
        width: 76px;
        min-width: 76px;
        min-height: 48px;
        margin: 0;
        padding: 0 12px;
    }
}
