/* CoinMine - Dark Futuristic Mobile Design */
:root {
    --bg: #060912;
    --bg2: #0d1425;
    --bg3: #141d35;
    --card: #111827;
    --card2: #1a2540;
    --border: #1f2f50;
    --accent: #f5c518;
    --accent2: #ff6b35;
    --accent3: #00d4ff;
    --green: #00e676;
    --red: #ff4444;
    --text: #e8eaf6;
    --text2: #8899bb;
    --text3: #4a5f8a;
    --coin: #f5c518;
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0,0,0,0.5);
    --glow: 0 0 20px rgba(245,197,24,0.3);
    --glow-blue: 0 0 20px rgba(0,212,255,0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Syne', sans-serif;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(245,197,24,0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0,212,255,0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: 28px; font-weight: 800; line-height: 1.1; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }

/* ===== LAYOUT ===== */
.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-bottom: 80px;
}

.container {
    padding: 0 16px;
}

/* ===== AUTH PAGES ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 24px 40px;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -100px; left: -100px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(245,197,24,0.15), transparent 70%);
    border-radius: 50%;
}

.auth-page::after {
    content: '';
    position: absolute;
    bottom: -100px; right: -100px;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(0,212,255,0.1), transparent 70%);
    border-radius: 50%;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.auth-logo .logo-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: var(--glow), 0 8px 32px rgba(245,197,24,0.4);
    animation: pulse-logo 2s ease-in-out infinite;
}

.auth-logo .logo-icon svg {
    width: 40px; height: 40px;
    color: var(--bg);
    stroke-width: 2.5;
}

@keyframes pulse-logo {
    0%, 100% { transform: scale(1); box-shadow: var(--glow), 0 8px 32px rgba(245,197,24,0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(245,197,24,0.6), 0 12px 40px rgba(245,197,24,0.5); }
}

.auth-logo h1 { color: var(--accent); letter-spacing: -1px; }
.auth-logo p { color: var(--text2); font-size: 14px; margin-top: 4px; font-family: 'Space Mono', monospace; }

.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.input-wrap {
    position: relative;
}

.input-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--text3);
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    background: var(--bg2);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 14px 14px 14px 44px;
    color: var(--text);
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.input-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245,197,24,0.1);
}

.input-wrap input::placeholder { color: var(--text3); }

.input-wrap .toggle-pass {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    padding: 4px;
}

/* ===== BUTTONS ===== */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.2s;
}

.btn:active::after { background: rgba(0,0,0,0.1); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #e6a800);
    color: var(--bg);
    box-shadow: 0 4px 20px rgba(245,197,24,0.4);
}

