/* ============================================
   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);
}

/* ============================================
   GAMIFICATION ADDITIONS (non-duplicate)
   ============================================ */

/* ---- Dashboard Background Orbs ---- */
.dashboard-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.dashboard-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,230,118,0.07) 0%, transparent 70%);
    filter: blur(60px);
    will-change: transform;
}
.dashboard-orb:nth-child(1) { width:200px; height:200px; top:-40px; left:-60px; animation: orbFloat1 18s ease-in-out infinite alternate; }
.dashboard-orb:nth-child(2) { width:160px; height:160px; top:30%; right:-40px; animation: orbFloat2 22s ease-in-out infinite alternate; }
.dashboard-orb:nth-child(3) { width:120px; height:120px; bottom:20%; left:10%; animation: orbFloat1 20s ease-in-out infinite alternate-reverse; }
.dashboard-orb:nth-child(4) { width:100px; height:100px; bottom:-30px; right:20%; animation: orbFloat2 16s ease-in-out infinite alternate-reverse; }
@keyframes orbFloat1 { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(30px,-20px) scale(1.1); } }
@keyframes orbFloat2 { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(-20px,30px) scale(0.9); } }

/* ---- Greeting / Rank Badge ---- */
.greeting-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    padding: 3px 10px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.streak-flame {
    color: var(--accent);
    animation: flamePulse 2s ease-in-out infinite;
}
@keyframes flamePulse { 0%,100% { opacity:1; } 50% { opacity:0.6; } }

/* ---- XP Bar ---- */
.xp-bar-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 12px 16px;
}
.xp-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.xp-bar-label {
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.xp-bar-value {
    font-size: var(--font-xs);
    font-weight: 800;
    color: var(--accent);
}
.xp-bar-track {
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--r-full);
    overflow: hidden;
    position: relative;
}
.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #00C853);
    border-radius: var(--r-full);
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.xp-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: xpShimmer 2s ease-in-out infinite;
}
@keyframes xpShimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ---- Neon Section Title Modifier ---- */
.section-title.neon {
    padding-left: 12px;
    border-left: 3px solid var(--accent);
    text-shadow: 0 0 10px rgba(0,230,118,0.15);
}


/* ---- 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 {
    display: block;
}

.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)));
    }
}

/* ======================================================
   TASK IFRAME OVERLAY SYSTEM
   ====================================================== */

.task-overlay-wrap {
    position: fixed;
    inset: 0;
    z-index: 8000;
    background: rgba(10, 14, 23, 0.97);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.task-overlay-wrap.active {
    opacity: 1;
}

.task-overlay {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* Header bar */
.task-overlay-header {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: 10px 12px;
    background: rgba(10, 14, 23, 0.95);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 8px;
}

.task-overlay-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
}

.task-overlay-timer-wrap {
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-overlay-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.task-overlay-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #00C853);
    border-radius: 6px;
    transition: width 1s linear;
}

.task-overlay-countdown {
    font-size: var(--font-sm);
    font-weight: 800;
    color: var(--text-secondary);
    min-width: 36px;
    text-align: right;
    flex-shrink: 0;
    transition: color 0.3s;
}

.task-overlay-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: var(--r-sm);
    font-size: 0.65rem;
    font-weight: 700;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.overlay-btn:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
}

.overlay-btn-lock {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
    cursor: not-allowed;
}

.overlay-btn-close {
    background: var(--accent-subtle);
    border-color: var(--accent-border);
    color: var(--accent);
    cursor: pointer;
}

.task-overlay-frame-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.task-overlay-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #000;
}

/* ---- Done Badge (task cards) ---- */
.task-card.completed {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.done-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    border-radius: var(--r-full);
    padding: 3px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

/* Game done badge */
.game-card.completed {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.game-done-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 230, 118, 0.9);
    border-radius: var(--r-full);
    padding: 3px 10px;
    font-size: 0.6rem;
    font-weight: 800;
    color: #0a0e17;
    backdrop-filter: blur(8px);
}

.game-card {
    position: relative;
}

/* needed for absolute badge */

/* mt-md helper */
.mt-md {
    margin-top: var(--s-8);
}

/* ---- Coin Pop Animation ---- */
@keyframes coinPop {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }

    40% {
        opacity: 1;
        transform: translate(-50%, -80%) scale(1.2);
    }

    80% {
        opacity: 0.8;
        transform: translate(-50%, -130%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -160%) scale(0.8);
    }
}

