/* =============================
   MONEYTREE — Full Premium Style
   Real money, dark theme, gamified
   ============================= */

:root {
    --bg-dark: #0a0a0f;
    --bg-surface: #111118;
    --bg-surface-light: #1a1a2e;
    --bg-surface-lighter: #22223a;
    --border: #2a2a3e;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --money: #10b981;
    --money-dark: #059669;
    --money-light: #34d399;
    --gold: #f59e0b;
    --gold-dark: #d97706;
    --gold-light: #fbbf24;
    --royal: #8b5cf6;
    --royal-light: #a78bfa;
    --font: 'Inter', system-ui, sans-serif;
    --font-display: 'Orbitron', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.glass {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--money), var(--money-light), var(--gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.text-gradient-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.text-gradient-royal {
    background: linear-gradient(135deg, var(--royal), var(--royal-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: translateZ(0);
    transition: all 0.3s ease;
    font-family: var(--font);
}
.btn-primary {
    background: linear-gradient(135deg, var(--money), var(--money-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(16,185,129,0.5); }
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(245,158,11,0.3);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(245,158,11,0.5); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.125rem; }
.btn-full { width: 100%; }
.btn-nav {
    background: linear-gradient(135deg, var(--money), var(--money-dark));
    color: white !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 9999px !important;
    font-size: 0.9rem !important;
}

/* Particles */
#particles {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
    position: absolute; width: 3px; height: 3px;
    background: var(--money); border-radius: 50%;
    opacity: 0.2;
    animation: particle-float linear infinite;
}
@keyframes particle-float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.2; }
    90% { opacity: 0.2; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* Nav */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10,10,15,0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem; display: flex; align-items: center; gap: 0.75rem; }
.nav-logo { width: 32px; height: 32px; border-radius: 10px; }
.nav-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--money), var(--money-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-beta {
    font-size: 0.6rem; font-weight: 700; letter-spacing: 1px;
    background: var(--gold); color: #000; padding: 2px 6px; border-radius: 4px;
}
.nav-links { display: flex; align-items: center; gap: 1.25rem; }
.nav-link {
    font-size: 0.875rem; font-weight: 500;
    color: var(--text-muted); transition: color 0.3s; padding: 0.5rem 0;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: translateZ(0); }

/* Views */
.view { display: none; min-height: 100vh; position: relative; z-index: 1; }
.view.active { display: block; }

/* Hero */
.hero {
    min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(16,185,129,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(245,158,11,0.05) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0f 0%, #0d1117 50%, #0a0a0f 100%);
}
.hero-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(16,185,129,0.1), transparent 70%);
    animation: glow-pulse 4s ease-in-out infinite alternate;
}
@keyframes glow-pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}
.hero-content { position: relative; z-index: 2; text-align: center; padding: 6rem 0; }
.hero-badge {
    display: inline-block; padding: 0.5rem 1.25rem;
    border-radius: 9999px; background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    color: var(--money-light); font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.15; margin-bottom: 1.5rem; letter-spacing: -1px;
}
.hero-sub {
    color: var(--text-muted);
    font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats { display: flex; gap: 2.5rem; justify-content: center; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num { display: block; font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; }
.stat-label { color: var(--text-muted); font-size: 0.875rem; }

/* Features */
.features { padding: 4rem 0; position: relative; z-index: 1; }
.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    text-align: center; margin-bottom: 3rem;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    padding: 2rem; text-align: center; transition: all 0.3s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(16,185,129,0.2); }
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.feature-badge {
    display: inline-block; margin-top: 1rem;
    padding: 0.35rem 0.75rem; border-radius: 9999px;
    background: rgba(16,185,129,0.1);
    color: var(--money-light); font-size: 0.8rem; font-weight: 600;
}
.feature-badge.gold { background: rgba(245,158,11,0.1); color: var(--gold-light); }

/* Level Steps */
.level-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}
.level-step {
    padding: 1.25rem; text-align: center;
}
.level-step.gold { border-color: rgba(245,158,11,0.2); }
.level-step.royal { border-color: rgba(139,92,246,0.2); }
.level-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.level-num { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.level-xp { color: var(--text-dim); font-size: 0.75rem; }
.level-mult { color: var(--money); font-size: 0.8rem; font-weight: 600; margin: 0.25rem 0; }
.level-status { font-size: 0.75rem; font-weight: 600; }
.level-status.locked { color: var(--text-dim); }
.level-status.unlocked { color: var(--gold-light); }

/* Auth */
.auth-container {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 6rem 1.5rem 2rem;
}
.auth-card { width: 100%; max-width: 420px; padding: 2.5rem; text-align: center; }
.auth-logo { width: 60px; height: 60px; border-radius: 14px; margin-bottom: 1rem; }
.auth-title { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.5rem; }
.auth-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.form-group { text-align: left; margin-bottom: 1.25rem; }
.form-group label {
    display: block; font-size: 0.85rem; font-weight: 500;
    color: var(--text-muted); margin-bottom: 0.5rem;
}
.form-input {
    width: 100%; padding: 0.875rem 1rem;
    border-radius: 0.75rem; background: var(--bg-surface);
    border: 1px solid var(--border); color: var(--text);
    font-size: 1rem; font-family: var(--font);
    transition: border-color 0.3s; outline: none;
}
.form-input:focus { border-color: var(--money); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.form-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
    padding: 0.75rem; border-radius: 0.75rem;
    font-size: 0.85rem; margin-bottom: 1rem;
}
.auth-switch { margin-top: 1.5rem; color: var(--text-muted); font-size: 0.9rem; }
.auth-switch a { color: var(--money); font-weight: 600; }

/* Dashboard - Earnings */
.earnings-banner {
    padding: 1.5rem; margin-bottom: 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem;
}
.earnings-main { text-align: left; }
.earnings-label { display: block; color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.25rem; }
.earnings-amount { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--gold-light); }
.earnings-detail { text-align: right; }
.earnings-item { margin-bottom: 0.25rem; }
.earnings-item-label { font-size: 0.75rem; color: var(--text-dim); }
.earnings-item-value { font-family: var(--font-display); font-weight: 600; }
.earnings-item-value.gold { color: var(--gold-light); }
.earnings-item-value.dim { color: var(--text-dim); }

/* XP Bar */
.xp-section { padding: 1.5rem; margin-bottom: 1.5rem; }
.xp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.xp-level { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.xp-name { color: var(--text-muted); font-size: 0.85rem; margin-left: 0.75rem; }
.xp-amount { color: var(--gold-light); font-weight: 600; font-size: 0.9rem; }
.xp-bar { height: 8px; background: var(--bg-surface-light); border-radius: 9999px; overflow: hidden; }
.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--money), var(--money-light), var(--gold));
    border-radius: 9999px;
    transition: width 0.8s ease;
    position: relative;
}
.xp-fill::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.xp-multiplier {
    text-align: right; margin-top: 0.5rem;
    font-size: 0.8rem; color: var(--money-light);
}

