/* ============================================
   DARK THEME
   ============================================ */
[data-theme="dark"] {
    --bg-body: #0a0a1a;
    --bg-header: rgba(12, 12, 30, 0.92);
    --bg-card: #12122a;
    --bg-card2: #181835;
    --bg-footer: #0d0d20;
    --bg-input: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(99, 102, 241, 0.3);
    --accent: #6366f1;
    --accent2: #8b5cf6;
    --accent-glow: rgba(99, 102, 241, 0.12);
    --gold: #f59e0b;
    --green: #10b981;
    --red: #ef4444;
    --cyan: #06b6d4;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.5);
}

/* ============================================
   LIGHT THEME
   ============================================ */
[data-theme="light"] {
    --bg-body: #f0f2f5;
    --bg-header: rgba(255, 255, 255, 0.92);
    --bg-card: #ffffff;
    --bg-card2: #f8f9fb;
    --bg-footer: #ffffff;
    --bg-input: rgba(0, 0, 0, 0.04);
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(99, 102, 241, 0.4);
    --accent: #6366f1;
    --accent2: #8b5cf6;
    --accent-glow: rgba(99, 102, 241, 0.08);
    --gold: #d97706;
    --green: #059669;
    --red: #dc2626;
    --cyan: #0891b2;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow: rgba(0, 0, 0, 0.06);
    --shadow-lg: rgba(0, 0, 0, 0.1);
}

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

body {
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s, color 0.3s;
}

a {
    text-decoration: none;
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* ============================================
   HEADER
   ============================================ */
.cc-header {
    background: var(--bg-header);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1050;
    transition: box-shadow 0.3s;
}

.cc-header.scrolled {
    box-shadow: 0 4px 24px var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 16px;
}

.cc-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cc-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: transform 0.3s;
}

.cc-logo:hover .cc-logo-icon {
    transform: rotate(-10deg) scale(1.05);
}

.cc-logo-icon i {
    font-size: 20px;
    color: #fff;
}

.cc-logo-svg {
    display: block;
    transition: transform 0.3s;
}

.cc-logo:hover .cc-logo-svg {
    transform: rotate(-6deg) scale(1.1);
}

.cc-logo-text {
    font-weight: 800;
    font-size: 18px;
    color: var(--text-primary);
    line-height: 1.1;
}

.cc-logo-text small {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Nav Links - logged in only */
.cc-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.cc-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
}

.cc-nav-link:hover {
    color: var(--text-primary);
    background: var(--accent-glow);
}

.cc-nav-link.active {
    color: var(--accent);
    background: var(--accent-glow);
}

.cc-nav-link i {
    font-size: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Theme Toggle */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.theme-toggle:hover {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(245, 158, 11, 0.1);
}

/* Balance */
.balance-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px 14px 6px 8px;
    transition: all 0.2s;
}

.balance-pill:hover {
    border-color: var(--gold);
}

.balance-icon {
    width: 28px;
    height: 28px;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.balance-icon i {
    color: var(--gold);
    font-size: 13px;
}

.balance-amount {
    font-weight: 700;
    font-size: 13px;
    color: var(--gold);
}

.balance-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bal-action-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--gold);
    background: rgba(245, 158, 11, 0.1);
    border: none;
    text-decoration: none;
    transition: all 0.2s;
    margin-left: 2px;
}

.bal-action-btn:hover {
    background: rgba(245, 158, 11, 0.25);
    color: var(--gold);
    transform: scale(1.1);
}

.bal-action-btn.deposit {
    color: var(--green);
    background: rgba(16, 185, 129, 0.1);
}

.bal-action-btn.deposit:hover {
    background: rgba(16, 185, 129, 0.25);
    color: var(--green);
}

.drawer-bal-action {
    width: 28px;
    height: 28px;
    font-size: 16px;
    margin-left: auto;
}

.balance-pill.pur-mode .balance-icon {
    background: rgba(16, 185, 129, 0.12);
}

.balance-pill.pur-mode .balance-icon i {
    color: var(--green);
}