/* ======================================================
   GAMIFIED DASHBOARD
   ====================================================== */

/* Floating orbs — GPU-safe CSS only, no JS */
.dashboard-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.dashboard-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0;
    animation: orbFloat 20s ease-in-out infinite;
}

.dashboard-orb:nth-child(1) {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.18) 0%, transparent 70%);
    top: -60px;
    left: -40px;
    animation-duration: 22s;
    animation-delay: 0s;
    opacity: 0.7;
}

.dashboard-orb:nth-child(2) {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(0, 200, 83, 0.12) 0%, transparent 70%);
    top: 30%;
    right: -50px;
    animation-duration: 28s;
    animation-delay: -7s;
    opacity: 0.5;
}

.dashboard-orb:nth-child(3) {
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.10) 0%, transparent 70%);
    bottom: 10%;
    left: 20%;
    animation-duration: 18s;
    animation-delay: -14s;
    opacity: 0.4;
}

.dashboard-orb:nth-child(4) {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.15) 0%, transparent 70%);
    top: 55%;
    left: 5%;
    animation-duration: 25s;
    animation-delay: -5s;
    opacity: 0.3;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(20px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-15px, -20px) scale(0.95);
    }

    75% {
        transform: translate(10px, 25px) scale(1.02);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Animated greeting section */
.dashboard-greeting {
    position: relative;
    z-index: 1;
    padding: var(--s-6) 0 var(--s-4);
}

.greeting-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.15), rgba(0, 200, 83, 0.08));
    border: 1px solid var(--accent-border);
    border-radius: var(--r-full);
    padding: 5px 14px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--s-4);
    animation: fadeIn 0.5s ease-out;
}

/* Streak flame pulse */
.streak-flame {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #FFB300;
    font-weight: 800;
    animation: flamePulse 2s ease-in-out infinite;
}

@keyframes flamePulse {

    0%,
    100% {
        filter: drop-shadow(0 0 4px rgba(255, 179, 0, 0.4));
    }

    50% {
        filter: drop-shadow(0 0 10px rgba(255, 179, 0, 0.7));
    }
}

/* Gamified stat cards */
.stat-card.gamified {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.8) 0%, rgba(17, 24, 39, 0.5) 100%);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card.gamified:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--accent-border);
    box-shadow: 0 8px 30px rgba(0, 230, 118, 0.15), var(--shadow-card);
}

.stat-card.gamified::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(0, 230, 118, 0.04) 100%);
    pointer-events: none;
}

/* Animated counter values */
.stat-value.counting {
    animation: countPulse 0.3s ease-out;
}

@keyframes countPulse {
    0% {
        transform: scale(1.15);
        color: var(--accent);
    }

    100% {
        transform: scale(1);
    }
}

/* Daily XP/progress bar */
.xp-bar-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-8);
    margin-bottom: var(--s-12);
    position: relative;
    z-index: 1;
}

.xp-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s-4);
    font-size: var(--font-xs);
}

.xp-bar-label {
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.xp-bar-value {
    font-weight: 800;
    color: var(--accent);
}

.xp-bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--r-full);
    overflow: hidden;
    position: relative;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #00C853, #69F0AE);
    border-radius: var(--r-full);
    width: 0%;
    transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.xp-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
    animation: shimmerSlide 1.5s ease-in-out infinite;
}

@keyframes shimmerSlide {
    0% {
        transform: translateX(-40px);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateX(40px);
        opacity: 0;
    }
}

/* Neon section headers */
.section-title.neon {
    position: relative;
    padding-left: 12px;
}

.section-title.neon::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background: linear-gradient(180deg, var(--accent), #00C853);
    border-radius: var(--r-full);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.5);
}

/* Achievement shimmer (locked state) */
.achievement-item.locked {
    position: relative;
    overflow: hidden;
}

.achievement-item.locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    animation: achieveShimmer 3s ease-in-out infinite;
}

@keyframes achieveShimmer {
    0% {
        left: -60%;
    }

    100% {
        left: 120%;
    }
}

/* Earned achievement glow */
.achievement-item.earned {
    animation: achieveGlow 3s ease-in-out infinite alternate;
}

@keyframes achieveGlow {
    0% {
        box-shadow: 0 0 10px rgba(0, 230, 118, 0.1);
    }

    100% {
        box-shadow: 0 0 20px rgba(0, 230, 118, 0.25);
    }
}