/* Tree */
.tree-section { text-align: center; padding: 1.5rem 0; position: relative; }
.tree-image {
    width: 180px; height: auto;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; z-index: 2;
}
.tree-image:hover { transform: scale(1.05); }
.tree-glow {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 220px; height: 220px; border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.12), transparent 60%);
    animation: glow-pulse 3s ease-in-out infinite alternate;
    z-index: 1;
}
.tree-status { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.5rem; }


/* Task Card */
.task-card { padding: 1.5rem; margin: 1.5rem auto; max-width: 500px; animation: slide-up 0.4s ease; }
@keyframes slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.task-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.task-badge {
    display: inline-block; padding: 0.25rem 0.6rem; border-radius: 9999px;
    background: rgba(245,158,11,0.1); color: var(--gold-light);
    font-size: 0.75rem; font-weight: 600; margin-bottom: 0.25rem;
}
.task-title { display: block; font-weight: 700; font-size: 1.05rem; }
.task-rewards { color: var(--gold-light); font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.task-desc { color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.6; font-size: 0.95rem; }

/* Ad Timer */
.ad-timer { margin-bottom: 1rem; }
.ad-timer-bar { height: 6px; background: var(--bg-surface-light); border-radius: 9999px; overflow: hidden; }
.ad-timer-fill { height: 100%; background: var(--gold); border-radius: 9999px; transition: width 1s linear; }
.ad-timer-text { text-align: center; margin-top: 0.5rem; color: var(--text-muted); font-size: 0.85rem; }


/* Task Card */
.task-card { padding: 1.5rem; margin: 1.5rem auto; max-width: 500px; animation: slide-up 0.4s ease; }
@keyframes slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.task-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.task-badge {
    display: inline-block; padding: 0.25rem 0.6rem; border-radius: 9999px;
    background: rgba(245,158,11,0.1); color: var(--gold-light);
    font-size: 0.75rem; font-weight: 600; margin-bottom: 0.25rem;
}
.task-title { display: block; font-weight: 700; font-size: 1.05rem; }
.task-rewards { color: var(--gold-light); font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.task-desc { color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.6; font-size: 0.95rem; }

/* Ad Timer */
.ad-timer { margin-bottom: 1rem; }
.ad-timer-bar { height: 6px; background: var(--bg-surface-light); border-radius: 9999px; overflow: hidden; }
.ad-timer-fill { height: 100%; background: var(--gold); border-radius: 9999px; transition: width 1s linear; }
.ad-timer-text { text-align: center; margin-top: 0.5rem; color: var(--text-muted); font-size: 0.85rem; }

/* Streak */
.streak-section {
    display: flex; justify-content: space-around;
    padding: 1.25rem; margin: 1.5rem 0; gap: 1rem;
}
.streak-item { text-align: center; }
.streak-icon { font-size: 1.25rem; display: block; margin-bottom: 0.25rem; }
.streak-count { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.streak-label { color: var(--text-muted); font-size: 0.75rem; }

/* Reward Popup */
.reward-popup {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 200; text-align: center;
    animation: reward-pop 0.5s ease forwards;
}
@keyframes reward-pop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    60% { transform: translate(-50%, -50%) scale(1.15); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.reward-popup-inner {
    background: linear-gradient(135deg, var(--bg-surface-light), var(--bg-surface-lighter));
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 1.5rem; padding: 2rem 2.5rem;
    box-shadow: 0 0 60px rgba(16,185,129,0.15);
}
.reward-popup-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.reward-popup-amount {
    font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.reward-popup-desc { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.9rem; }

/* Level Progress Guide */
.level-progress {
    display: flex; justify-content: space-between; align-items: center;
}
.lp-step { text-align: center; font-size: 0.7rem; }
.lp-step span { display: block; }
.lp-step.done { color: var(--money); }
.lp-step.locked { color: var(--text-dim); }
.lp-unlock { font-size: 0.6rem; margin-top: 2px; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.show {
        display: flex; flex-direction: column;
        position: absolute; top: 4rem; left: 0; right: 0;
        background: rgba(10,10,15,0.95);
        padding: 1rem; border-bottom: 1px solid var(--border); gap: 0.75rem;
    }
    .nav-toggle { display: block; }
    .hero-title { font-size: clamp(2rem, 8vw, 2.8rem); }
    .hero-stats { gap: 1.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .level-steps { grid-template-columns: repeat(3, 1fr); }
    .earnings-banner { flex-direction: column; text-align: center; }
    .earnings-detail { text-align: center; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }


/* The Button - Profile section (in-flow, NOT fixed) */



/* The Button - FIXED center, never moves */
.the-button-fixed {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateZ(0);
    z-index: 1000;
    text-align: center;
    padding: 0;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.the-button-fixed .the-button {
    width: 140px; height: 140px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--money), var(--money-dark), #065f46);
    border: 3px solid rgba(16,185,129,0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: button-glow 2s ease-in-out infinite alternate;
    display: flex;
    align-items: center; justify-content: center;
    margin: 0 auto;
}
.the-button-fixed .the-button.dimmed {
    opacity: 0.3;
    pointer-events: none;
}
.the-button-fixed .the-button-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 0.5rem;
    white-space: nowrap;
}

/* Logo in navbar */
.nav-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
