body {
    margin: 0; padding: 0;
    /* YENİ: Derin Uzay / Nebula Arka Planı (Izgara Yerine) */
    background-color: #020005;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 1px, transparent 2px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
        radial-gradient(circle at 10% 20%, rgba(70, 0, 180, 0.25) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(180, 0, 100, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(20, 20, 60, 0.6) 0%, transparent 70%);
    background-size: 550px 550px, 350px 350px, 100% 100%, 100% 100%, 100% 100%;
    background-attachment: fixed;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    overflow: hidden; user-select: none;
    height: 100vh; width: 100vw;
    display: flex; justify-content: center; align-items: center;
}

/* cyber-grid sınıfı kaldırıldı */

/* STANDART BUTONLAR */
.back-link {
    position: absolute; top: 20px; left: 20px;
    color: #888; text-decoration: none; font-family: 'Roboto', sans-serif; font-weight: bold;
    transition: all 0.3s; z-index: 100;
    font-size: 0.8rem; display: flex; align-items: center; gap: 8px;
    background: rgba(0,0,0,0.5); padding: 8px 12px; border-radius: 8px; border: 1px solid #333;
}
.back-link:hover { color: #00f3ff; border-color: #00f3ff; background: #000; box-shadow: 0 0 15px rgba(0, 243, 255, 0.4); }

.top-controls {
    position: absolute; top: 20px; right: 20px; z-index: 100;
    display: flex; gap: 10px;
}

.icon-btn {
    background: rgba(0, 0, 0, 0.6); border: 1px solid #444; color: #fff;
    width: 35px; height: 35px; border-radius: 8px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; backdrop-filter: blur(5px);
}
.icon-btn:hover { background: #222; border-color: #00f3ff; color: #00f3ff; box-shadow: 0 0 10px rgba(0, 243, 255, 0.3); }

/* OYUN ALANI */
.game-container {
    position: relative;
    width: 100%; max-width: 500px; /* Mobil uyumlu dikey form */
    height: 100vh;
    border-left: 3px solid #222;
    border-right: 3px solid #222;
    box-shadow: 0 0 100px rgba(100, 0, 255, 0.1);
    background: rgba(0,0,0,0.3); /* Arkadaki nebula görünsün diye yarı şeffaf */
    overflow: hidden;
}

canvas { display: block; width: 100%; height: 100%; }

/* HUD */
.hud {
    position: absolute; top: 15px; left: 0; width: 100%;
    padding: 0 20px; box-sizing: border-box;
    font-family: 'Press Start 2P'; font-size: 0.7rem; pointer-events: none; z-index: 10;
    display: flex; flex-direction: column; gap: 8px;
}
.hud-top { display: flex; justify-content: space-between; width: 100%; }
.score-box, .coin-box {
    color: #fff; background: rgba(0,0,0,0.8); padding: 10px 15px; border-radius: 8px;
    border: 1px solid #444; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.coin-box { color: #ffd700; border-color: #ffd700; text-shadow: 0 0 5px #ffd700; }

/* CAN BARI */
.health-container { width: 100%; display: flex; justify-content: center; margin-top: 5px; }
.health-wrapper { display: flex; justify-content: space-between; width: 100%; margin-top: 5px; }
.health-box { display: flex; align-items: center; gap: 8px; width: 45%; }
.p1-hp-box { justify-content: flex-start; }
.p2-hp-box { justify-content: flex-end; }
.hp-label { font-size: 0.6rem; font-weight: bold; text-shadow: 0 0 5px currentColor; }
.health-bar-bg {
    flex-grow: 1; height: 8px; background: #222;
    border-radius: 4px; overflow: hidden; border: 1px solid #555;
    box-shadow: inset 0 0 5px rgba(0,0,0,1); max-width: 150px;
}
.health-bar-fill {
    width: 100%; height: 100%; 
    background: linear-gradient(90deg, #00ff88, #00cc66);
    transition: width 0.2s;
}

/* MENÜLER */
.menu-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 15, 0.95);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; z-index: 20;
    backdrop-filter: blur(10px);
}

.game-title {
    font-family: 'Press Start 2P'; font-size: 2.5rem; color: #fff;
    text-shadow: 0 0 20px #a600ff; margin-bottom: 20px; text-align: center;
    line-height: 1.4;
}
.v-tag { font-size: 0.8rem; color: #00f3ff; vertical-align: top; letter-spacing: 3px; }

.menu-stats {
    font-family: 'Press Start 2P'; font-size: 0.8rem; margin-bottom: 30px;
    color: #ffd700; border: 2px solid #ffd700; padding: 12px 25px; border-radius: 30px;
    background: rgba(255, 215, 0, 0.05); box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.btn-group { display: flex; flex-direction: column; gap: 15px; width: 260px; }

button {
    font-family: 'Press Start 2P'; font-size: 0.8rem; padding: 18px;
    border: none; cursor: pointer; border-radius: 8px; text-transform: uppercase;
    letter-spacing: 1px; transition: all 0.2s; position: relative; top: 0;
}
button:hover { transform: translateY(-2px); filter: brightness(1.2); }
button:active { top: 2px; transform: none; }

.btn-primary { 
    background: linear-gradient(135deg, #00c3ff, #0055ff); 
    color: #fff; box-shadow: 0 5px 0 #003399; font-weight: bold;
}
.btn-p1 { 
    background: #111; border: 2px solid #00f3ff; color: #00f3ff; 
    box-shadow: inset 0 0 15px rgba(0,243,255,0.2); 
}
.btn-p2 { 
    background: #111; border: 2px solid #ff0055; color: #ff0055; 
    box-shadow: inset 0 0 15px rgba(255,0,85,0.2); 
}
.btn-text { background: transparent; color: #888; font-size: 0.7rem; padding: 10px; margin-top: 10px;}
.btn-text:hover { color: #fff; }

/* GARAJ KARTI */
.garage-card {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 1px solid #444; padding: 25px; border-radius: 20px; 
    width: 300px; text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    display: flex; flex-direction: column; align-items: center;
}
.garage-card h2 { font-family: 'Press Start 2P'; color: #fff; margin-bottom: 15px; font-size: 1.2rem; }
.garage-card h3 { font-family: 'Roboto'; font-weight: bold; color: #fff; margin: 15px 0; font-size: 1.3rem; letter-spacing: 1px;}

.canvas-holder {
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%; margin: 5px auto;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.garage-controls { display: flex; align-items: center; gap: 15px; width: 100%; margin: 20px 0; }
.nav-btn { background: #222; color: #fff; width: 50px; height: 50px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid #444;}
.action-btn { flex-grow: 1; background: linear-gradient(to bottom, #ffd700, #ffaa00); color: #000; font-weight: bold; box-shadow: 0 4px 0 #996600;}
.action-btn.disabled { background: #333; color: #555; box-shadow: none; cursor: default; top:0;}

.stats-container { width: 100%; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.stat-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.7rem; font-family: 'Press Start 2P'; color: #aaa; }
.stat-bar-bg { width: 60%; height: 8px; background: #222; border-radius: 4px; overflow: hidden; border: 1px solid #444; }
.stat-bar-fill { height: 100%; width: 0%; transition: width 0.3s ease-out; box-shadow: 0 0 10px currentColor; }

/* Mobil */
.mobile-controls {
    display: none; position: absolute; bottom: 30px; width: 100%;
    justify-content: space-between; padding: 0 30px; pointer-events: none; z-index: 50; box-sizing: border-box;
}
.mob-btn {
    width: 80px; height: 80px; background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3); border-radius: 50%;
    color: #fff; font-size: 2rem; pointer-events: auto;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(5px);
}

.blink { animation: blink 1s infinite; color: #ff0055; text-shadow: 0 0 20px red; }
@keyframes blink { 50% { opacity: 0.5; } }

@media (max-width: 768px) {
    .mobile-controls { display: flex; }
    .game-container { border: none; height: 100vh; max-width: 100%; border-radius: 0; box-shadow: none;}
}