:root {
    --bg-gradient: radial-gradient(circle at center, #2c3e50 0%, #000000 100%);
    --text-white: #ffffff;
    --accent-yellow: #f1c40f;
    --card-bg: #1c1c1c;
    --sub-text: #888;
}

body {
    margin: 0; padding: 0;
    font-family: 'Inter', sans-serif;
    background: #000;
    color: var(--text-white);
    height: 100vh; overflow: hidden;
    user-select: none; -webkit-tap-highlight-color: transparent;
}

#app { width: 100%; max-width: 500px; height: 100vh; margin: 0 auto; position: relative; display: flex; flex-direction: column; background: var(--bg-gradient); }
.screen-container { flex: 1; display: flex; flex-direction: column; padding: 20px; box-sizing: border-box; }

/* Header */
.header { display: flex; flex-direction: column; align-items: center; margin-top: 40px; }
.score-wrapper { display: flex; align-items: center; gap: 12px; margin-bottom: 5px; }
.score-coin-icon { width: 45px; height: 45px; }
#score { font-size: 52px; font-weight: 800; }
.league-container { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; color: #cbd5e0; cursor: pointer; }

/* Game Area */
.game-area { flex: 1; display: flex; justify-content: center; align-items: center; perspective: 1000px; }
#coin-wrapper { width: 280px; height: 280px; position: relative; transition: transform 0.1s ease-out; }
.coin { width: 100%; height: 100%; cursor: pointer; filter: drop-shadow(0 0 40px rgba(241, 196, 15, 0.25)); }
.coin img { width: 100%; height: 100%; pointer-events: none; }

/* Footer Stats */
.footer-stats { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 25px; padding: 0 20px; }
.energy-header { display: flex; align-items: center; gap: 10px; }
.lightning { font-size: 32px; color: var(--accent-yellow); }
.energy-text { display: flex; flex-direction: column; }
#energy-val { font-size: 26px; font-weight: 800; }
.energy-max-text { font-size: 14px; font-weight: 600; opacity: 0.6; }

/* Menu Pill */
.menu-pill { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border-radius: 16px; display: flex; align-items: center; padding: 10px 15px; gap: 15px; }
.menu-item { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.menu-emoji { font-size: 22px; }
.menu-text { font-size: 11px; font-weight: 700; color: #e2e8f0; }
.menu-divider { width: 1px; height: 25px; background: rgba(255, 255, 255, 0.1); }

/* Progress Bar (Energy) */
.league-progress-bar { width: calc(100% - 40px); height: 14px; background: rgba(255, 255, 255, 0.1); border-radius: 7px; overflow: hidden; margin: 0 20px 10px; }
#energy-progress-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #f1c40f, #e67e22); transition: width 0.3s ease; }

/* Bottom Sheets */
.bottom-sheet { position: fixed; bottom: -100%; left: 0; width: 100%; height: 75%; background: #000; border-radius: 30px 30px 0 0; z-index: 1000; display: flex; flex-direction: column; transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; }
.bottom-sheet.open { bottom: 0; }
.sheet-header { display: flex; justify-content: space-between; align-items: center; padding: 25px 25px 15px; background: #000; z-index: 10; }
.sheet-content { flex: 1; overflow-y: auto; padding: 0 25px 100px; -webkit-overflow-scrolling: touch; }
.pull-bar { width: 40px; height: 4px; background: #333; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); border-radius: 2px; }

/* Common List Items */
.boosters-main-container, .earn-list { background: var(--card-bg); border-radius: 20px; overflow: hidden; }
.boost-list-item, .earn-item { display: flex; align-items: center; padding: 18px 20px; gap: 15px; cursor: pointer; border-bottom: 1px solid #262626; transition: background 0.2s; }
.boost-list-item:active, .earn-item:active { background: #262626; }
.boost-list-item:last-child, .earn-item:last-child { border-bottom: none; }
.boost-list-item.disabled, .earn-item.completed { opacity: 0.4; filter: grayscale(1); pointer-events: none; }

/* Section Labels */
.boosts-section-label, .earn-section-label { color: #fff; font-size: 18px; margin: 25px 0 15px; font-weight: 700; }

/* Boosts Specifics */
.boost-list-icon, .earn-icon-box { width: 48px; height: 48px; background: #262626; border-radius: 12px; display: flex; justify-content: center; align-items: center; font-size: 28px; overflow: hidden; }
.task-img-icon { width: 100%; height: 100%; object-fit: cover; }
.boost-list-details, .earn-details { flex: 1; }
.boost-list-title, .earn-title { font-weight: 700; font-size: 16px; display: block; }
.boost-list-sub { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; color: #888; }
.boost-list-arrow { color: #444; font-size: 24px; }
.daily-boosters { display: flex; gap: 15px; margin-bottom: 30px; }
.daily-card { flex: 1; background: var(--card-bg); padding: 15px 20px; border-radius: 16px; display: flex; justify-content: space-between; align-items: center; opacity: 0.4; }

/* Earn Specifics */
.earn-hero-card { background: var(--card-bg); border-radius: 20px; padding: 25px; display: flex; align-items: center; gap: 20px; margin-bottom: 30px; }
.earn-reward { font-size: 14px; color: var(--accent-yellow); font-weight: 600; margin-top: 2px; }

/* Frens Specifics */
.referral-box { background: var(--card-bg); padding: 20px; border-radius: 18px; margin-bottom: 25px; }
.ref-link-container { display: flex; gap: 10px; align-items: center; }
#ref-link { background: #000; padding: 10px; border-radius: 8px; flex: 1; font-size: 12px; color: #888; overflow: hidden; text-overflow: ellipsis; }
#copy-ref { background: var(--accent-yellow); color: #000; border: none; padding: 10px 15px; border-radius: 8px; font-weight: 700; }
.friends-list-container h3 { font-size: 18px; margin-bottom: 15px; }
.friend-item { background: var(--card-bg); padding: 15px; border-radius: 15px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.friend-avatar { font-size: 24px; margin-right: 12px; }
.friend-name { font-weight: 700; flex: 1; }
.friend-stats { font-size: 13px; color: var(--accent-yellow); font-weight: 600; }

/* Leaderboard Specifics */
.lb-navigator { display: flex; justify-content: space-between; align-items: center; background: #1c1c1c; padding: 15px; border-radius: 15px; margin-bottom: 20px; }
.lb-nav-btn { background: none; border: none; color: white; font-size: 32px; cursor: pointer; padding: 0 10px; }
.lb-current-header { display: flex; flex-direction: column; align-items: center; gap: 5px; }
#lb-league-icon { font-size: 48px; }
#lb-league-name { font-weight: 800; font-size: 20px; color: var(--accent-yellow); }
.next-league-box { background: #1c1c1c; padding: 15px; border-radius: 15px; text-align: center; margin-bottom: 20px; }
.leaderboard-item { background: #111; padding: 12px 15px; border-radius: 12px; display: flex; align-items: center; gap: 15px; margin-bottom: 8px; }
.leaderboard-item.me { border: 1px solid var(--accent-yellow); background: rgba(241, 196, 15, 0.1); }
.rank { font-weight: 800; color: #555; width: 30px; }

/* Admin Section */
.admin-icon { position: absolute; top: 20px; right: 20px; width: 30px; height: 20px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; z-index: 100; }
.admin-icon span { display: block; width: 100%; height: 3px; background: white; border-radius: 2px; }
.admin-option { background: var(--card-bg); border-radius: 18px; padding: 20px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; cursor: pointer; }
.admin-player-card { background: #222; padding: 12px; border-radius: 12px; margin-bottom: 8px; border-left: 4px solid var(--accent-yellow); }
.ap-row { display: flex; justify-content: space-between; font-size: 13px; }

/* Unit Tests Logging */
.test-output-log {
    background: #111;
    color: #0f0;
    padding: 15px;
    border-radius: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #333;
}

.test-error { color: #ff4757; border-color: #ff4757; }
.test-success { color: #2ed573; border-color: #2ed573; }

/* UI Helpers */
.close-btn { width: 32px; height: 32px; background: #333; border: none; border-radius: 50%; color: #fff; display: flex; justify-content: center; align-items: center; font-weight: bold; }
.notification-toast { position: fixed; top: -100px; left: 50%; transform: translateX(-50%); background: #fff; color: #000; padding: 12px 25px; border-radius: 30px; font-weight: 700; z-index: 2000; transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 10px 30px rgba(0,0,0,0.5); white-space: nowrap; }
.notification-toast.show { top: 30px; }
.hidden { display: none !important; }
.plus-one { position: absolute; font-size: 32px; font-weight: 800; color: #fff; pointer-events: none; animation: floatAnim 0.8s ease-out forwards; z-index: 500; }
@keyframes floatAnim { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-150px) scale(1.2); opacity: 0; } }
