/* Hlavička - Mining Style */
.nav-bar { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #e5e7eb; margin-bottom: 20px; }
.back-btn { text-decoration: none; color: #6b7280; font-size: 0.9rem; font-weight: 600; padding: 5px 10px; border-radius: 6px; }
.logo { font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: 1.2rem; color: #000; }
.logo span { color: #3b82f6; }

.main-counter-area { text-align: center; margin-bottom: 20px; }
.main-counter-area .value { font-size: 3.5rem; font-weight: 800; color: #1a1a1a; line-height: 1; }
.game-display-box { background: #fff; border: 2px solid #e5e7eb; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.game-top-bar { display: flex; justify-content: space-around; background: #f8fafc; padding: 10px; border-bottom: 1px solid #e2e8f0; font-weight: 800; color: #475569; font-size: 0.9rem; }
#game-container { position: relative; width: 100%; height: 400px; background: #f0f9ff; overflow: hidden; }

/* FIX: Mírně zvětšená věž */
.tower { position: absolute; top: 50%; left: 50%; width: 60px; height: 60px; transform: translate(-50%, -50%); z-index: 10; }
.tower-sprite { 
    width: 100%; 
    height: 100%; 
    background-size: contain; 
    background-repeat: no-repeat; 
    background-position: center;
    background-image: url('tower_lvl1.png');
}

/* Health Bary a Enemy */
.health-bar-container { position: absolute; height: 6px; background: #444; border: 1px solid #000; border-radius: 3px; overflow: hidden; }
.health-bar-fill { height: 100%; background: #2ecc71; transition: width 0.1s linear; }
.tower-hp { bottom: -10px; width: 60px; left: 0; }
.enemy-hp { top: -8px; left: 0; width: 32px; }

.enemy { position: absolute; width: 32px; height: 32px; transform: translate(-50%, -50%); z-index: 15; background-size: contain; background-repeat: no-repeat; background-position: center; }

/* Effects */
#range-circle { position: absolute; top: 50%; left: 50%; border: 2px dashed rgba(59, 130, 246, 0.3); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 5; display: block; }
#arcane-aura { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 2px solid rgba(239, 68, 68, 0.3); border-radius: 50%; z-index: 2; pointer-events: none; display: flex; align-items: center; justify-content: center; animation: auraPulse 3s infinite alternate; }
.pentagram-svg { width: 100%; height: 100%; overflow: visible; transform: translateY(2%); }
.pentagram-svg path { vector-effect: non-scaling-stroke; }
#frost-visual { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(96, 165, 250, 0.1); border: 2px solid rgba(96, 165, 250, 0.4); z-index: 1; pointer-events: none; }
.laser-line { position: absolute; height: 3px; background: #a855f7; box-shadow: 0 0 10px #d8b4fe; z-index: 6; pointer-events: none; transform-origin: 0 50%; }

/* Shop / Tabs */
.tabs { display: flex; border-top: 1px solid #e2e8f0; }
.tab { flex: 1; padding: 15px; border: none; background: #f8fafc; cursor: pointer; font-weight: 800; color: #64748b; border-bottom: 2px solid #e2e8f0; }
.tab.active { background: #fff; color: #3b82f6; border-bottom: 2px solid #3b82f6; }
.upgrade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 15px; background: #fff; }
.shop-btn { background: #fff; border: 1px solid #e2e8f0; padding: 12px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; transition: 0.2s; }
.shop-btn.unlocked-grey { background: #f1f5f9 !important; color: #94a3b8 !important; border-color: #e2e8f0 !important; cursor: default; }
.shop-btn.unlocked-grey .btn-title, .shop-btn.unlocked-grey .desc-text { color: #94a3b8 !important; }

.btn-title { font-weight: 800; font-size: 0.85rem; color: #1e293b; margin-bottom: 2px; }
.desc-text { font-size: 0.65rem; color: #64748b; margin-bottom: 6px; text-align: center; }
.next-gain { color: #10b981; font-weight: 700; font-size: 0.75rem; margin-top: 2px; }
.btn-price { color: #3b82f6; font-weight: 800; font-size: 0.85rem; margin: 4px 0; }

.projectile { position: absolute; width: 8px; height: 8px; background: #3b82f6; border-radius: 50%; box-shadow: 0 0 10px #60a5fa; z-index: 20; }
.aoe-blast { position: absolute; border-radius: 50%; background: rgba(59, 130, 246, 0.3); border: 2px solid #3b82f6; transform: translate(-50%, -50%) scale(0); pointer-events: none; z-index: 8; animation: blastAnim 0.4s ease-out forwards; }
@keyframes blastAnim { 0% { transform: translate(-50%, -50%) scale(0); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; } }

.popup { position: absolute; font-weight: 900; pointer-events: none; z-index: 50; font-size: 13px; text-shadow: 1px 1px 0 #000; animation: floatUp 0.6s ease-out forwards; }
@keyframes floatUp { 0% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(-50%, -40px); opacity: 0; } }
@keyframes auraPulse { from { opacity: 0.4; } to { opacity: 0.7; } }

#game-over { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.95); z-index: 100; display: flex; align-items: center; justify-content: center; text-align: center; color: white; }
.overlay-content button { background: #3b82f6; color: white; border: none; padding: 15px 35px; border-radius: 12px; font-weight: 800; cursor: pointer; text-transform: uppercase; }

#wave-announcement { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); font-size: 40px; font-weight: 900; color: #3b82f6; opacity: 0; pointer-events: none; z-index: 80; }
.hidden { display: none !important; }