/* Leaderboard top-3 pulse */
.leaderboard-item:nth-child(1) {
    animation: goldPulse 3s ease-in-out infinite alternate;
}

.leaderboard-item:nth-child(2) {
    animation: silverPulse 3s ease-in-out infinite alternate;
}

.leaderboard-item:nth-child(3) {
    animation: bronzePulse 3s ease-in-out infinite alternate;
}

@keyframes goldPulse {
    0% {
        background: transparent;
    }

    100% {
        background: rgba(255, 215, 0, 0.04);
    }
}

@keyframes silverPulse {
    0% {
        background: transparent;
    }

    100% {
        background: rgba(192, 192, 192, 0.04);
    }
}

@keyframes bronzePulse {
    0% {
        background: transparent;
    }

    100% {
        background: rgba(205, 127, 50, 0.04);
    }
}

/* Task card shine sweep */
.task-card:not(.completed)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: skewX(-20deg);
    transition: left 0s;
}

.task-card:not(.completed):hover::before {
    left: 150%;
    transition: left 0.5s ease-in-out;
}

/* ======================================================
   GAMIFIED REFER & EARN
   ====================================================== */

/* Hero section */
.refer-hero {
    text-align: center;
    padding: var(--s-12) var(--s-8);
    position: relative;
    overflow: hidden;
}

.refer-hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.12) 0%, transparent 70%);
    animation: referGlowPulse 4s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes referGlowPulse {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.refer-hero-icon {
    font-size: 3.5rem;
    display: block;
    margin: 0 auto var(--s-6);
    animation: trophyBounce 2.5s ease-in-out infinite;
    filter: drop-shadow(0 0 16px rgba(0, 230, 118, 0.4));
    position: relative;
    z-index: 1;
}

@keyframes trophyBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.refer-hero-title {
    font-size: var(--font-xl);
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: var(--s-4);
    position: relative;
    z-index: 1;
}

.refer-hero-sub {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* Animated referral link box */
.referral-link-card {
    position: relative;
    border-radius: var(--r-lg);
    padding: 2px;
    background: linear-gradient(90deg, var(--accent), #00C853, var(--accent));
    background-size: 200% auto;
    animation: borderFlow 3s linear infinite;
    margin-bottom: var(--s-8);
}

@keyframes borderFlow {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.referral-link-inner {
    background: var(--bg-card-solid);
    border-radius: calc(var(--r-lg) - 2px);
    padding: var(--s-6) var(--s-8);
    display: flex;
    align-items: center;
    gap: var(--s-4);
}

.referral-link-inner input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: var(--font-sm);
    outline: none;
    min-width: 0;
}

/* Confetti burst on copy */
.confetti-wrap {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9990;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    animation: confettiFly 1.2s ease-out forwards;
}

@keyframes confettiFly {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translate(var(--cx), var(--cy)) scale(0.3) rotate(360deg);
    }
}

/* Refer stat cards */
.refer-stat-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0.5) 100%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-8);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.refer-stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-border);
    box-shadow: 0 8px 24px rgba(0, 230, 118, 0.12);
}

.refer-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.refer-stat-card:hover::after {
    opacity: 1;
}

/* Share buttons animated */
.share-btn {
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.share-btn:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 20px rgba(0, 230, 118, 0.2) !important;
}

.share-btn:active {
    transform: scale(0.96) !important;
}

/* Step timeline connector */
.steps-list-refer {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.step-item-refer {
    display: flex;
    align-items: flex-start;
    gap: var(--s-6);
    position: relative;
    padding-bottom: var(--s-8);
}

.step-item-refer:last-child {
    padding-bottom: 0;
}

.step-item-refer::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 32px;
    width: 2px;
    height: calc(100% - 24px);
    background: linear-gradient(180deg, var(--accent-border), transparent);
    animation: connectorGrow 1s ease-out 0.5s both;
}

.step-item-refer:last-child::before {
    display: none;
}

@keyframes connectorGrow {
    from {
        transform: scaleY(0);
        transform-origin: top;
    }

    to {
        transform: scaleY(1);
        transform-origin: top;
    }
}

.step-num {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--accent), #00C853);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: var(--font-xs);
    color: #0a0e17;
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.3);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.step-content-refer {
    display: block;
}

.step-title-refer {
    font-weight: 700;
    font-size: var(--font-sm);
    margin-bottom: 2px;
}

