* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #060814;
    color: #ffffff;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 450px;
    min-height: 100vh;
    padding: 16px 16px 90px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Tab Views */
.tab-view { display: none; }
.tab-view.active { display: flex; flex-direction: column; gap: 14px; }

/* 1. Home Profile Card */
.profile-card {
    background: linear-gradient(135deg, #181534, #121026);
    border: 1px solid #2d2859;
    border-radius: 20px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.profile-left { display: flex; align-items: center; gap: 12px; }
.avatar-wrap { position: relative; width: 52px; height: 52px; }
.avatar {
    width: 100%; height: 100%; border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; color: #fff; border: 2px solid #8b5cf6;
}
.rank-badge {
    position: absolute; bottom: -4px; right: -4px;
    background: #eab308; color: #000; font-size: 10px; font-weight: 900;
    padding: 1px 5px; border-radius: 10px; border: 1.5px solid #121026;
}
.user-details h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.leaderboard-btn {
    background: rgba(234, 179, 8, 0.1); border: 1px solid #eab308;
    color: #facc15; font-size: 11px; font-weight: 600; padding: 4px 10px;
    border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.balance-box { text-align: right; }
.balance-title { font-size: 10px; color: #94a3b8; letter-spacing: 0.5px; font-weight: 700; }
.balance-amount { font-size: 22px; font-weight: 800; color: #00f29b; margin-top: 2px; }

/* Live Proof Bar */
.live-proof {
    background: #15102a; border: 1px solid #3b2d6a; border-radius: 16px;
    padding: 10px 14px; display: flex; align-items: center; gap: 12px;
}
.live-tag {
    background: #3f1528; border: 1px solid #ff2a6d; color: #ff5e91;
    font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 8px;
    display: flex; align-items: center; gap: 5px; line-height: 1.2; text-align: center;
}
.live-tag .dot { width: 6px; height: 6px; background: #ff2a6d; border-radius: 50%; box-shadow: 0 0 8px #ff2a6d; }
.live-text { font-size: 12px; font-weight: 600; color: #f1f5f9; }

/* Actions Grid */
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action-card { border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.action-card.spin { background: linear-gradient(145deg, #1d1538, #130f26); border: 1px solid #583c99; }
.action-card.rank { background: linear-gradient(145deg, #241d18, #171310); border: 1px solid #784c17; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.badge-purple { background: rgba(168, 85, 247, 0.2); color: #c084fc; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 8px; }
.badge-yellow { background: rgba(234, 179, 8, 0.2); color: #facc15; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 8px; }
.card-icon { font-size: 18px; }
.spin-icon { color: #d8b4fe; }
.trophy-icon { color: #facc15; }
.card-bottom h4 { font-size: 15px; font-weight: 700; }
.action-card.rank .card-bottom h4 { color: #facc15; }
.card-bottom p { font-size: 11px; color: #94a3b8; margin-top: 3px; }

/* Stats Card */
.stats-card {
    background: #111428; border: 1px solid #22294c; border-radius: 16px;
    padding: 14px 10px; display: grid; grid-template-columns: 1fr 1fr 1fr; text-align: center;
}
.stat-item { border-right: 1px solid #1e2547; }
.stat-item:last-child { border-right: none; }
.stat-title { font-size: 11px; color: #94a3b8; margin-bottom: 4px; }
.stat-val { font-size: 14px; font-weight: 800; }
.val-cyan { color: #00f29b; }
.val-yellow { color: #f59e0b; }
.val-blue { color: #38bdf8; }

/* Daily Checkin */
.checkin-card { background: #0f132b; border: 1px solid #1f2756; border-radius: 18px; padding: 16px 14px; }
.checkin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.checkin-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.reset-time { font-size: 11px; color: #60a5fa; }
.days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 12px; }
.day-box { background: #141a39; border: 1px solid #232c5e; border-radius: 8px; padding: 6px 2px; text-align: center; font-size: 10px; }
.day-box.active { background: #064e3b; border-color: #059669; }
.day-box .day-num { font-weight: 700; color: #cbd5e1; margin-bottom: 2px; }
.day-box.active .day-num { color: #34d399; }
.day-box .day-amt { font-size: 9px; color: #94a3b8; }
.day-box.active .day-amt { color: #6ee7b7; font-weight: 700; }
.claim-btn {
    width: 100%; background: #2563eb; color: #ffffff; border: none; padding: 12px;
    border-radius: 12px; font-size: 13px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.claim-btn.claimed { background: #182245; color: #94a3b8; border: 1px solid #2d3b6f; cursor: not-allowed; }

/* History Section */
.history-section { margin-top: 4px; }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.history-header h4 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.history-link { font-size: 11px; color: #38bdf8; text-decoration: none; font-weight: 600; }
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item { background: #11142b; border: 1px solid #1e244d; border-radius: 14px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.history-left { display: flex; align-items: center; gap: 12px; }
.h-icon { width: 36px; height: 36px; border-radius: 10px; background: #064e3b; color: #34d399; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.h-title { font-size: 13px; font-weight: 700; }
.h-date { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.h-amount { font-size: 14px; font-weight: 800; color: #00f29b; }

/* ================== TASK VIEW STYLES (SCREENSHOT) ================== */
.task-top-banner {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    border-radius: 20px;
    padding: 18px 16px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}
.task-top-banner h2 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.task-top-banner p { font-size: 11px; color: #e0e7ff; margin-bottom: 14px; }
.timer-pill {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
}
.timer-pill .t-left { color: #facc15; display: flex; align-items: center; gap: 6px; }
.timer-pill .t-right { color: #facc15; font-family: monospace; font-size: 12px; }

/* Task Login Bonus */
.task-login-bonus {
    background: #09211d;
    border: 1px solid #114b3f;
    border-radius: 18px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bonus-tag { font-size: 12px; font-weight: 700; color: #34d399; margin-bottom: 2px; }
.bonus-val { font-size: 18px; font-weight: 800; color: #00f29b; }
.btn-claimed-task {
    background: #1c2b29;
    color: #94a3b8;
    border: 1px solid #28443e;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: not-allowed;
}

/* Watch Ads Card */
.watch-ads-card {
    background: #10142b;
    border: 1px solid #202754;
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.watch-ads-header { display: flex; align-items: center; gap: 12px; }
.play-icon-box {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: #25284f;
    color: #c084fc;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.watch-ads-header h3 { font-size: 16px; font-weight: 700; }
.earn-tag { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.earn-tag span { color: #00f29b; font-weight: 700; }

.progress-wrap { display: flex; flex-direction: column; gap: 6px; }
.progress-text { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: #94a3b8; }
.progress-text .p-count { color: #ffffff; }
.progress-bar-bg { width: 100%; height: 8px; background: #1c234a; border-radius: 10px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #ec4899, #a855f7); border-radius: 10px; }
.remaining-text { text-align: right; font-size: 10px; color: #94a3b8; }
.remaining-text span { color: #facc15; font-weight: 700; }

.lucky-spin-rule {
    background: #0b0e22;
    border: 1px solid #1c224a;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rule-title { font-size: 11px; font-weight: 700; color: #cbd5e1; display: flex; align-items: center; gap: 6px; }
.rule-badges { display: flex; gap: 8px; }
.rb-item {
    background: #1e193b;
    border: 1px solid #583c99;
    color: #e2e8f0;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    display: flex; align-items: center; gap: 4px;
}

.btn-watch-ad {
    background: linear-gradient(90deg, #ec4899, #a855f7);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

/* Tasks Category */
.task-category { display: flex; flex-direction: column; gap: 8px; }
.cat-header { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.cat-tg { color: #38bdf8; }
.cat-social { color: #c084fc; }

.task-item-card {
    background: #10142b;
    border: 1px solid #1f2756;
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.t-item-left { display: flex; align-items: center; gap: 12px; }
.t-logo-box { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.tg-bg { background: #132b45; color: #38bdf8; }
.yt-bg { background: #3f1a24; color: #ef4444; }
.t-item-left h4 { font-size: 12px; font-weight: 700; max-width: 170px; line-height: 1.3; }
.reward-green { font-size: 11px; font-weight: 800; color: #00f29b; }

.btn-task-done {
    background: #182245; color: #94a3b8; border: 1px solid #2d3b6f;
    padding: 8px 16px; border-radius: 10px; font-size: 11px; font-weight: 700; cursor: not-allowed;
}
.btn-task-start {
    background: #4338ca; color: white; border: none;
    padding: 8px 18px; border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #090c1e; border-top: 1px solid #1c2243;
    display: flex; justify-content: space-around; padding: 10px 0; z-index: 100;
}
.nav-item {
    background: none; border: none; color: #64748b;
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; cursor: pointer; font-size: 11px; font-weight: 600;
}
.nav-item i { font-size: 18px; }
.nav-item.active { color: #6366f1; }

/* Modals */
.modal {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8); z-index: 200; align-items: center; justify-content: center; padding: 20px;
}
.modal.open { display: flex; }
.modal-content {
    background: #12142d; border: 1px solid #283060; border-radius: 20px;
    padding: 20px; width: 100%; max-width: 400px; text-align: center;
}
.modal-content input, .modal-content select {
    width: 100%; padding: 12px; margin: 10px 0; border-radius: 10px;
    border: 1px solid #334155; background: #090c1e; color: white;
}
.modal-btn {
    width: 100%; padding: 12px; background: #2563eb; color: white;
    border: none; border-radius: 10px; font-weight: bold; cursor: pointer; margin-top: 10px;
}