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

:root {
    --bg-0: #0a0a0e;
    --bg-1: #0e0e12;
    --bg-2: #161620;
    --bg-3: #1c1c28;
    --line: rgba(255, 255, 255, 0.08);
    --line-soft: rgba(255, 255, 255, 0.06);
    --text-main: rgba(255, 255, 255, 0.9);
    --text-mid: rgba(255, 255, 255, 0.55);
    --text-low: rgba(255, 255, 255, 0.35);
    --accent: #c0392b;
    --accent-bright: #e05c3c;
    --p2: #4a9eff;
    --ok: #4caf50;
}

.dashboard-page {
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
}

.dashboard-page .dashboard-container {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)) , var(--bg-2);
}

.client-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 8px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
}

.client-tab {
    text-decoration: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-low);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.client-tab:hover {
    color: var(--text-main);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.client-tab.active {
    color: var(--accent-bright);
    border-color: rgba(224, 92, 60, 0.32);
    background: rgba(224, 92, 60, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at 20% 20%, #16161f 0%, var(--bg-0) 55%);
    color: var(--text-main);
    min-height: 100vh;
}

.container {
    width: 92%;
    max-width: 1180px;
    padding: 2%;
    margin: 0 auto;
}

.auth-container,
.dashboard-container {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 2%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.auth-header {
    text-align: center;
    margin-bottom: 18px;
}

.auth-header h1 {
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    color: var(--accent-bright);
    letter-spacing: 0.03em;
}

.auth-header p {
    margin-top: 6px;
    color: var(--text-low);
    font-size: 0.95rem;
}

.toggle-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 3px;
    border-radius: 9px;
    background: var(--bg-1);
    margin-bottom: 18px;
}

.toggle-btn {
    border: none;
    border-radius: 6px;
    padding: 9px;
    background: transparent;
    color: var(--text-mid);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.toggle-btn.active {
    background: var(--accent);
    color: #fff;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-mid);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.8em 0.9em;
    background: var(--bg-1);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
}

.form-group input:focus {
    border-color: rgba(224, 92, 60, 0.55);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.24);
}

.submit-btn,
.logout-btn,
.secondary-btn {
    border-radius: 8px;
    padding: 10px 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: filter 0.15s ease;
    font-weight: 600;
}

.submit-btn {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border-color: var(--accent-bright);
}

.logout-btn {
    width: auto;
    min-width: 130px;
    background: var(--accent);
    color: #fff;
    border-color: var(--accent-bright);
}

.secondary-btn {
    background: #242435;
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-main);
}

.submit-btn:hover,
.logout-btn:hover,
.secondary-btn:hover,
.nav-btn:hover,
.btn-primary:hover,
.btn-secondary:hover {
    filter: brightness(1.12);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    filter: none;
}

.submit-btn.is-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    flex-shrink: 0;
    animation: auth-spin 0.7s linear infinite;
}

.message {
    margin-top: 12px;
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    display: none;
}

.message.success {
    display: block;
    background: rgba(76, 175, 80, 0.15);
    border-left: 3px solid var(--ok);
}

.message.error {
    display: block;
    background: rgba(192, 57, 43, 0.15);
    border-left: 3px solid var(--accent-bright);
}

.message.info {
    display: block;
    background: rgba(74, 158, 255, 0.15);
    border-left: 3px solid var(--p2);
}

.dashboard-container {
    width: 100%;
    max-width: none;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 38% 62%;
    gap: 14px;
    align-items: start;
}

.dashboard-main,
.dashboard-side {
    display: grid;
    gap: 12px;
}

.quick-stats-card,
.quick-actions-card {
    background: var(--bg-3);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    padding: 14px;
}

.quick-stats-card h3,
.quick-actions-card h3 {
    color: var(--accent-bright);
    margin-bottom: 10px;
}

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

.quick-stat {
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 10px;
    display: grid;
    gap: 4px;
}

.quick-stat-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-low);
}

.quick-stat-value {
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    font-weight: 700;
    color: var(--text-main);
}

.quick-actions-grid {
    display: grid;
    gap: 8px;
}

.quick-actions-grid .secondary-btn {
    width: 100%;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.dashboard-header h1 {
    color: var(--accent-bright);
}

@media (max-width: 900px) {
    .container {
        width: 96%;
        padding: 3%;
    }

    .auth-container,
    .dashboard-container {
        padding: 3%;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

.user-info,
.token-info {
    background: var(--bg-3);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

.user-info h2,
.token-info h3 {
    color: var(--accent-bright);
    margin-bottom: 8px;
}

.info-card,
.token-card {
    background: rgba(0, 0, 0, 0.24);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
}

.info-card p {
    margin: 6px 0;
}

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

.status-valid {
    color: var(--ok);
    font-weight: 700;
}

.status-invalid {
    color: var(--accent-bright);
    font-weight: 700;
}

.retention-info {
    background: var(--bg-3);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    padding: 14px;
}

.retention-info h3 {
    color: var(--accent-bright);
    margin-bottom: 10px;
}

.retention-block {
    background: rgba(0, 0, 0, 0.24);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.retention-block:last-child {
    margin-bottom: 0;
}

.retention-block h4 {
    margin-bottom: 8px;
    color: var(--text-main);
}

.retention-subtext {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-mid);
}

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

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-bright));
    transition: width 0.35s ease;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.achievement-card {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.02);
}

.achievement-card.unlocked {
    border-color: rgba(224, 92, 60, 0.5);
    background: rgba(224, 92, 60, 0.12);
}

.achievement-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.achievement-meta {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-mid);
}