.step-desc-refer {
    font-size: var(--font-xs);
    color: var(--text-tertiary);
    line-height: 1.5;
}

/* Referral row slide-in */
.referral-row {
    display: flex;
    align-items: center;
    gap: var(--s-6);
    padding: var(--s-6) var(--s-8);
    border-bottom: 1px solid var(--border);
    animation: slideInLeft 0.4s ease-out both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.referral-row:last-child {
    border-bottom: none;
}

/* Stagger referral rows */
.referral-row:nth-child(1) {
    animation-delay: 0.05s;
}

.referral-row:nth-child(2) {
    animation-delay: 0.1s;
}

.referral-row:nth-child(3) {
    animation-delay: 0.15s;
}

.referral-row:nth-child(4) {
    animation-delay: 0.2s;
}

.referral-row:nth-child(5) {
    animation-delay: 0.25s;
}

/* ======================================================
   LEVEL-2 GAMIFICATION — Dashboard
   ====================================================== */

/* Level Ring (SVG circular progress around greeting) */
.level-ring-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.level-ring-svg {
    position: absolute;
    inset: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
}

.level-ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 3;
}

.level-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 4px rgba(0, 230, 118, 0.4));
}

/* Slot spin animation (visual flair on load) */
.slot-spin-wrap {
    display: inline-flex;
    overflow: hidden;
    height: 1.8em;
    vertical-align: middle;
    position: relative;
}

.slot-spin-inner {
    display: flex;
    flex-direction: column;
    animation: slotSpin 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.slot-spin-inner span {
    height: 1.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: inherit;
}

@keyframes slotSpin {
    0% {
        transform: translateY(-80%);
    }

    60% {
        transform: translateY(5%);
    }

    80% {
        transform: translateY(-2%);
    }

    100% {
        transform: translateY(0);
    }
}

/* Particle burst on stat card hover */
.stat-card.gamified {
    position: relative;
    overflow: visible;
}

.particle-burst {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.particle-burst.active {
    animation: particleFly 0.6s ease-out forwards;
}

@keyframes particleFly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--px), var(--py)) scale(0);
    }
}

/* Activity feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-feed-item {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: 10px var(--s-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    animation: activitySlide 0.4s ease-out both;
    font-size: var(--font-xs);
}

.activity-feed-item:last-child {
    border-bottom: none;
}

@keyframes activitySlide {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.activity-feed-item:nth-child(1) {
    animation-delay: 0.1s;
}

.activity-feed-item:nth-child(2) {
    animation-delay: 0.2s;
}

.activity-feed-item:nth-child(3) {
    animation-delay: 0.3s;
}

.activity-feed-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px rgba(0, 230, 118, 0.5);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.7);
    }
}

.activity-feed-text {
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.4;
}

.activity-feed-time {
    font-size: 0.6rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* Daily Challenges */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-4);
}

.challenge-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-6);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.challenge-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-border);
}

.challenge-card.completed-challenge {
    border-color: var(--accent-border);
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.06), transparent);
}

.challenge-ring-wrap {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--s-4);
    position: relative;
}

.challenge-ring-svg {
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}

.challenge-ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 4;
}

.challenge-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 126;
    stroke-dashoffset: 126;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.challenge-ring-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
}

.challenge-title {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 2px;
    line-height: 1.3;
}

.challenge-progress {
    font-size: 0.55rem;
    color: var(--text-tertiary);
}

.challenge-progress .text-accent {
    font-weight: 800;
}

/* Survey beacon (pulsing dot when survey available) */
.survey-beacon {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.6);
    animation: beaconPulse 1.5s ease-in-out infinite;
}

@keyframes beaconPulse {

    0%,
    100% {
        box-shadow: 0 0 6px rgba(0, 230, 118, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 230, 118, 0.8);
        transform: scale(1.3);
    }
}

/* Survey card (live Pollfish) */
.survey-live-card {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.08) 0%, var(--bg-card) 100%);
    border: 1px solid var(--accent-border);
    border-radius: var(--r-lg);
    padding: var(--s-8);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.survey-live-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 24px rgba(0, 230, 118, 0.15);
}

.survey-live-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.survey-live-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.1), transparent 70%);
    pointer-events: none;
}