.balance-pill.pur-mode .balance-amount {
    color: var(--green);
}

.balance-pill.pur-mode:hover {
    border-color: var(--green);
}

.balance-pill.tok-mode .balance-icon {
    background: rgba(6, 182, 212, 0.12);
}

.balance-pill.tok-mode .balance-icon i {
    color: var(--cyan);
}

.balance-pill.tok-mode .balance-amount {
    color: var(--cyan);
}

.balance-pill.tok-mode:hover {
    border-color: var(--cyan);
}

/* ── Withdrawal & Deposit Modal (global) ── */
.wm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all .25s;
}

.wm-overlay.open {
    opacity: 1;
    visibility: visible;
}

.wm-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: wmSlideIn .3s ease;
}

@keyframes wmSlideIn {
    from {
        transform: translateY(30px);
        opacity: 0
    }

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

.wm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.wm-header h3 {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wm-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.wm-close:hover {
    color: var(--text-primary);
}

.wm-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wm-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wm-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.wm-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.wm-select:focus {
    outline: none;
    border-color: var(--gold);
}

.wm-available {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(245, 158, 11, .08), rgba(99, 102, 241, .06));
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
}

.wm-avail-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.wm-avail-val {
    font-size: 16px;
    font-weight: 900;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

.wm-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.wm-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.wm-input:focus {
    outline: none;
    border-color: var(--gold);
}

.wm-max-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, .3);
    background: rgba(245, 158, 11, .1);
    color: #f59e0b;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.wm-max-btn:hover {
    background: rgba(245, 158, 11, .2);
}

.wm-conversion {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wm-conv-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wm-conv-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.wm-conv-val {
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.wm-conv-val.crypto {
    color: #818cf8;
}

.wm-conv-val.usd {
    color: #10b981;
}

.wm-conv-val.fee {
    color: #f59e0b;
}

.wm-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.wm-info-row i {
    font-size: 14px;
}

.wm-info-row .wm-addr {
    font-weight: 700;
    color: var(--text-primary);
}

.wm-info-row .wm-method {
    font-weight: 700;
}

.wm-method-auto {
    color: #10b981;
}

.wm-method-manual {
    color: #f59e0b;
}

.wm-submit {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all .2s;
    letter-spacing: .5px;
}

.wm-submit:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.wm-submit:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.wm-submit.deposit-btn {
    background: linear-gradient(135deg, #10b981, #059669);
}

.dm-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dm-method-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
}

.dm-method-card:hover {
    border-color: var(--green);
    background: rgba(16, 185, 129, .05);
}

.dm-method-card.active {
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, .2);
}

.dm-method-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(16, 185, 129, .1);
    color: var(--green);
    flex-shrink: 0;
}

.dm-method-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.dm-method-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* User Button */
.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 5px 12px 5px 5px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.user-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
    font-weight: 700;
}

/* User Dropdown */
.user-dropdown {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 6px;
    min-width: 240px;
    box-shadow: 0 20px 50px var(--shadow-lg);
    margin-top: 8px !important;
}

.user-dropdown .dropdown-item {
    color: var(--text-secondary);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-dropdown .dropdown-item:hover {
    background: var(--accent-glow);
    color: var(--text-primary);
}

.user-dropdown .dropdown-item i {
    width: 18px;
    text-align: center;
}

.user-dropdown .dropdown-divider {
    border-color: var(--border);
    margin: 4px 8px;
}

.uinfo {
    padding: 12px 14px;
}

.uinfo-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 15px;
}

.uinfo-email {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 2px;
}

.uinfo-level {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--gold);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    margin-top: 6px;
}

/* ── PK Header Extensions ── */
.user-avatar.pk-active {
    background: linear-gradient(135deg, #ef4444, #991b1b);
    position: relative;
    overflow: visible;
}

.pk-live-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border: 2px solid var(--bg-header);
    border-radius: 50%;
    animation: pkPulse 1.5s ease-in-out infinite;
}

