/* ============================================
   EARNPLAY — PREMIUM DESIGN SYSTEM
   Million-Dollar Mobile-First UI
   Font: Manrope | Icons: Lucide
   Theme: Dark Glass + Neon Green
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    /* Neon Green Palette */
    --accent: #00E676;
    --accent-dim: #00C853;
    --accent-glow: rgba(0, 230, 118, 0.25);
    --accent-subtle: rgba(0, 230, 118, 0.08);
    --accent-border: rgba(0, 230, 118, 0.15);

    /* Background Layers */
    --bg-deep: #0a0e17;
    --bg-primary: #0f1420;
    --bg-card: rgba(17, 24, 39, 0.6);
    --bg-card-solid: #111827;
    --bg-elevated: rgba(24, 32, 48, 0.65);
    --bg-glass: rgba(15, 20, 32, 0.55);
    --bg-input: rgba(17, 24, 39, 0.8);
    --bg-hover: rgba(0, 230, 118, 0.06);

    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(0, 230, 118, 0.2);

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: rgba(241, 245, 249, 0.6);
    --text-tertiary: rgba(241, 245, 249, 0.35);
    --text-accent: #00E676;

    /* Status */
    --success: #00E676;
    --warning: #FFB300;
    --danger: #ef4444;
    --info: #60a5fa;

    /* Typography */
    --font-xs: 0.7rem;
    --font-sm: 0.8rem;
    --font-base: 0.9rem;
    --font-md: 1rem;
    --font-lg: 1.15rem;
    --font-xl: 1.35rem;
    --font-2xl: 1.6rem;
    --font-3xl: 2rem;

    /* Spacing Scale */
    --s-2: 4px;
    --s-4: 8px;
    --s-6: 12px;
    --s-8: 16px;
    --s-12: 24px;
    --s-16: 32px;
    --s-20: 40px;
    --s-24: 48px;

    /* Radius */
    --r-xs: 6px;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-xl: 24px;
    --r-full: 9999px;

    /* Glass Blur */
    --blur: blur(24px);
    --blur-heavy: blur(40px);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 30px rgba(0, 230, 118, 0.15);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.04);

    /* Layout */
    --header-h: 48px;
    --sidebar-w: 270px;
    --max-w: 480px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Subtle animated gradient on body */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 20%, rgba(0, 230, 118, 0.04) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(0, 150, 136, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: ambientShift 30s ease-in-out infinite alternate;
}

@keyframes ambientShift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-5%, -5%) rotate(3deg); }
}

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* ---- Header (Slim & Sleek) ---- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: var(--blur-heavy);
    -webkit-backdrop-filter: var(--blur-heavy);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

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

.sidebar-toggle {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    padding: 0;
    flex-shrink: 0;
}
.sidebar-toggle:hover { color: var(--text-primary); }
.sidebar-toggle svg { width: 20px; height: 20px; }

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-img {
    height: 28px;
    width: auto;
    display: block;
}

/* Header links for guests */
.header-link {
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.2s;
}
.header-link:hover { color: var(--text-primary); opacity: 1; }

/* Wallet badge - compact */
.wallet-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    border-radius: var(--r-full);
    padding: 4px 12px;
    font-weight: 700;
    font-size: 0.7rem;
    color: var(--accent);
    text-decoration: none;
}
.wallet-badge svg { flex-shrink: 0; }

/* Avatar button */
.header-avatar-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, var(--accent), #00C853);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.65rem;
    color: #0a0e17;
    text-decoration: none;
    flex-shrink: 0;
}

/* ---- Sidebar ---- */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: var(--sidebar-w);
    height: 100%;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: var(--blur-heavy);
    -webkit-backdrop-filter: var(--blur-heavy);
    border-right: 1px solid var(--border);
    z-index: 2000;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.sidebar.active { left: 0; }

.sidebar-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-light);
    border-radius: var(--r-sm);
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-profile {
    padding: var(--s-12) var(--s-8);
    border-bottom: 1px solid var(--border);
}

.sidebar-avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--accent), #00C853);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #0a0e17;
    margin-bottom: var(--s-4);
}