.quest-list {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.quest-item {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.02);
}

.quest-item.complete {
    border-color: rgba(76, 175, 80, 0.5);
    background: rgba(76, 175, 80, 0.14);
}

.quest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.quest-progress {
    margin-top: 6px;
    color: var(--text-mid);
    font-size: 12px;
}

.game-launch {
    margin-top: 2px;
    text-align: center;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.landing-body {
    display: block;
}

.lp {
    background: var(--bg-0);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    max-width: 1200px;
    margin: 18px auto;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(10, 10, 14, 0.95);
}

.nav-logo {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-bright);
    letter-spacing: 0.1em;
}

.nav-links {
    display: flex;
    gap: 16px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-mid);
    font-size: 12px;
}

.nav-btn {
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent-bright);
    border-radius: 8px;
}

.hero {
    padding: 56px 24px 42px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.laser-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.laser-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(224, 92, 60, 0.45), transparent);
}

.hero-eyebrow {
    letter-spacing: 0.14em;
    color: var(--accent-bright);
    font-size: 11px;
    margin-bottom: 12px;
}

.hero-title {
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.1;
    margin-bottom: 8px;
}

.hero-title span {
    color: var(--accent-bright);
}

.hero-sub {
    max-width: 540px;
    margin: 0 auto 24px;
    color: var(--text-low);
    line-height: 1.6;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.btn-primary,
.btn-secondary {
    text-decoration: none;
    border-radius: 8px;
    padding: 11px 20px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent-bright);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.16);
}

.board-preview {
    display: inline-grid;
    grid-template-columns: repeat(10, 20px);
    grid-template-rows: repeat(8, 20px);
    gap: 2px;
    background: #0e0e16;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
}

.bp-cell {
    border-radius: 2px;
    background: #1a1a24;
}

.bp-red {
    background: #c0392b;
    border: 1px solid #e05c3c;
}

.bp-blue {
    background: #1a4a7a;
    border: 1px solid #4a9eff;
}

.bp-silver {
    background: #2e2e3a;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bp-zone-r {
    background: rgba(224, 92, 60, 0.08);
}

.bp-zone-b {
    background: rgba(74, 158, 255, 0.08);
}

.bp-laser {
    background: rgba(224, 92, 60, 0.35);
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.stat-item {
    text-align: center;
    padding: 16px 10px;
    border-right: 1px solid var(--line-soft);
}

.stat-item:last-child {
    border-right: none;
}

.stat-num {
    font-size: 20px;
    font-weight: 700;
}

.stat-lbl {
    margin-top: 3px;
    font-size: 11px;
    color: var(--text-low);
}

.features {
    padding: 28px 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.feat-card {
    background: #141420;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    padding: 16px;
}

.feat-primary {
    border-color: rgba(224, 92, 60, 0.25);
}

.feat-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

.feat-desc {
    font-size: 12px;
    color: var(--text-low);
    line-height: 1.5;
}

.how {
    padding: 26px 24px;
    border-top: 1px solid var(--line-soft);
}

.section-title {
    text-align: center;
    margin-bottom: 16px;
    font-size: 18px;
}

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

.step {
    text-align: center;
}

.step-num {
    width: 28px;
    height: 28px;
    margin: 0 auto 8px;
    border-radius: 50%;
    border: 1px solid rgba(224, 92, 60, 0.4);
    background: rgba(224, 92, 60, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-bright);
    font-weight: 700;
}

.step-title {
    font-size: 13px;
    margin-bottom: 4px;
}

.step-desc {
    font-size: 11px;
    color: var(--text-low);
    line-height: 1.5;
}

.cta {
    text-align: center;
    padding: 34px 24px;
    border-top: 1px solid var(--line-soft);
    background: rgba(224, 92, 60, 0.04);
}

.cta-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.cta-sub {
    color: var(--text-low);
    margin-bottom: 16px;
}

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

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .container {
        padding: 12px;
    }

    .auth-container,
    .dashboard-container {
        padding: 16px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .stats-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

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

    .token-card {
        flex-direction: column;
        align-items: stretch;
    }

    .logout-btn {
        width: 100%;
    }
}

/* Global responsive baseline */
html {
    font-size: clamp(14px, 0.28vw + 12.8px, 18px);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* Global chat-style typography override */
:root {
    --global-chat-font: 'JetBrains Mono', monospace;
}

html,
body,
body * {
    font-family: var(--global-chat-font) !important;
}