.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    background: var(--card2);
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-accent2 {
    background: linear-gradient(135deg, var(--accent3), #0099bb);
    color: var(--bg);
    box-shadow: 0 4px 20px rgba(0,212,255,0.3);
}

.btn-sm {
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-danger {
    background: linear-gradient(135deg, var(--red), #cc0000);
    color: white;
}

.btn-green {
    background: linear-gradient(135deg, var(--green), #00aa55);
    color: var(--bg);
    font-weight: 700;
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* ===== TOP BAR ===== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 0;
    position: sticky;
    top: 0;
    background: rgba(6,9,18,0.95);
    backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    padding-bottom: 12px;
}

.top-bar .logo-sm {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 18px;
    color: var(--accent);
}

.top-bar .logo-sm .icon-box {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-bar .logo-sm .icon-box svg {
    width: 18px; height: 18px;
    color: var(--bg);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coin-balance-top {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 12px;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.coin-balance-top .coin-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.notif-btn {
    position: relative;
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text2);
}

.notif-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--red);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* ===== HERO CARD ===== */
.hero-card {
    background: linear-gradient(135deg, var(--card2), var(--bg3));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin: 0 16px 16px;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(245,197,24,0.15), transparent 70%);
    border-radius: 50%;
}

.hero-card .greeting {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 4px;
    font-family: 'Space Mono', monospace;
}

.hero-card .name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
}

.balance-display {
    text-align: center;
    padding: 16px 0;
}

.balance-display .coin-amount {
    font-family: 'Space Mono', monospace;
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    text-shadow: var(--glow);
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.balance-display .coin-amount .coin-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), #e6a800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow);
}

.balance-display .coin-amount .coin-icon svg {
    width: 20px; height: 20px;
    color: var(--bg);
}

.balance-display .coin-label {
    font-size: 12px;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 4px;
    font-family: 'Space Mono', monospace;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
}

.stat-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.stat-item .stat-val {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent3);
}

.stat-item .stat-label {
    font-size: 10px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ===== SECTION ===== */
.section {
    padding: 0 16px;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title svg { width: 14px; height: 14px; color: var(--accent); }

/* ===== CARDS ===== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.card:active { border-color: var(--accent); }

/* ===== TASK CARDS ===== */
.task-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.task-card:active { transform: scale(0.98); border-color: var(--accent); }

.task-card.completed {
    opacity: 0.6;
    cursor: default;
}

.task-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-icon.youtube { background: linear-gradient(135deg, #ff0000, #cc0000); }
.task-icon.facebook { background: linear-gradient(135deg, #1877f2, #0d5fbd); }
.task-icon.telegram { background: linear-gradient(135deg, #229ED9, #1a7baa); }
.task-icon.video { background: linear-gradient(135deg, var(--accent2), #cc4400); }
.task-icon.daily { background: linear-gradient(135deg, var(--green), #00aa44); }
.task-icon.custom { background: linear-gradient(135deg, #9c27b0, #6a0080); }

.task-icon svg { width: 24px; height: 24px; color: white; }

.task-info { flex: 1; min-width: 0; }
.task-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-info p { font-size: 12px; color: var(--text2); }

.task-reward {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.reward-coins {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
}

.reward-coins svg { width: 12px; height: 12px; }

.badge-done {
    background: var(--green);
    color: var(--bg);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-go {
    background: var(--accent);
    color: var(--bg);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 10px;
}

/* ===== MINING PAGE ===== */
.mine-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    gap: 20px;
}

.mine-orb-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mine-orb {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(245,197,24,0.4), transparent 60%),
                radial-gradient(circle at 70% 70%, rgba(255,107,53,0.3), transparent 60%),
                linear-gradient(135deg, var(--card2), var(--bg3));
    border: 2px solid rgba(245,197,24,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    transition: transform 0.1s;
    box-shadow: 
        0 0 40px rgba(245,197,24,0.2),
        0 0 80px rgba(245,197,24,0.1),
        inset 0 0 40px rgba(245,197,24,0.05);
}

.mine-orb:active {
    transform: scale(0.95);
}

.mine-orb-inner {
    text-align: center;
    pointer-events: none;
}

.mine-orb-inner .big-coin {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--accent), #e6a800, var(--accent2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    box-shadow: var(--glow), 0 8px 32px rgba(245,197,24,0.5);
    animation: coin-rotate 4s linear infinite;
}

@keyframes coin-rotate {
    0% { box-shadow: var(--glow), 0 8px 32px rgba(245,197,24,0.5); }
    50% { box-shadow: 0 0 30px rgba(245,197,24,0.8), 0 8px 40px rgba(245,197,24,0.6); }
    100% { box-shadow: var(--glow), 0 8px 32px rgba(245,197,24,0.5); }
}

.mine-orb-inner .big-coin svg {
    width: 40px; height: 40px;
    color: var(--bg);
}

.mine-orb-inner .tap-hint {
    font-size: 13px;
    color: var(--text2);
    font-weight: 600;
}

.mine-orb-inner .tap-hint span {
    font-family: 'Space Mono', monospace;
    color: var(--accent);
    font-size: 15px;
}

.float-coin {
    position: absolute;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    color: var(--accent);
    font-size: 20px;
    text-shadow: var(--glow);
    pointer-events: none;
    animation: float-up 1s ease-out forwards;
    z-index: 10;
}

@keyframes float-up {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-80px) scale(1.3); }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(245,197,24,0.3);
    animation: ripple-out 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-out {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

/* ===== ENERGY BAR ===== */
.energy-bar-wrap {
    width: 100%;
}

.energy-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text2);
    font-family: 'Space Mono', monospace;
}

.energy-bar {
    height: 10px;
    background: var(--card2);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.energy-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent3), var(--accent));
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ===== BOOST CARDS ===== */
.boost-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.boost-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.boost-card:active { transform: scale(0.96); border-color: var(--accent); }

.boost-card svg {
    width: 32px; height: 32px;
    margin-bottom: 8px;
}

.boost-card.energy svg { color: var(--accent3); }
.boost-card.power svg { color: var(--accent); }

.boost-card h4 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.boost-card .cost { font-size: 11px; color: var(--accent); font-family: 'Space Mono', monospace; }
.boost-card .desc { font-size: 10px; color: var(--text2); margin-top: 2px; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(10,15,30,0.97);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 200;
    padding: 8px 0 env(safe-area-inset-bottom);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text3);
    padding: 6px 0;
    transition: color 0.2s;
    position: relative;
}

.nav-item svg { width: 22px; height: 22px; }
.nav-item span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

.nav-item.active { color: var(--accent); }
.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 30px; height: 2px;
    background: var(--accent);
    border-radius: 0 0 4px 4px;
    box-shadow: var(--glow);
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    top: 20px; left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 20px;
    z-index: 9999;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    max-width: 320px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error { border-color: var(--red); color: var(--red); }
.toast.info { border-color: var(--accent3); color: var(--accent3); }

/* ===== NOTIFICATIONS ===== */
.notif-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 300;
    backdrop-filter: blur(4px);
}

.notif-panel {
    position: fixed;
    right: 0; top: 0; bottom: 0;
    width: 85%;
    max-width: 360px;
    background: var(--bg2);
    border-left: 1px solid var(--border);
    z-index: 301;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 800;
    font-size: 16px;
}

.close-btn {
    background: var(--card2);
    border: none;
    border-radius: 8px;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text2);
    cursor: pointer;
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notif-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
}

.notif-item.unread { border-left: 3px solid var(--accent); }
.notif-item h5 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.notif-item p { font-size: 12px; color: var(--text2); }
.notif-item .time { font-size: 10px; color: var(--text3); margin-top: 6px; font-family: 'Space Mono', monospace; }

.hidden { display: none !important; }

/* ===== SCRATCH CARD ===== */
.scratch-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(8px);
}

.scratch-modal {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    max-width: 320px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.scratch-modal::before {
    content: '';
    position: absolute;
    top: -50px; left: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(245,197,24,0.2), transparent);
    border-radius: 50%;
}

.scratch-title { font-size: 22px; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.scratch-subtitle { font-size: 13px; color: var(--text2); margin-bottom: 24px; }

.scratch-area {
    position: relative;
    width: 200px; height: 120px;
    margin: 0 auto 24px;
    border-radius: 16px;
    overflow: hidden;
    cursor: grab;
}

.scratch-canvas {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    touch-action: none;
}

.scratch-reveal {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--card2), var(--bg3));
    border: 2px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.scratch-reveal .result-amount {
    font-family: 'Space Mono', monospace;
    font-size: 24px;
    font-weight: 700;
}

.scratch-reveal.win .result-amount { color: var(--green); }
.scratch-reveal.lose .result-amount { color: var(--red); }
.scratch-reveal .result-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text2); }

/* ===== VIDEO REWARD ===== */
.video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.video-close { position: absolute; top: 16px; right: 16px; }

.video-frame {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.video-frame iframe { width: 100%; height: 100%; border: none; }

.video-progress-wrap { width: 100%; max-width: 400px; }
.video-countdown { font-family: 'Space Mono', monospace; font-size: 14px; color: var(--text2); margin-bottom: 8px; text-align: center; }
.video-progress-bar { height: 6px; background: var(--card2); border-radius: 6px; overflow: hidden; }
.video-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: 6px; transition: width 1s linear; }
.video-claim-btn { margin-top: 16px; display: none; }

/* ===== WITHDRAW PAGE ===== */
.withdraw-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.withdraw-progress {
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 8px;
    font-family: 'Space Mono', monospace;
}

.progress-bar { height: 8px; background: var(--bg); border-radius: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent3), var(--green)); border-radius: 8px; transition: width 0.5s; }

.coin-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.coin-calc-row:last-child { border-bottom: none; }
.coin-calc-row .label { color: var(--text2); }
.coin-calc-row .value { font-family: 'Space Mono', monospace; font-weight: 700; color: var(--accent); }

/* ===== PROFILE PAGE ===== */
.profile-header {
    background: linear-gradient(135deg, var(--card2), var(--bg3));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin: 0 16px 16px;
}

.avatar {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 28px;
    font-weight: 800;
    color: var(--bg);
    box-shadow: var(--glow);
}

.profile-header h2 { font-size: 20px; margin-bottom: 4px; }
.profile-header .phone { font-size: 13px; color: var(--text2); font-family: 'Space Mono', monospace; }
.profile-header .ref-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    margin-top: 12px;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: var(--accent);
    cursor: pointer;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s;
}

.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:active { background: var(--card2); }

.menu-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-icon svg { width: 20px; height: 20px; }
.menu-icon.gold { background: rgba(245,197,24,0.15); }
.menu-icon.gold svg { color: var(--accent); }
.menu-icon.blue { background: rgba(0,212,255,0.15); }
.menu-icon.blue svg { color: var(--accent3); }
.menu-icon.red { background: rgba(255,68,68,0.15); }
.menu-icon.red svg { color: var(--red); }
.menu-icon.green { background: rgba(0,230,118,0.15); }
.menu-icon.green svg { color: var(--green); }

.menu-info { flex: 1; }
.menu-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.menu-info p { font-size: 12px; color: var(--text2); }
.menu-arrow { color: var(--text3); }
.menu-arrow svg { width: 16px; height: 16px; }

/* ===== REWARDS PAGE ===== */
.reward-tabs {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.reward-tab {
    flex-shrink: 0;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text2);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.reward-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* ===== WELCOME/GIFT BOX ===== */
.welcome-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.welcome-modal {
    background: var(--bg2);
    border: 1px solid var(--accent);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    max-width: 340px;
    width: 100%;
    box-shadow: var(--glow), 0 20px 60px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}

.welcome-modal::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(245,197,24,0.25), transparent);
    border-radius: 50%;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245,197,24,0.1);
    border: 1px solid rgba(245,197,24,0.3);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.welcome-modal h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.welcome-modal p { font-size: 13px; color: var(--text2); margin-bottom: 24px; line-height: 1.5; }

.gift-box {
    width: 100px; height: 100px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    cursor: pointer;
    box-shadow: var(--glow), 0 8px 32px rgba(245,197,24,0.4);
    animation: gift-bounce 1s ease-in-out infinite;
    transition: transform 0.2s;
}

.gift-box:active { transform: scale(0.9); animation: none; }

.gift-box svg { width: 50px; height: 50px; color: var(--bg); }

@keyframes gift-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== LOADING ===== */
.loading-spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ===== AD BANNERS ===== */
.ad-banner {
    padding: 8px 16px;
    text-align: center;
}

.ad-banner img {
    width: 100%;
    border-radius: 10px;
    max-height: 80px;
    object-fit: cover;
}

.ad-code { padding: 8px 16px; }

/* ===== ADMIN ===== */
.admin-layout { display: flex; flex-direction: column; min-height: 100vh; }
.admin-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-content { padding: 24px; max-width: 1000px; margin: 0 auto; width: 100%; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card-admin {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.stat-card-admin h3 { font-size: 28px; font-weight: 800; color: var(--accent); margin-bottom: 4px; font-family: 'Space Mono', monospace; }
.stat-card-admin p { font-size: 13px; color: var(--text2); }

table { width: 100%; border-collapse: collapse; }
th { background: var(--card2); padding: 12px; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text2); border-bottom: 1px solid var(--border); }
td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
tr:hover td { background: rgba(255,255,255,0.02); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.badge-pending { background: rgba(245,197,24,0.15); color: var(--accent); }
.badge-approved { background: rgba(0,230,118,0.15); color: var(--green); }
.badge-rejected { background: rgba(255,68,68,0.15); color: var(--red); }

/* ===== REFERRAL ===== */
.referral-card {
    background: linear-gradient(135deg, var(--card2), var(--bg3));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.ref-link-box {
    display: flex;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    align-items: center;
    margin-top: 12px;
}

.ref-link-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--accent);
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    outline: none;
}

.ref-link-box button {
    background: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--bg);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Syne', sans-serif;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== TRANSACTION LIST ===== */
.tx-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.tx-item:last-child { border-bottom: none; }

.tx-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tx-icon.earn { background: rgba(0,230,118,0.15); }
.tx-icon.earn svg { color: var(--green); width: 18px; height: 18px; }
.tx-icon.withdraw { background: rgba(255,68,68,0.15); }
.tx-icon.withdraw svg { color: var(--red); width: 18px; height: 18px; }
.tx-icon.task { background: rgba(245,197,24,0.15); }
.tx-icon.task svg { color: var(--accent); width: 18px; height: 18px; }
.tx-icon.mining { background: rgba(0,212,255,0.15); }
.tx-icon.mining svg { color: var(--accent3); width: 18px; height: 18px; }

.tx-info { flex: 1; min-width: 0; }
.tx-info h5 { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-info p { font-size: 11px; color: var(--text2); margin-top: 2px; font-family: 'Space Mono', monospace; }

.tx-amount { font-family: 'Space Mono', monospace; font-size: 14px; font-weight: 700; }
.tx-amount.positive { color: var(--green); }
.tx-amount.negative { color: var(--red); }

/* ===== DAILY UPDATE NOTICE ===== */
.update-notice {
    background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(0,212,255,0.05));
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 16px 16px;
    font-size: 13px;
    color: var(--accent3);
    font-weight: 600;
}

.update-notice svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ===== MISC ===== */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.gap-8 { gap: 8px; }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text2);
}

.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state h4 { font-size: 16px; margin-bottom: 6px; color: var(--text); }
.empty-state p { font-size: 13px; }

.page-title {
    font-size: 22px;
    font-weight: 800;
    padding: 8px 16px 16px;
}

.shimmer {
    background: linear-gradient(90deg, var(--card) 25%, var(--card2) 50%, var(--card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer { to { background-position: -200% 0; } }