/* Survey skeleton shimmer (loading state) */
.survey-skeleton {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    padding: var(--s-8);
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    border-radius: var(--r-xs);
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-line:nth-child(1) {
    width: 70%;
}

.skeleton-line:nth-child(2) {
    width: 45%;
}

.skeleton-line:nth-child(3) {
    width: 55%;
    height: 36px;
    border-radius: var(--r-md);
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ======================================================
   LEVEL-2 GAMIFICATION — Refer Page
   ====================================================== */

/* Milestone badges */
.milestone-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-4);
}

.milestone-badge {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-6);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.milestone-badge.unlocked {
    border-color: var(--accent-border);
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.06), transparent);
}

.milestone-badge.unlocked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 230, 118, 0.08), transparent 70%);
    pointer-events: none;
}

.milestone-badge.locked {
    opacity: 0.45;
}

.milestone-icon {
    font-size: 1.4rem;
    margin-bottom: var(--s-2);
    display: block;
}

.milestone-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.milestone-count {
    font-size: 0.55rem;
    color: var(--text-tertiary);
}

.milestone-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    color: #0a0e17;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-weight: 900;
}

/* Progress ring (next milestone) */
.progress-ring-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
}

.progress-ring-svg {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
}

.pr-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 5;
}

.pr-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 207;
    stroke-dashoffset: 207;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 4px rgba(0, 230, 118, 0.4));
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-ring-num {
    font-size: var(--font-lg);
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
}

.progress-ring-label {
    font-size: 0.55rem;
    color: var(--text-tertiary);
}

/* 3D tilt card */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 800px;
    transition: transform 0.1s ease-out;
}

.tilt-card-inner {
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
}

/* Earnings ticker */
.earnings-ticker {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    font-weight: 900;
    font-size: var(--font-xl);
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}

.earnings-ticker-sym {
    font-size: var(--font-sm);
    opacity: 0.7;
}

/* Referral mini-leaderboard */
.ref-leaderboard {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ref-lb-row {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: 10px var(--s-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s;
}

.ref-lb-row:hover {
    background: rgba(0, 230, 118, 0.03);
}

.ref-lb-row:last-child {
    border-bottom: none;
}

.ref-lb-rank {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.ref-lb-rank.gold {
    background: linear-gradient(135deg, #FFD700, #FFA000);
    color: #0a0e17;
}

.ref-lb-rank.silver {
    background: linear-gradient(135deg, #C0C0C0, #9E9E9E);
    color: #0a0e17;
}

.ref-lb-rank.bronze {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
    color: #fff;
}

/* Uniform spacing helper */
.mb-section {
    margin-bottom: var(--s-12);
}

/* Missing keyframes for refer page animations */
@keyframes confettiFly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--cx), var(--cy)) scale(0.3);
    }
}

@keyframes borderFlow {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes referGlowPulse {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes trophyBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ======================================================
   PERFORMANCE GUARD — Respect reduced motion
   ====================================================== */
@media (prefers-reduced-motion: reduce) {

    .dashboard-orb,
    .streak-flame,
    .xp-bar-fill::after,
    .achievement-item.locked::before,
    .achievement-item.earned,
    .leaderboard-item,
    .refer-hero-glow,
    .refer-hero-icon,
    .referral-link-card,
    .confetti-piece,
    .step-item-refer::before,
    .task-card:not(.completed)::before,
    .slot-spin-inner,
    .particle-burst,
    .activity-feed-item,
    .activity-feed-dot,
    .survey-beacon,
    .skeleton-line,
    .level-ring-fill,
    .challenge-ring-fill,
    .pr-fill {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================
   UNIVERSAL FOOTER
   ============================================ */
.site-footer {
    background: #060912;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: var(--s-16);
    padding: 0;
    position: relative;
}
.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px var(--s-8) 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
}
.footer-brand { max-width: 240px; }
.footer-logo { display: inline-block; margin-bottom: 12px; }
.footer-logo-img { height: 28px; width: auto; }
.footer-desc {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.35);
    line-height: 1.6;
    margin: 0 0 12px;
}
.footer-heading {
    font-size: 0.7rem;
    font-weight: 800;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 14px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
}
.footer-links a:hover {
    color: var(--accent);
    padding-left: 4px;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 32px;
    padding-top: 20px;
    text-align: center;
}
.footer-bottom p {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.2);
    margin: 0;
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .footer-brand { max-width: 100%; grid-column: 1 / -1; }
}

/* ============================================
   BANNED USER OVERLAY
   ============================================ */
.banned-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10,2,2,0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: bannedFadeIn 0.5s ease;
}
@keyframes bannedFadeIn { from { opacity:0; } to { opacity:1; } }

.banned-card {
    background: linear-gradient(135deg, rgba(40,5,5,0.9), rgba(20,2,2,0.95));
    border: 2px solid rgba(239,68,68,0.4);
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 80px rgba(239,68,68,0.15), 0 0 200px rgba(239,68,68,0.05);
    animation: bannedCardShake 0.6s ease 0.3s;
    position: relative;
    overflow: hidden;
}
.banned-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, transparent, rgba(239,68,68,0.15), transparent, rgba(239,68,68,0.15));
    background-size: 400% 400%;
    z-index: -1;
    border-radius: 20px;
    animation: bannedBorderGlow 4s linear infinite;
}
@keyframes bannedBorderGlow { 0% { background-position:0 50%; } 50% { background-position:100% 50%; } 100% { background-position:0 50%; } }
@keyframes bannedCardShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-8px) rotate(-1deg); }
    30% { transform: translateX(8px) rotate(1deg); }
    45% { transform: translateX(-6px); }
    60% { transform: translateX(6px); }
    75% { transform: translateX(-3px); }
}

