/* ============================================
   EarnHub - Modern Earning Platform
   Design System & Global Styles
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #0f0c29;
    --bg-secondary: #1a1545;
    --bg-card: rgba(255, 255, 255, 0.06);
    --bg-card-hover: rgba(255, 255, 255, 0.1);
    --bg-input: rgba(255, 255, 255, 0.08);
    --gradient-main: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --gradient-accent: linear-gradient(135deg, #667eea, #764ba2);
    --gradient-success: linear-gradient(135deg, #11998e, #38ef7d);
    --gradient-warning: linear-gradient(135deg, #f2994a, #f2c94c);
    --gradient-danger: linear-gradient(135deg, #eb3349, #f45c43);
    --gradient-info: linear-gradient(135deg, #2196f3, #21cbf3);
    --gradient-purple: linear-gradient(135deg, #a855f7, #6366f1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --accent: #667eea;
    --accent-light: #818cf8;
    --success: #38ef7d;
    --warning: #f2c94c;
    --danger: #f45c43;
    --border-color: rgba(255, 255, 255, 0.08);
    --nav-height: 70px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.2);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    background: var(--gradient-main);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* App Container */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

.app-content {
    padding: 20px 16px;
    padding-bottom: calc(var(--nav-height) + 20px);
    min-height: 100vh;
}