.sidebar-name {
    font-weight: 700;
    font-size: var(--font-md);
    margin-bottom: 2px;
}
.sidebar-email {
    font-size: var(--font-xs);
    color: var(--text-tertiary);
}
.sidebar-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-4);
    margin-top: var(--s-6);
}
.sidebar-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: var(--s-4) var(--s-6);
    text-align: center;
}
.sidebar-stat-value {
    font-weight: 800;
    font-size: var(--font-md);
    color: var(--accent);
    line-height: 1.2;
}
.sidebar-stat-label {
    font-size: 0.6rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sidebar-menu { padding: var(--s-6) 0; flex: 1; }

.sidebar-menu-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: var(--s-8) var(--s-8) var(--s-2);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--s-6);
    padding: 10px var(--s-8);
    color: var(--text-secondary);
    font-size: var(--font-sm);
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    text-decoration: none;
}
.sidebar-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.sidebar-link.active {
    color: var(--accent);
    background: var(--accent-subtle);
    border-left-color: var(--accent);
    font-weight: 600;
}
.sidebar-link svg { width: 18px; height: 18px; opacity: 0.5; flex-shrink: 0; }
.sidebar-link.active svg { opacity: 1; }

/* ---- Main Content ---- */
.main-content {
    padding: calc(var(--header-h) + var(--s-8)) var(--s-8) calc(var(--s-16) + var(--safe-bottom));
    max-width: var(--max-w);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ---- Glass Card System ---- */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-8);
    box-shadow: var(--shadow-card);
    transition: all 0.25s;
}
.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.02);
}

.card-flat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.card-accent {
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    border-radius: var(--r-lg);
    padding: var(--s-8);
}

/* ---- Stats Grid ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-6);
    margin-bottom: var(--s-12);
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-8);
    text-align: center;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover { border-color: var(--accent-border); }

.stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto var(--s-4);
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}
.stat-icon i { width: 20px; height: 20px; }

.stat-value {
    font-size: var(--font-xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 2px;
}
.stat-label {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

/* ---- Sections ---- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s-6);
}
.section-title {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    font-size: var(--font-md);
    font-weight: 700;
    color: var(--text-primary);
}
.section-title i { width: 20px; height: 20px; color: var(--accent); }
.section-link {
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
}
.section-link i { width: 14px; height: 14px; }

/* ---- Task Cards ---- */
.task-grid {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

.task-card {
    display: flex;
    align-items: center;
    gap: var(--s-6);
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-6) var(--s-8);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.task-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--accent-subtle));
    opacity: 0;
    transition: opacity 0.2s;
}
.task-card:hover { border-color: var(--accent-border); transform: translateY(-1px); }
.task-card:hover::after { opacity: 1; }
.task-card:active { transform: scale(0.98); }

.task-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    position: relative;
    z-index: 1;
}
.task-icon i { width: 20px; height: 20px; }