.banned-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: bannedIconPulse 2s ease-in-out infinite;
}
@keyframes bannedIconPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }

.banned-glitch {
    font-size: 2rem;
    font-weight: 900;
    color: #ef4444;
    letter-spacing: 8px;
    margin-bottom: 8px;
    position: relative;
    animation: bannedGlitch 3s infinite;
}
@keyframes bannedGlitch {
    0%, 90%, 100% { text-shadow: none; }
    92% { text-shadow: -2px 0 #ff0000, 2px 0 #00ffff; }
    94% { text-shadow: 2px 0 #ff0000, -2px 0 #00ffff; }
    96% { text-shadow: -1px 0 #ff0000, 1px 0 #00ffff; }
    98% { text-shadow: 1px 0 #ff0000, -1px 0 #00ffff; }
}

.banned-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fca5a5;
    margin: 0 0 8px;
}
.banned-reason {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin: 0 0 16px;
    padding: 8px 12px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.15);
    border-radius: 8px;
}
.banned-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239,68,68,0.3), transparent);
    margin: 16px 0;
}
.banned-info {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    line-height: 1.6;
    margin: 0 0 20px;
}
.banned-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--r-full);
    color: #fca5a5;
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s;
}
.banned-logout-btn:hover {
    background: rgba(239,68,68,0.25);
    transform: scale(1.05);
}

/* ============================================
   EXTRA DASHBOARD ANIMATIONS
   ============================================ */

/* Floating coins background */
.floating-coins {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.floating-coin {
    position: absolute;
    font-size: 1rem;
    opacity: 0.06;
    animation: floatCoin linear infinite;
    will-change: transform;
}
.floating-coin:nth-child(1) { left:5%; animation-duration:22s; animation-delay:0s; }
.floating-coin:nth-child(2) { left:20%; animation-duration:18s; animation-delay:3s; }
.floating-coin:nth-child(3) { left:40%; animation-duration:25s; animation-delay:1s; }
.floating-coin:nth-child(4) { left:60%; animation-duration:20s; animation-delay:5s; }
.floating-coin:nth-child(5) { left:80%; animation-duration:23s; animation-delay:2s; }
.floating-coin:nth-child(6) { left:90%; animation-duration:19s; animation-delay:4s; }
@keyframes floatCoin {
    0% { transform: translateY(110vh) rotate(0deg); opacity:0; }
    10% { opacity:0.06; }
    90% { opacity:0.06; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity:0; }
}

/* Animated gradient border on stat cards */
.stat-card.glow-border {
    position: relative;
    overflow: hidden;
}
.stat-card.glow-border::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(45deg, var(--accent), transparent, var(--accent), transparent);
    background-size: 300% 300%;
    z-index: -1;
    border-radius: inherit;
    animation: glowBorderSpin 6s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}
.stat-card.glow-border:hover::after { opacity: 1; }
@keyframes glowBorderSpin { 0% { background-position:0 50%; } 50% { background-position:100% 50%; } 100% { background-position:0 50%; } }

/* Scroll-triggered reveal */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Spinner for buttons */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinnerRotate 0.6s linear infinite;
}
@keyframes spinnerRotate { to { transform: rotate(360deg); } }

/* ============================================
   7-DAY DAILY LOGIN BONUS STREAK
   ============================================ */
