/* ===== Uzay Savaşı (Space Invaders) - Uzay Arcade Estetiği ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --green: #4ade80;
    --green-deep: #16a34a;
    --gold: #ffd23f;
    --cyan: #22d3ee;
    --red: #fb7185;
    --board-bg: #05060f;
    --ink: #03040a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at 50% 0%, #0f1733 0%, transparent 55%),
        linear-gradient(160deg, #0a0e22 0%, #05060f 100%);
    min-height: 100vh; color: #fff; padding: 0 14px 40px; overflow-x: hidden;
}

.game-header {
    position: fixed; top: 0; left: 0; right: 0;
    background: linear-gradient(135deg, #0a0e22 0%, #11183a 100%);
    padding: 15px 20px; display: flex; justify-content: center; align-items: center;
    z-index: 10000; box-shadow: 0 2px 18px rgba(0,0,0,0.5); border-bottom: 2px solid var(--cyan);
}
.header-logo {
    font-size: 1.6rem; color: var(--cyan); letter-spacing: 3px; text-decoration: none; font-weight: 900;
    text-shadow: 0 0 12px #0891b2, 0 0 24px rgba(34,211,238,0.4); transition: transform .3s;
}
.header-logo:hover { transform: scale(1.05); }

.game-container { max-width: 460px; margin: 0 auto; }

.top-panel { display: flex; gap: 12px; margin-bottom: 16px; justify-content: center; }
.stat-box {
    background: rgba(0,0,0,0.4); padding: 12px 22px; border-radius: 14px; text-align: center;
    border: 2px solid rgba(255,255,255,0.12); min-width: 96px;
}
.stat-box.score { border-color: var(--cyan); }
.stat-box.wave { border-color: var(--gold); }
.stat-box.lives { border-color: var(--red); }
.stat-label { font-size: 0.76rem; color: rgba(255,255,255,0.85); margin-bottom: 4px; letter-spacing: 1px; }
.stat-value { font-size: 1.8rem; font-weight: 900; }
.score .stat-value { color: var(--cyan); }
.wave .stat-value { color: var(--gold); }
.lives .stat-value { color: var(--red); }
.stat-value.pop { animation: pop .3s ease; }
@keyframes pop { 0%{transform:scale(1)} 50%{transform:scale(1.3)} 100%{transform:scale(1)} }

.board-wrap { position: relative; margin-bottom: 14px; }
#board {
    width: 100%; height: auto; display: block; background: var(--board-bg);
    border-radius: 14px; border: 3px solid rgba(34,211,238,0.3);
    box-shadow: inset 0 0 40px rgba(0,0,0,0.7), 0 0 20px rgba(34,211,238,0.15);
    touch-action: none;
}

.overlay-layer {
    position: absolute; inset: 0; border-radius: 14px;
    background: rgba(5,6,15,0.92); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center; z-index: 10;
}
.overlay-layer.show { display: flex; animation: fadeIn .3s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.ov-content { text-align: center; padding: 24px; }
.ov-title { font-size: 2rem; font-weight: 900; color: var(--cyan); margin-bottom: 12px; text-shadow: 0 0 14px rgba(34,211,238,0.5); }
.ov-text { font-size: 1rem; margin-bottom: 14px; opacity: 0.92; line-height: 1.5; }
.ov-text span { color: var(--gold); font-weight: 800; }

.btn-primary {
    margin-top: 6px; padding: 14px 36px; border: none; border-radius: 50px; cursor: pointer;
    font-size: 1.1rem; font-weight: 900; color: var(--ink);
    background: linear-gradient(135deg, var(--cyan), #0891b2);
    box-shadow: 0 5px 0 #0e7490; transition: transform .1s; color: #fff;
}
.btn-primary:active { transform: translateY(4px); box-shadow: 0 1px 0 #0e7490; }

/* Mobil dokunmatik kontroller */
.touch-controls { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; }
.tc-btn {
    border-radius: 14px; border: 2px solid rgba(34,211,238,0.4);
    background: rgba(34,211,238,0.1); color: var(--cyan); cursor: pointer;
    font-weight: 800; transition: background .15s, transform .1s; user-select: none;
}
.tc-btn:active { background: rgba(34,211,238,0.3); transform: scale(0.95); }
.tc-btn.left, .tc-btn.right { width: 90px; height: 60px; font-size: 1.6rem; }
.tc-btn.fire { flex: 1; max-width: 160px; height: 60px; font-size: 1.1rem; border-color: rgba(251,113,133,0.5); background: rgba(251,113,133,0.12); color: var(--red); }

.game-controls { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.btn {
    padding: 12px 20px; border: 2px solid rgba(255,255,255,0.22); border-radius: 12px;
    background: rgba(255,255,255,0.07); color: #fff; cursor: pointer; font-size: 0.92rem;
    font-weight: 600; transition: background .2s, transform .12s;
}
.btn:hover { background: rgba(255,255,255,0.16); transform: translateY(-2px); }

.best-score { text-align: center; opacity: 0.85; font-size: 0.92rem; }
.best-score span { color: var(--gold); font-weight: 800; }

.overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(6px);
    display: none; align-items: center; justify-content: center; z-index: 20000; padding: 20px;
}
.overlay.show { display: flex; }
.menu-card {
    background: linear-gradient(160deg, #11183a, #05060f); border: 3px solid var(--cyan);
    border-radius: 22px; padding: 32px 26px; max-width: 440px; width: 100%; text-align: center;
    box-shadow: 0 0 40px rgba(34,211,238,0.25); max-height: 90vh; overflow-y: auto;
}
.menu-card h1 { font-size: 2.2rem; color: var(--cyan); text-shadow: 0 0 14px rgba(34,211,238,0.5); }
.info-block { background: rgba(255,255,255,0.06); border-radius: 12px; padding: 16px; margin: 14px 0; text-align: left; }
.info-block.strategy { background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.3); }
.info-block h3 { color: var(--cyan); margin-bottom: 8px; }
.info-text div { line-height: 1.9; color: rgba(255,255,255,0.92); }

.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 19000; overflow: hidden; }
.confetti { position: absolute; width: 10px; height: 14px; top: -20px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0.2; } }

.seo-content {
    max-width: 800px; margin: 40px auto 0; padding: 30px;
    background: rgba(0,0,0,0.3); border-radius: 15px; line-height: 1.8; border: 1px solid rgba(34,211,238,0.2);
}
.seo-content h2 { color: var(--cyan); margin-bottom: 18px; }
.seo-content h3 { color: var(--gold); margin: 22px 0 12px; }
.seo-content ul { padding-left: 22px; }
.seo-content li { margin-bottom: 6px; }

@media (max-width: 480px) {
    .stat-box { min-width: 84px; padding: 10px 14px; }
    .stat-value { font-size: 1.5rem; }
    .tc-btn.left, .tc-btn.right { width: 72px; height: 56px; }
}
@media (min-width: 720px) {
    .touch-controls { display: none; } /* masaüstünde klavye yeterli */
}