.task-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.task-title {
    font-weight: 600;
    font-size: var(--font-sm);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.task-meta {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    font-size: var(--font-xs);
    color: var(--text-tertiary);
    margin-top: 2px;
}
.task-meta i { width: 12px; height: 12px; }

.task-reward {
    font-weight: 800;
    font-size: var(--font-sm);
    color: var(--accent);
    white-space: nowrap;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}
.task-reward i { width: 16px; height: 16px; }

/* ---- Game Cards ---- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-6);
}

.game-card {
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
}
.game-card:hover { border-color: var(--accent-border); transform: translateY(-2px); box-shadow: var(--shadow-glow); }

.game-card-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    background: var(--bg-elevated);
}

.game-card-body { padding: var(--s-6); }
.game-card-title { font-weight: 700; font-size: var(--font-sm); margin-bottom: 4px; }
.game-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-xs);
    color: var(--text-tertiary);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-4);
    padding: 10px 20px;
    border-radius: var(--r-md);
    font-weight: 700;
    font-size: var(--font-sm);
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.3;
}
.btn i { width: 16px; height: 16px; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #00C853);
    color: #0a0e17;
    box-shadow: 0 4px 16px rgba(0, 230, 118, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(0, 230, 118, 0.4);
    transform: translateY(-1px);
    opacity: 1;
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}
.btn-secondary:hover { border-color: var(--accent-border); background: var(--bg-hover); }

.btn-danger { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }

.btn-sm { padding: 6px 14px; font-size: var(--font-xs); border-radius: var(--r-sm); }
.btn-lg { padding: 14px 28px; font-size: var(--font-base); border-radius: var(--r-md); }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- Forms ---- */
.form-group { margin-bottom: var(--s-8); }
.form-label {
    display: block;
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--s-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-input {
    width: 100%;
    padding: 12px var(--s-8);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-size: var(--font-base);
    transition: all 0.2s;
    outline: none;
}
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder { color: var(--text-tertiary); }
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input { appearance: none; cursor: pointer; }

/* ---- Auth Pages ---- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-8);
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: var(--s-16);
    box-shadow: var(--shadow-lg);
}
.auth-title {
    font-size: var(--font-xl);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--s-2);
}
.auth-subtitle {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--s-12);
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
    width: 100%;
    max-width: var(--max-w);
    max-height: 90vh;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .modal { transform: translateY(0); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s-8);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card-solid);
    z-index: 1;
}
.modal-title { font-weight: 700; font-size: var(--font-md); }
.modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-body { padding: var(--s-8); }

/* ---- Leaderboard ---- */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: var(--s-6);
    padding: var(--s-6) var(--s-8);
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.leaderboard-item:last-child { border-bottom: none; }
.leaderboard-item:hover { background: var(--bg-hover); }

.leaderboard-rank {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: var(--r-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: var(--font-xs);
    color: var(--text-secondary);
}
.leaderboard-item:nth-child(1) .leaderboard-rank {
    background: linear-gradient(135deg, #FFD700, #FFA000);
    color: #0a0e17;
    border-color: transparent;
}
.leaderboard-item:nth-child(2) .leaderboard-rank {
    background: linear-gradient(135deg, #C0C0C0, #9E9E9E);
    color: #0a0e17;
    border-color: transparent;
}
.leaderboard-item:nth-child(3) .leaderboard-rank {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: #0a0e17;
    border-color: transparent;
}

.leaderboard-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: var(--r-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-sm);
}
.leaderboard-info { flex: 1; min-width: 0; }
.leaderboard-name { font-weight: 600; font-size: var(--font-sm); }
.leaderboard-tasks { font-size: var(--font-xs); color: var(--text-tertiary); }
.leaderboard-coins {
    font-weight: 800;
    font-size: var(--font-sm);
    color: var(--accent);
}

/* ---- Achievements ---- */
.achievement-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-4);
}
.achievement-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-6);
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.achievement-item.earned {
    border-color: var(--accent-border);
    background: var(--accent-subtle);
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.1);
}
.achievement-item.earned::after {
    content: '\2713';
    position: absolute;
    top: 6px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #00C853);
    color: #0a0e17;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(0, 230, 118, 0.4);
}
.achievement-item.locked {
    opacity: 0.45;
    filter: grayscale(60%);
}
.achievement-item.locked::after {
    content: '🔒';
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.65rem;
    opacity: 0.6;
}
.achievement-icon { font-size: 1.5rem; margin-bottom: var(--s-2); }
.achievement-title { font-weight: 700; font-size: var(--font-xs); margin-bottom: 2px; }
.achievement-desc { font-size: 0.6rem; color: var(--text-tertiary); }

/* ---- Table ---- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-xs);
}
.data-table th {
    text-align: left;
    padding: var(--s-6) var(--s-4);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: var(--s-6) var(--s-4);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--bg-hover); }

/* ---- Badge ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success { background: rgba(0, 230, 118, 0.1); color: var(--accent); border: 1px solid var(--accent-border); }
.badge-warning { background: rgba(255,179,0,0.1); color: var(--warning); border: 1px solid rgba(255,179,0,0.2); }
.badge-danger { background: rgba(239,68,68,0.1); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.badge-info { background: rgba(96,165,250,0.1); color: var(--info); border: 1px solid rgba(96,165,250,0.2); }

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: var(--s-2);
    margin-bottom: var(--s-8);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s;
}
.tab:hover { border-color: var(--border-light); color: var(--text-primary); }
.tab.active {
    background: var(--accent);
    color: #0a0e17;
    border-color: var(--accent);
}
.tab i { width: 14px; height: 14px; }

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: var(--s-16) var(--s-8);
}
.empty-state-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--s-6);
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}
.empty-state-icon i { width: 24px; height: 24px; }
.empty-state-text { color: var(--text-secondary); font-size: var(--font-sm); }

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    margin-top: var(--s-8);
}
.pagination a, .pagination span {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
}
.pagination a:hover { border-color: var(--accent-border); }
.pagination span.active {
    background: var(--accent);
    color: #0a0e17;
    border-color: var(--accent);
}

/* ---- Toast ---- */
.toast-container { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 9999; }
.toast {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: var(--r-md);
    padding: var(--s-6) var(--s-8);
    font-size: var(--font-sm);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease-out, toastOut 0.3s ease-in 2.5s forwards;
    display: flex;
    align-items: center;
    gap: var(--s-4);
    white-space: nowrap;
}
.toast-success { border-color: var(--accent-border); color: var(--accent); }
.toast-error { border-color: rgba(239,68,68,0.3); color: var(--danger); }

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