.streak-cards-wrap {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.streak-cards-wrap::-webkit-scrollbar { display: none; }

.streak-day-card {
    flex: 0 0 calc((100% - 48px) / 7);
    min-width: 72px;
    scroll-snap-align: start;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 12px 6px 10px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    animation: streakCardIn 0.4s ease backwards;
}
.streak-day-card:nth-child(1) { animation-delay: 0s; }
.streak-day-card:nth-child(2) { animation-delay: 0.05s; }
.streak-day-card:nth-child(3) { animation-delay: 0.1s; }
.streak-day-card:nth-child(4) { animation-delay: 0.15s; }
.streak-day-card:nth-child(5) { animation-delay: 0.2s; }
.streak-day-card:nth-child(6) { animation-delay: 0.25s; }
.streak-day-card:nth-child(7) { animation-delay: 0.3s; }
@keyframes streakCardIn { from { opacity:0; transform: translateY(15px) scale(0.9); } to { opacity:1; transform: none; } }

.streak-day-num {
    font-size: 0.55rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}
.streak-day-icon {
    font-size: 1.4rem;
    margin-bottom: 4px;
    transition: transform 0.3s;
}
.streak-day-amount {
    font-size: 0.65rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 6px;
}
.streak-day-badge { font-size: 1rem; }
.streak-day-lock {
    font-size: 0.8rem;
    opacity: 0.3;
}

/* Available day — pulsing glow */
.streak-available {
    border-color: rgba(0,230,118,0.4);
    background: rgba(0,230,118,0.06);
    box-shadow: 0 0 20px rgba(0,230,118,0.12), 0 0 40px rgba(0,230,118,0.05);
    animation: streakCardIn 0.4s ease backwards, streakPulse 2.5s ease-in-out infinite;
}
@keyframes streakPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0,230,118,0.12); }
    50% { box-shadow: 0 0 30px rgba(0,230,118,0.25), 0 0 60px rgba(0,230,118,0.08); }
}
.streak-available .streak-day-icon { animation: bounceIcon 2s ease-in-out infinite; }
@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Claimed day — green tint */
.streak-claimed {
    border-color: rgba(0,230,118,0.15);
    background: rgba(0,230,118,0.04);
}
.streak-claimed .streak-day-icon { opacity: 0.6; }
.streak-claimed .streak-day-amount { opacity: 0.5; }

/* Just claimed — celebration pulse */
.streak-just-claimed {
    animation: justClaimedPop 0.5s ease !important;
}
@keyframes justClaimedPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.15); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Locked day — dimmed */
.streak-locked {
    opacity: 0.35;
}
.streak-locked .streak-day-icon { filter: grayscale(0.8); }

/* Claim button */
.streak-claim-btn {
    background: linear-gradient(135deg, var(--accent), #00C853);
    color: #0a0e17;
    border: none;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    animation: claimBtnPulse 2s ease-in-out infinite;
    text-transform: uppercase;
}
.streak-claim-btn:hover { transform: scale(1.1); filter: brightness(1.1); }
.streak-claim-btn:active { transform: scale(0.95); }
@keyframes claimBtnPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0,230,118,0.3); }
    50% { box-shadow: 0 0 16px rgba(0,230,118,0.5); }
}

/* Confetti */
.confetti-piece {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 99999;
    animation: confettiFly 1s ease-out forwards;
}
@keyframes confettiFly {
    0% { transform: translate(0,0) rotate(0deg); opacity:1; }
    100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity:0; }
}

/* Coin splash */
.coin-splash {
    position: fixed;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 99998;
    animation: coinFly 1s ease-out forwards;
}
@keyframes coinFly {
    0% { transform: translate(0,0); opacity:1; }
    100% { transform: translate(var(--drift), -120px); opacity:0; }
}

/* Amount float */
.amount-float {
    position: fixed;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--accent);
    pointer-events: none;
    z-index: 99999;
    text-shadow: 0 0 10px rgba(0,230,118,0.5);
    transform: translateX(-50%);
    animation: amountUp 1.4s ease-out forwards;
}
@keyframes amountUp {
    0% { opacity:1; transform: translateX(-50%) translateY(0) scale(1); }
    100% { opacity:0; transform: translateX(-50%) translateY(-80px) scale(1.3); }
}

@media (max-width: 480px) {
    .streak-day-card { min-width: 64px; flex: 0 0 calc((100% - 24px) / 4.5); }
}