@keyframes pkPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1)
    }

    50% {
        opacity: .4;
        transform: scale(1.2)
    }
}

.pk-header-box {
    background: var(--bg-card2);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 12px;
    margin: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pk-hb-title {
    font-size: 10px;
    font-weight: 700;
    color: #ef4444;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pk-hb-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pk-hb-player {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.pk-hb-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pk-hb-score {
    font-size: 15px;
    font-weight: 900;
    color: #ef4444;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}

.pk-hb-score.winning {
    color: #22c55e;
}

.pk-hb-badge {
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    flex-shrink: 0;
}

.pk-hb-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #ef4444;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
}

.pk-hb-link:hover {
    opacity: 0.8;
}


/* Auth Buttons (Guest) */
.btn-auth-login {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.btn-auth-login:hover {
    color: var(--text-primary);
    background: var(--accent-glow);
}

.btn-auth-register {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 10px;
    border: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 12px var(--accent-glow);
    cursor: pointer;
}

.btn-auth-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
    color: #fff !important;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
}

/* Mobile Drawer */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1059;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-overlay.show {
    display: block;
    opacity: 1;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 1060;
    padding: 20px;
    overflow-y: auto;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 40px var(--shadow-lg);
}

.mobile-drawer.show {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.drawer-close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
}

.drawer-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
}

.drawer-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s;
}

.drawer-link:hover {
    background: var(--accent-glow);
    color: var(--text-primary);
}

.drawer-link i {
    font-size: 18px;
    width: 22px;
    text-align: center;
}

.drawer-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 0;
}

.drawer-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 8px 14px 4px;
    font-weight: 600;
}

.drawer-balance {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(99, 102, 241, 0.08));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-balance-icon {
    width: 40px;
    height: 40px;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gold);
}

.drawer-balance-amount {
    font-weight: 800;
    font-size: 16px;
    color: var(--gold);
}

.drawer-balance-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================
   MAIN
   ============================================ */
.cc-main {
    flex: 1;
    padding: 24px 0;
}

/* ============================================
   FOOTER
   ============================================ */
.cc-footer {
    background: var(--bg-footer);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding: 50px 0 30px;
}

.footer-brand-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.footer-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-brand-icon i {
    color: #fff;
    font-size: 16px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 15px;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.footer-stats {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.footer-stat-value {
    font-weight: 800;
    font-size: 16px;
    color: var(--accent);
}

.footer-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.footer-heading {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.footer-links a i {
    font-size: 10px;
}

.footer-newsletter-text {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.newsletter-group {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
}

.newsletter-group input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 13px;
    flex: 1;
    outline: none;
    font-family: inherit;
}

.newsletter-group input::placeholder {
    color: var(--text-muted);
}

.newsletter-group button {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    font-size: 14px;
}

.crypto-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.crypto-badge {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
}

/* Footer Auth Buttons */
.footer-auth {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.footer-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.footer-auth-login {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.footer-auth-login:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.footer-auth-register {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.footer-auth-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-bottom-text {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-bottom-text a {
    color: var(--accent);
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: var(--text-muted);
    font-size: 13px;
    transition: color 0.2s;
}

.footer-bottom-links a:hover {
    color: var(--accent);
}

/* ============================================
   AUTH MODALS - GAME STYLE
   ============================================ */
.auth-modal .modal-dialog {
    max-width: 420px;
}

.auth-modal .modal-content {
    background: transparent;
    border: none;
}

.game-card {
    background: linear-gradient(160deg, #12122e, #1a1a40, #12122e);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .game-card {
    background: linear-gradient(160deg, #ffffff, #f8f9ff, #ffffff);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #6366f1, #8b5cf6, #ec4899);
    background-size: 200% 100%;
    animation: glowBar 3s linear infinite;
}

@keyframes glowBar {
    0% {
        background-position: 0% 0%
    }

    100% {
        background-position: 200% 0%
    }
}

.game-card::after {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%);
    border-radius: 50%;
}

.game-header {
    text-align: center;
    padding: 30px 30px 0;
    position: relative;
    z-index: 2;
}

.game-avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
    animation: avatarPulse 3s ease-in-out infinite;
    position: relative;
}

@keyframes avatarPulse {

    0%,
    100% {
        box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3)
    }

    50% {
        box-shadow: 0 8px 40px rgba(99, 102, 241, 0.5)
    }
}

.game-avatar i {
    font-size: 32px;
    color: #fff;
}

.game-avatar .xp-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #f59e0b;
    color: #000;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
}

.game-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.game-subtitle {
    color: var(--text-muted);
    font-size: 13px;
}

.game-body {
    padding: 24px 30px 30px;
    position: relative;
    z-index: 2;
}

.game-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.game-label i {
    color: var(--accent);
    font-size: 14px;
}

.game-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
    outline: none;
    margin-bottom: 16px;
}

.game-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-card);
}

.game-input::placeholder {
    color: var(--text-muted);
}

.game-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.game-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.45);
}