/* ---- Label Tag ---- */
.label-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    border-radius: var(--r-full);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* ---- Guest Hero ---- */
.hero-section {
    text-align: center;
    padding: var(--s-16) 0 var(--s-12);
    position: relative;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.6;
}
.hero-title {
    font-size: var(--font-2xl);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: var(--s-4);
    letter-spacing: -0.5px;
}
.hero-subtitle {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin-bottom: var(--s-12);
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Feature pills row */
.feature-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--s-4);
    margin-bottom: var(--s-12);
}
.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--text-secondary);
}
.feature-pill i { width: 14px; height: 14px; color: var(--accent); }

/* ---- Referral Card ---- */
.referral-link-box {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: 10px var(--s-6);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}
.referral-link-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: var(--font-sm);
    outline: none;
}

/* ---- Withdrawal ---- */
.method-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-4);
}
.method-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-8);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.method-card:hover { border-color: var(--accent-border); }
.method-card.selected {
    border-color: var(--accent);
    background: var(--accent-subtle);
    box-shadow: var(--shadow-glow);
}
.method-card-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto var(--s-4);
    background: var(--bg-elevated);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}
.method-card-title { font-weight: 600; font-size: var(--font-sm); margin-bottom: 2px; }
.method-card-min { font-size: var(--font-xs); color: var(--text-tertiary); }

/* ---- How It Works Steps ---- */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
}
.step-item {
    display: flex;
    align-items: flex-start;
    gap: var(--s-6);
}
.step-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: var(--r-full);
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: var(--font-xs);
    color: var(--accent);
}
.step-content {}
.step-title { font-weight: 700; font-size: var(--font-sm); margin-bottom: 2px; }
.step-desc { font-size: var(--font-xs); color: var(--text-tertiary); }

/* ---- Helpers ---- */
.text-accent { color: var(--accent) !important; }
.text-secondary { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-sm { margin-bottom: var(--s-4); }
.mb-md { margin-bottom: var(--s-8); }
.mb-lg { margin-bottom: var(--s-12); }
.mb-xl { margin-bottom: var(--s-16); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--s-4); }
.gap-md { gap: var(--s-8); }
.hidden { display: none !important; }

.page-title {
    font-size: var(--font-xl);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.3px;
}
.page-subtitle {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin-top: var(--s-2);
}

/* ---- Animations ---- */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.stagger > * {
    animation: fadeIn 0.4s ease-out both;
}
.stagger > *:nth-child(1) { animation-delay: 0s; }
.stagger > *:nth-child(2) { animation-delay: 0.05s; }
.stagger > *:nth-child(3) { animation-delay: 0.1s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
.stagger > *:nth-child(5) { animation-delay: 0.2s; }
.stagger > *:nth-child(6) { animation-delay: 0.25s; }

/* Pulse glow for CTAs */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 4px 16px rgba(0, 230, 118, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(0, 230, 118, 0.5); }
}
.btn-glow { animation: pulseGlow 2.5s ease-in-out infinite; }

/* ---- Responsive ---- */
@media (min-width: 480px) {
    :root { --max-w: 600px; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
    :root { --max-w: 720px; }
    .game-grid { grid-template-columns: repeat(3, 1fr); }
    .achievement-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    :root { --max-w: 900px; }
    .game-grid { grid-template-columns: repeat(4, 1fr); }
    .method-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Safe Area (Notch phones) ---- */
@supports (padding: max(0px)) {
    .main-content { padding-bottom: max(var(--s-16), calc(var(--safe-bottom) + var(--s-16))); }
}
