@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600;800;900&display=swap');

:root {
    --bg-gradient: radial-gradient(circle at center, #1b2735 0%, #090a0f 100%);
    --glass-dark: rgba(12, 12, 20, 0.95);
    --glass-panel: rgba(20, 25, 40, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #00d2ff;
    --primary-glow: rgba(0, 210, 255, 0.6);
    --gold: #ffd700;
    --gold-grad: linear-gradient(135deg, #ffd700 0%, #fdb931 100%);
    --rage: #ff4757;
    --text-main: #ffffff;
    --btn-grad: linear-gradient(135deg, #00c6ff, #0072ff);
    --card-bg: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; touch-action: manipulation; }

body {
    margin: 0; font-family: 'Exo 2', sans-serif; color: var(--text-main); 
    height: 100dvh; overflow: hidden;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    background-size: 200% 200%;
}

/* UI COMPONENTS */
.overlay-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 10, 0.95); z-index: 9000;
    display: flex; justify-content: center; align-items: center;
    flex-direction: column; backdrop-filter: blur(15px);
    transition: opacity 0.4s, visibility 0.4s;
}
.modal-overlay { z-index: 10000; background: rgba(0,0,0,0.8); }
.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader { width: 60px; height: 60px; border: 4px solid rgba(255,255,255,0.05); border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; box-shadow: 0 0 20px var(--primary-glow); }
@keyframes spin { 100% { transform: rotate(360deg); } }

.menu-title { 
    font-size: 48px; font-weight: 900; margin-bottom: 50px; text-align: center; 
    text-transform: uppercase; letter-spacing: 4px; line-height: 1.1;
    background: linear-gradient(180deg, #fff, #b4eeff); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 25px rgba(0, 210, 255, 0.8));
    animation: floatHero 4s ease-in-out infinite;
}

.menu-btn {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
    color: #fff; padding: 18px 45px; font-size: 20px; font-weight: 800;
    border-radius: 16px; margin: 12px; cursor: pointer; transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase; letter-spacing: 2px; min-width: 240px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); position: relative; overflow: hidden;
}
.menu-btn::before {
    content:''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: 0.5s;
}
.menu-btn:hover::before { left: 100%; }
.menu-btn:active { transform: scale(0.96); box-shadow: 0 5px 15px rgba(0,0,0,0.4); }

.menu-btn.primary { 
    background: var(--btn-grad); border: none; 
    box-shadow: 0 10px 40px rgba(0, 114, 255, 0.5); 
}
.menu-btn.secondary { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.2); }
.menu-btn.ad-btn { background: linear-gradient(135deg, #f1c40f, #e67e22); color:#000; border:none; box-shadow: 0 10px 40px rgba(241, 196, 15, 0.4); }

.modal-card {
    background: #14141e; padding: 40px; border-radius: 30px;
    width: 90%; max-width: 480px; border: 1px solid var(--glass-border);
    text-align: center; box-shadow: 0 25px 80px rgba(0,0,0,0.9);
    display: flex; flex-direction: column; align-items: center;
    max-height: 85vh; overflow-y: auto; position: relative;
    backdrop-filter: blur(20px);
}
.modal-h { font-size: 28px; color: var(--gold); font-weight: 900; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 2px; text-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }

.ach-toast {
    position: fixed; top: -100px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #ffd700, #fdb931);
    padding: 15px 30px; border-radius: 50px;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.6);
    z-index: 20000; display: flex; align-items: center;
    transition: top 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #3e2723; font-weight: 800; border: 2px solid #fff; width: 90%; max-width: 400px;
}
.ach-toast.active { top: 30px; }
.ach-icon { font-size: 32px; margin-right: 15px; }

/* LAYOUT */
.game-layout { display: flex; width: 100%; height: 100%; position: relative; z-index: 10; transition: filter 0.3s; }
.game-layout.blur { filter: blur(15px); pointer-events: none; }

.side-panel {
    width: 340px; display: flex; flex-direction: column;
    background: var(--glass-panel); backdrop-filter: blur(30px);
    border-right: 1px solid var(--glass-border); 
    transition: transform 0.4s; z-index: 20; padding-bottom: 20px;
}
.side-panel.right { border-right: none; border-left: 1px solid var(--glass-border); }
.panel-header { 
    padding: 25px; text-align: center; font-weight: 900; font-size: 16px; 
    text-transform: uppercase; letter-spacing: 2px; color: #b4eeff; 
    border-bottom: 1px solid var(--glass-border); 
    text-shadow: 0 0 15px var(--primary-glow);
}
.panel-content { flex: 1; overflow-y: auto; padding: 15px; scrollbar-width: none; }

.center-stage { flex: 1; position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: center; }

.hud {
    width: 80%; margin-top: 30px; position: relative;
    background: rgba(15, 20, 30, 0.8); border-radius: 25px; padding: 15px 30px;
    border: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 8px;
    backdrop-filter: blur(15px); transition: transform 0.1s; z-index: 15;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.hud.pulse { transform: scale(1.03); box-shadow: 0 0 30px rgba(0,210,255,0.4); }

/* CONTROL BUTTONS */
.controls-row {
    display: flex; gap: 20px; margin-top: 15px; z-index: 20;
    align-items: center; justify-content: center; width: 100%;
}

.icon-btn {
    width: 55px; height: 55px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 26px; cursor: pointer; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.3); backdrop-filter: blur(5px); color: #fff; transition: 0.2s;
}
.icon-btn:hover { background: var(--primary); transform: scale(1.1); border-color: #fff; box-shadow: 0 0 20px var(--primary-glow); }

.bonus-btn {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    padding: 0 25px; height: 60px;
    border-radius: 30px; border: 2px solid rgba(255,255,255,0.3);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    cursor: pointer; box-shadow: 0 0 30px rgba(243, 156, 18, 0.5);
    animation: pulseBtn 2s infinite; min-width: 160px;
}
.bonus-btn:active { transform: scale(0.95); }
.bonus-main { font-weight: 900; font-size: 14px; color: #000; text-transform: uppercase; display: flex; align-items: center; gap: 5px; }
.bonus-sub { font-size: 14px; font-weight: 800; color: #2c3e50; margin-top: 2px; }

@keyframes pulseBtn { 0%{transform:scale(1);} 50%{transform:scale(1.05); box-shadow: 0 0 40px rgba(243, 156, 18, 0.8);} 100%{transform:scale(1);} }

.score-val { font-size: 42px; font-weight: 900; background: var(--gold-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6)); }
.rank-track { width: 100%; height: 8px; background: rgba(0,0,0,0.5); border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); }
.rank-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #00d2ff, #0072ff); transition: width 0.3s; box-shadow: 0 0 10px var(--primary-glow); }

.hero-wrapper { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; position: relative; z-index: 5; }

.hero-platform {
    width: 320px; height: 320px; border-radius: 50%; position: relative;
    display: flex; justify-content: center; align-items: center;
    background: radial-gradient(circle, rgba(16, 25, 45, 0.9) 0%, #000 100%);
    border: 4px solid rgba(0, 210, 255, 0.3);
    box-shadow: 
        0 0 50px rgba(0, 210, 255, 0.3),
        0 0 0 15px rgba(255, 255, 255, 0.02),
        inset 0 0 80px rgba(0, 210, 255, 0.2);
    cursor: pointer; overflow: hidden; z-index: 2; animation: floatHero 6s ease-in-out infinite;
    transition: border-color 0.2s;
}
.hero-platform:hover { border-color: rgba(0, 210, 255, 0.6); box-shadow: 0 0 70px rgba(0, 210, 255, 0.5), inset 0 0 80px rgba(0, 210, 255, 0.3); }
.hero-platform::after {
    content: ''; position: absolute; top: -6px; left: -6px; right: -6px; bottom: -6px;
    border-radius: 50%; border: 3px solid transparent;
    border-top: 3px solid var(--gold); border-left: 3px solid var(--primary);
    animation: rotateRing 10s linear infinite; pointer-events: none;
}
.hero-platform.rage-active {
    border-color: var(--rage);
    box-shadow: 0 0 80px var(--rage), inset 0 0 50px var(--rage);
    animation: shake 0.1s infinite;
}
.hero-platform:active { transform: scale(0.97); }
.hero-img { width: 85%; height: 85%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5)); transition: transform 0.1s; }
.hero-label { margin-top: 30px; font-size: 18px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 4px; pointer-events: none; text-shadow: 0 0 15px var(--primary); opacity: 0.9; }

@keyframes floatHero { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-15px)} }
@keyframes rotateRing { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes shake { 0% { transform: translate(1px, 1px); } 100% { transform: translate(-1px, -1px); } }
.shake { animation: shakeAnim 0.1s infinite; }

/* RAGE BAR */
.rage-container {
    position: absolute; left: -60px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 240px; 
    background: rgba(0,0,0,0.6);
    border-radius: 20px; 
    border: 2px solid rgba(255,255,255,0.15); 
    overflow: hidden;
    display: flex; align-items: flex-end;
    box-shadow: 0 0 25px rgba(0,0,0,0.7);
}
.rage-fill { 
    width: 100%; 
    background: linear-gradient(to top, #ff9f43, #ff4757, #ff0000); 
    height: 0%; 
    transition: height 0.1s linear; 
    box-shadow: 0 0 25px #ff4757;
}

/* CARDS */
.card { 
    display: flex; align-items: center; padding: 15px; margin-bottom: 10px; 
    background: var(--card-bg); 
    border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; min-height: 75px; 
    transition: transform 0.2s, background 0.2s;
}
.card:hover { background: rgba(255,255,255,0.08); transform: translateX(5px); border-color: rgba(255,255,255,0.2); }
.card-icon { font-size: 28px; width: 45px; text-align: center; margin-right: 15px; filter: drop-shadow(0 0 5px rgba(255,255,255,0.3)); }
.card-info { flex: 1; }
.card-name { font-size: 13px; font-weight: 800; color: #fff; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.card-sub { font-size: 11px; color: #999; font-weight: 600; }
.btn-buy { 
    background: #252a34; color: #666; border: none; padding: 10px 15px; 
    border-radius: 10px; font-weight: 800; font-size: 12px; min-width: 85px; 
    transition: 0.2s; cursor: default; box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}
.btn-buy.active { 
    background: var(--btn-grad); color: #fff; cursor: pointer; 
    box-shadow: 0 5px 15px rgba(0, 114, 255, 0.3); 
}
.btn-buy.active:active { transform: scale(0.95); }

.firefly { position: absolute; width: 50px; height: 50px; background: radial-gradient(circle, #fff, #ffd700); border-radius: 50%; box-shadow: 0 0 25px #ffd700, 0 0 50px #ff9f43; z-index: 500; cursor: pointer; opacity: 0; pointer-events: none; transition: transform 0.1s; }
.firefly.active { opacity: 1; pointer-events: auto; animation: flyX 6s linear forwards, flyY 1s ease-in-out infinite alternate; }
@keyframes flyX { 0% { left: -60px; } 100% { left: 110%; } }
@keyframes flyY { 0% { margin-top: -30px; } 100% { margin-top: 30px; } }

.float-txt { position: absolute; font-weight: 900; font-size: 28px; background: var(--gold-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; pointer-events: none; z-index: 100; animation: floatUp 0.8s forwards; text-shadow: 0 4px 10px rgba(0,0,0,0.8); }
.float-txt.crit { font-size: 48px; background: linear-gradient(180deg, #fff 0%, #ff4757 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: floatCrit 0.6s forwards; filter: drop-shadow(0 0 15px red); }
.coin-particle { position: absolute; width: 24px; height: 24px; background: radial-gradient(circle, #ffd700, #f39c12); border-radius: 50%; z-index: 150; pointer-events: none; box-shadow: 0 0 10px gold; }
@keyframes floatUp { 0%{opacity:0; transform:translateY(10px);} 20%{opacity:1;} 100%{opacity:0; transform:translateY(-100px);} }
@keyframes floatCrit { 0%{transform:scale(0.5);} 50%{transform:scale(1.2);} 100%{opacity:0; transform:translateY(-80px);} }

.mobile-tabs { display: none; }
@media (max-width: 900px) {
    .game-layout { flex-direction: column; }
    .side-panel { position: absolute; bottom: 70px; left: 0; width: 100%; height: 50%; border-radius: 30px 30px 0 0; transform: translateY(110%); background: #12121a; border:none; box-shadow: 0 -10px 50px rgba(0,0,0,0.8); }
    .side-panel.active-mobile { transform: translateY(0); }
    .mobile-tabs { display: flex; height: 70px; width: 100%; background: #0a0a10; position: absolute; bottom: 0; left: 0; z-index: 50; border-top: 1px solid rgba(255,255,255,0.1); justify-content: space-around; align-items: center; box-shadow: 0 -5px 20px rgba(0,0,0,0.5); }
    .m-tab { font-size: 28px; color: #555; padding: 10px 25px; transition: 0.3s; }
    .m-tab.active { color: var(--primary); transform: translateY(-8px); text-shadow: 0 0 20px var(--primary); }
    .hero-platform { width: 240px; height: 240px; margin-top: 30px; }
    .menu-title { font-size: 36px; }
    .hud { margin-top: 50px; width: 90%; }
    .rage-container { left: -15px; height: 180px; width: 12px; }
    .controls-row { margin-top: 20px; gap: 12px; }
    .icon-btn { width: 50px; height: 50px; font-size: 22px; }
    .bonus-btn { height: 50px; min-width: 150px; }
}