.game-btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.game-btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.game-footer {
    text-align: center;
    padding: 0 30px 24px;
    position: relative;
    z-index: 2;
}

.game-footer a {
    color: #818cf8;
    font-weight: 600;
    font-size: 14px;
}

.game-footer a:hover {
    color: #a5b4fc;
}

.game-footer span {
    color: var(--text-muted);
    font-size: 14px;
}

.game-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    font-size: 16px;
    transition: all 0.2s;
}

.game-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.auth-modal .modal-dialog {
    transform: scale(0.8);
    transition: transform 0.3s;
}

.auth-modal.show .modal-dialog {
    transform: scale(1);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0)
    }

    20% {
        transform: translateX(-8px)
    }

    40% {
        transform: translateX(8px)
    }

    60% {
        transform: translateX(-5px)
    }

    80% {
        transform: translateX(5px)
    }
}

.game-input.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* ── Tablet & below (≤1199px) ───────────────
   الـ nav links تصغر شوية
*/
@media (max-width: 1199px) {
    .cc-nav-parent {
        padding: 7px 10px;
        font-size: 13px;
    }

    .balance-pill {
        padding: 5px 10px 5px 6px;
    }

    .balance-amount {
        font-size: 12px;
    }
}

/* ── Tablet (≤991px) ────────────────────────
   الـ nav يختفي ويظهر الـ hamburger
*/
@media (max-width: 991px) {
    .cc-nav {
        display: none !important;
    }

    .mobile-toggle {
        display: flex;
    }

    .balance-pill .balance-label {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .header-inner {
        gap: 10px;
    }
}

/* ── Large Mobile (≤767px) ──────────────────
   تصغير Balance + اسم اليوزر
*/
@media (max-width: 767px) {
    .balance-pill {
        display: none;
    }

    /* شيل البالانس من الهيدر */
    .user-btn .uname {
        display: none;
    }

    /* بس الأفاتار */
    .user-btn {
        padding: 5px;
        border-radius: 10px;
    }

    .cc-logo-text {
        font-size: 16px;
    }

    .header-inner {
        padding: 8px 0;
        gap: 8px;
    }
}

/* ── Small Mobile (≤575px) ──────────────────
   أصغر تنسيق
*/
@media (max-width: 575px) {

    /* Header */
    .header-inner {
        gap: 6px;
        padding: 6px 0;
    }

    .cc-logo-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .cc-logo-icon i {
        font-size: 17px;
    }

    .cc-logo-text {
        font-size: 14px;
    }

    .cc-logo-text small {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .theme-toggle {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    /* Auth buttons (guest) */
    .btn-auth-login span {
        display: none;
    }

    .btn-auth-register span {
        display: none;
    }

    .btn-auth-login {
        padding: 7px 10px;
    }

    .btn-auth-register {
        padding: 7px 12px;
    }

    /* User dropdown */
    .user-btn {
        padding: 4px 8px 4px 4px;
        gap: 5px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }

    .footer-grid {
        padding-top: 32px;
    }

    /* Auth Modals */
    .game-body {
        padding: 16px;
    }

    .game-header {
        padding: 20px 16px 0;
    }

    .game-footer {
        padding: 0 16px 20px;
    }

    .game-avatar {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .game-avatar i {
        font-size: 26px;
    }

    .game-title {
        font-size: 19px;
    }
}

/* ── Extra Small (≤380px) ───────────────────
   أجهزة صغيرة جداً
*/
@media (max-width: 380px) {
    .cc-logo-text small {
        display: none;
    }

    .cc-logo-text {
        font-size: 13px;
    }

    .balance-pill {
        display: none;
    }

    .theme-toggle {
        width: 30px;
        height: 30px;
        font-size: 13px;
        border-radius: 8px;
    }
}

/* ── Mobile Drawer ───────────────────────────
   إصلاح الـ drawer على الشاشات الصغيرة
*/
@media (max-width: 400px) {
    .mobile-drawer {
        width: 100vw;
        right: -100vw;
        border-left: none;
        border-radius: 0;
    }

    .mobile-drawer.show {
        right: 0;
    }
}

/* ============================================
   NAV DROPDOWN MENUS
   ============================================ */
.cc-nav-dropdown {
    position: relative;
}

.cc-nav-parent {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    white-space: nowrap;
}

.cc-nav-parent:hover,
.cc-nav-dropdown:hover .cc-nav-parent {
    color: var(--text-primary);
    background: var(--accent-glow);
}

.cc-caret {
    font-size: 10px;
    transition: transform 0.25s;
    margin-left: 2px;
}

.cc-nav-dropdown:hover .cc-caret {
    transform: rotate(180deg);
}

/* Dropdown Panel */
.cc-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    z-index: 1100;
    box-shadow: 0 20px 60px var(--shadow-lg);
    animation: dropIn 0.18s ease;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.cc-nav-dropdown:hover .cc-dropdown-menu {
    display: block;
}

/* بريدج مخفي عشان الماوس يعدي من الـ btn للـ menu */
.cc-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 12px;
}

/* Section title */
.cc-dropdown-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    font-weight: 700;
    padding: 6px 10px 4px;
    margin-top: 4px;
}

.cc-dropdown-section:first-child {
    margin-top: 0;
}

/* Dropdown Item */
.cc-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--text-secondary);
    transition: all 0.18s;
    cursor: pointer;
}