/* ============ Bottom Navigation ============ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-height);
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
}

.nav-item .material-icons-round {
    font-size: 24px;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-item.active .material-icons-round {
    color: var(--accent-light);
}

.nav-item.active .nav-label {
    color: var(--accent-light);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 0 0 4px 4px;
}

/* ============ Page Header / Top Bar ============ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-top: 8px;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ============ Cards ============ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.card:hover {
    background: var(--bg-card-hover);
}

.card-gradient {
    border: none;
    position: relative;
    overflow: hidden;
}

.card-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title .material-icons-round {
    font-size: 18px;
    color: var(--accent-light);
}

.card-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Balance Card */
.balance-card {
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.balance-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.balance-label {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-amount {
    font-size: 38px;
    font-weight: 800;
    margin: 8px 0;
    letter-spacing: -1px;
}

.balance-sub {
    font-size: 12px;
    opacity: 0.7;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.stat-icon .material-icons-round {
    font-size: 20px;
    color: #fff;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

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

/* ============ Buttons ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    position: relative;
    overflow: hidden;
}

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

.btn:active::after {
    background: rgba(255,255,255,0.15);
}

.btn-primary {
    background: var(--gradient-accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-success {
    background: var(--gradient-success);
    color: #0f0c29;
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
}

.btn-danger {
    background: var(--gradient-danger);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent-light);
}

.btn-outline:hover {
    background: rgba(102, 126, 234, 0.1);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============ Forms ============ */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    background: rgba(102, 126, 234, 0.08);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='rgba(255,255,255,0.4)'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .material-icons-round {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
}

.input-icon-wrap .form-input {
    padding-left: 44px;
}

/* ============ Task Cards ============ */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
    cursor: pointer;
}

.task-card:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

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

.task-icon .material-icons-round {
    font-size: 24px;
    color: #fff;
}

.task-info {
    flex: 1;
    min-width: 0;
}

.task-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.task-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-reward {
    font-size: 16px;
    font-weight: 700;
    color: var(--success);
    flex-shrink: 0;
}

/* Task type badges */
.task-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-captcha { background: rgba(102, 126, 234, 0.2); color: #818cf8; }
.badge-click { background: rgba(56, 239, 125, 0.15); color: #38ef7d; }
.badge-visit { background: rgba(33, 150, 243, 0.2); color: #64b5f6; }
.badge-survey { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.badge-bonus { background: rgba(242, 201, 76, 0.2); color: #f2c94c; }

/* ============ Transaction List ============ */
.transaction-list {
    display: flex;
    flex-direction: column;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.txn-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.txn-icon .material-icons-round {
    font-size: 20px;
    color: #fff;
}

.txn-info {
    flex: 1;
}

.txn-title {
    font-size: 14px;
    font-weight: 600;
}

.txn-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.txn-amount {
    font-size: 15px;
    font-weight: 700;
}

.txn-amount.credit { color: var(--success); }
.txn-amount.debit { color: var(--danger); }

/* ============ Status Badges ============ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-pending { background: rgba(242, 201, 76, 0.15); color: #f2c94c; }
.status-approved, .status-completed { background: rgba(56, 239, 125, 0.15); color: #38ef7d; }
.status-rejected, .status-failed { background: rgba(244, 92, 67, 0.15); color: #f45c43; }

/* ============ Announcements ============ */
.announcement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.announcement-card .material-icons-round {
    color: var(--warning);
    font-size: 20px;
    margin-top: 2px;
}

.announcement-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.announcement-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============ Captcha Widget ============ */
.captcha-box {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin: 20px 0;
}

.captcha-display {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 8px;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    user-select: none;
    font-family: 'Courier New', monospace;
    color: var(--accent-light);
    position: relative;
    overflow: hidden;
}

.captcha-display::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.02) 10px,
        rgba(255,255,255,0.02) 20px
    );
}

.captcha-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.captcha-timer .timer-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--warning);
}

/* ============ Profile ============ */
.profile-header {
    text-align: center;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 32px;
    font-weight: 800;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
}

.profile-email {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
}

.profile-menu-item:hover {
    background: var(--bg-card-hover);
}

.profile-menu-item .material-icons-round {
    font-size: 22px;
    color: var(--accent-light);
}

.profile-menu-item span:last-child {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 18px;
}

/* ============ Section Headers ============ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
}

.section-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-light);
}

/* ============ Toast Notifications ============ */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 440px;
    width: calc(100% - 32px);
}

.toast {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(20px);
    animation: toastIn 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.toast-success {
    background: rgba(56, 239, 125, 0.15);
    border: 1px solid rgba(56, 239, 125, 0.3);
    color: var(--success);
}

.toast-error {
    background: rgba(244, 92, 67, 0.15);
    border: 1px solid rgba(244, 92, 67, 0.3);
    color: var(--danger);
}

.toast-info {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: var(--accent-light);
}

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

/* ============ Leaderboard ============ */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.rank-1 { background: linear-gradient(135deg, #f7971e, #ffd200); color: #000; }
.rank-2 { background: linear-gradient(135deg, #bdc3c7, #e0e0e0); color: #000; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #daa520); color: #000; }
.rank-default { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border-color); }

.leaderboard-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}

.leaderboard-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--success);
}

/* ============ Referral ============ */
.referral-link-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin: 12px 0;
}

.referral-link-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 13px;
    outline: none;
}

.referral-link-box button {
    background: var(--gradient-accent);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

/* ============ Withdraw Form ============ */
.method-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.method-option {
    text-align: center;
    padding: 14px 8px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.method-option.active {
    border-color: var(--accent);
    background: rgba(102, 126, 234, 0.1);
}

.method-option .material-icons-round {
    font-size: 28px;
    margin-bottom: 6px;
    color: var(--accent-light);
}

.method-option span {
    display: block;
    font-size: 12px;
    font-weight: 600;
}

/* ============ Empty State ============ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state .material-icons-round {
    font-size: 56px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
}

/* ============ Tabs ============ */
.tab-nav {
    display: flex;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--gradient-accent);
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ============ Auth Pages ============ */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 20px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 6px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    backdrop-filter: blur(10px);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent-light);
    font-weight: 600;
}

/* ============ Quick Action Buttons ============ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.quick-action:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.quick-action .icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action .icon-wrap .material-icons-round {
    font-size: 20px;
    color: #fff;
}

.quick-action span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============ Chart placeholder ============ */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    padding-top: 10px;
}

.bar {
    flex: 1;
    border-radius: 6px 6px 0 0;
    background: var(--gradient-accent);
    min-height: 8px;
    position: relative;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============ Admin ============ */
.admin-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -20px -16px 20px;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 12px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 12px 8px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* ============ Modal ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 5000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    padding: 28px 24px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 2px;
    margin: 0 auto 20px;
}

/* ============ Animations ============ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-fade { animation: fadeIn 0.4s ease; }
.animate-slide { animation: slideUp 0.4s ease; }
.animate-pulse { animation: pulse 2s infinite; }

/* Staggered children animation */
.stagger > * {
    opacity: 0;
    animation: slideUp 0.4s ease forwards;
}

.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* ============ Scrollbar ============ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }

/* ============ Utility ============ */
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-sm { gap: 8px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ============ Loading spinner ============ */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading .spinner {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

/* ============ Progress bar ============ */
.progress-bar {
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--gradient-accent);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ Divider ============ */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

.divider-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 12px;
    margin: 20px 0;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* ============ Responsive ============ */

/* Desktop mode - 768px and above */
@media (min-width: 768px) {
    body {
        background: #0a0820;
    }

    .app-container {
        max-width: 1200px;
        display: grid;
        grid-template-columns: 260px 1fr;
        min-height: 100vh;
        box-shadow: 0 0 60px rgba(0,0,0,0.5);
    }

    .app-content {
        padding: 32px 40px;
        padding-bottom: 32px;
        max-width: 800px;
    }

    /* Desktop sidebar nav */
    .bottom-nav {
        position: sticky;
        top: 0;
        left: 0;
        width: 260px;
        height: 100vh;
        max-width: none;
        transform: none;
        flex-direction: column;
        justify-content: flex-start;
        padding: 32px 16px;
        gap: 6px;
        border-top: none;
        border-right: 1px solid var(--border-color);
        background: rgba(15, 12, 41, 0.98);
    }

    .bottom-nav::before {
        content: '💰 EarnHub';
        display: block;
        font-size: 22px;
        font-weight: 800;
        text-align: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-item {
        flex-direction: row;
        gap: 14px;
        padding: 14px 20px;
        border-radius: var(--radius-md);
        width: 100%;
    }

    .nav-item.active {
        background: rgba(102, 126, 234, 0.15);
    }

    .nav-item.active::before {
        display: none;
    }

    .nav-label {
        font-size: 14px;
    }

    /* Desktop stats */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .admin-stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Desktop cards */
    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(0,0,0,0.3);
    }

    .balance-card {
        padding: 36px 32px;
    }

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

    .page-title {
        font-size: 28px;
    }

    .auth-page {
        max-width: 440px;
        margin: 0 auto;
    }

    /* Desktop task card grid */
    .task-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .task-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .task-card:hover {
        transform: translateY(-4px);
    }

    .method-selector {
        grid-template-columns: repeat(3, 1fr);
        max-width: 400px;
    }

    /* Desktop modal */
    .modal-overlay {
        align-items: center;
    }

    .modal-content {
        border-radius: var(--radius-xl);
        max-width: 480px;
    }
}

/* Tablet mode */
@media (min-width: 481px) and (max-width: 767px) {
    body {
        background: #0a0820;
    }

    .app-container {
        max-width: 580px;
        box-shadow: 0 0 60px rgba(0,0,0,0.5);
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Task type badge colors */
.badge-spin { background: rgba(255, 183, 77, 0.2); color: #ffb74d; }
.badge-puzzle { background: rgba(233, 30, 99, 0.2); color: #f48fb1; }
.badge-video { background: rgba(0, 188, 212, 0.2); color: #4dd0e1; }
.badge-install { background: rgba(139, 195, 74, 0.2); color: #aed581; }
.badge-daily_bonus { background: rgba(242, 201, 76, 0.2); color: #f2c94c; }

/* Spin Wheel */
.spin-wheel-wrap {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto;
}

.spin-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--accent);
    background: conic-gradient(
        #667eea 0deg 45deg, #38ef7d 45deg 90deg,
        #f2c94c 90deg 135deg, #a855f7 135deg 180deg,
        #eb3349 180deg 225deg, #11998e 225deg 270deg,
        #f2994a 270deg 315deg, #2196f3 315deg 360deg
    );
    transition: transform 3s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    box-shadow: 0 0 30px rgba(102,126,234,0.3);
}

.spin-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 24px solid #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    z-index: 2;
}

.spin-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(102,126,234,0.5);
    z-index: 2;
}

/* Slider captcha */
.slider-captcha {
    position: relative;
    width: 100%;
    height: 50px;
    background: rgba(255,255,255,0.05);
    border-radius: 25px;
    border: 2px solid var(--border-color);
    margin: 20px 0;
    overflow: hidden;
}

.slider-track {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--gradient-success);
    border-radius: 25px;
    width: 0;
    transition: width 0.1s;
}

.slider-thumb {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 100%;
    background: #fff;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 2;
}

.slider-thumb .material-icons-round {
    color: #333;
    font-size: 24px;
}

.slider-text {
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 50px;
    font-size: 13px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Image captcha grid */
.image-captcha-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 16px 0;
}

.image-captcha-cell {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    position: relative;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.image-captcha-cell.selected {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(102,126,234,0.4);
}

.image-captcha-cell.selected::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Word puzzle */
.word-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin: 16px 0;
}

.word-cell {
    aspect-ratio: 1;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}

.word-cell.selected {
    background: rgba(102,126,234,0.2);
    border-color: var(--accent);
    color: var(--accent-light);
}

/* Click ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Confetti */
@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* Admin Full Width Desktop */
@media (min-width: 768px) {
    .app-container.admin-mode {
        display: block !important;
        max-width: 100% !important;
        width: 100% !important;
        box-shadow: none !important;
        background: transparent !important;
        grid-template-columns: none !important;
        border-radius: 0;
    }
    .app-container.admin-mode .app-content {
        max-width: 100% !important;
        padding: 40px !important;
    }
    .app-container.admin-mode .admin-stat-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px;
    }
    .app-container.admin-mode .quick-actions {
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 20px;
    }
}