.cc-dropdown-item:hover {
    background: var(--accent-glow);
    color: var(--text-primary);
    transform: translateX(3px);
}

/* Icon circle */
.cc-drop-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.cc-drop-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.2;
}

.cc-drop-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ============================================
   FOOTER LINKS - emoji style override
   ============================================ */
.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 13.5px;
    transition: all 0.2s;
    padding: 2px 0;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 4px;
}

/* ============================================
   GLOBAL MOBILE FIXES
   ============================================ */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* منع الـ dropdown يطلع برا الشاشة */
@media (max-width: 1199px) {
    .cc-dropdown-menu {
        left: auto;
        right: 0;
        transform: translateX(0);
    }

    .cc-dropdown-menu::before {
        left: 0;
        right: 0;
    }
}

/* الـ dropdown الأول يفضل على اليسار */
.cc-nav-dropdown:first-child .cc-dropdown-menu {
    left: 0;
    right: auto;
    transform: translateX(0);
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

/* Touch devices - الـ dropdown يشتغل بالكليك مش hover */
@media (hover: none) and (pointer: coarse) {
    .cc-nav-dropdown:hover .cc-dropdown-menu {
        display: none;
    }

    .cc-nav-dropdown.open .cc-dropdown-menu {
        display: block;
    }

    .cc-nav-dropdown:hover .cc-caret {
        transform: none;
    }

    .cc-nav-dropdown.open .cc-caret {
        transform: rotate(180deg);
    }
}

/* Active state for nav parent when child page is active */
.cc-nav-parent.active {
    color: var(--accent);
    background: var(--accent-glow);
}