/* --- PRESS START GLOBAL UI (STANDART) --- */
.back-link {
    position: absolute; top: 20px; left: 20px;
    color: #777; text-decoration: none; font-family: 'Roboto', sans-serif; 
    font-weight: bold; font-size: 0.8rem; z-index: 100;
    display: flex; align-items: center; gap: 8px; transition: color 0.3s;
}
.back-link:hover { color: #00ff88; }

.top-controls {
    position: absolute; top: 20px; right: 20px;
    display: flex; gap: 10px; z-index: 100;
}

.icon-btn {
    background: rgba(20, 20, 40, 0.8); border: 1px solid #334; color: #aaa;
    width: 40px; height: 40px; border-radius: 8px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; font-size: 1rem; backdrop-filter: blur(2px);
}
.icon-btn:hover { 
    background: #223; border-color: #00ff88; color: #00ff88; 
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4); 
}
.blink { animation: blink 1s infinite; color: #ff0055; text-shadow: 0 0 20px red; }
@keyframes blink { 50% { opacity: 0.5; } }
/* --- GLOBAL UI SONU --- */


/* GENEL AYARLAR (Oyunun Kendi Stili) */
* { box-sizing: border-box; user-select: none; -webkit-user-select: none; }

body {
    margin: 0; padding: 0;
    /* ESKİ IZGARA ARKA PLAN KALDIRILDI */
    /* YENİ NEBULA ARKA PLANI */
    background: 
        radial-gradient(circle at 20% 30%, rgba(100, 0, 255, 0.15) 0%, transparent 50%), /* Hafif Mor Nebula */
        radial-gradient(circle at 80% 70%, rgba(0, 210, 255, 0.15) 0%, transparent 50%), /* Hafif Mavi Nebula */
        linear-gradient(135deg, #05000a 0%, #120024 100%); /* Koyu Derin Uzay Temeli */
    background-attachment: fixed; /* Arka plan sabit kalsın */
    
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 100vh; overflow: hidden;
    touch-action: none;
}

#game-container {
    position: relative;
    width: 100%; max-width: 800px;
    display: flex; flex-direction: column; align-items: center;
}

/* HUD (Sadece Skor Kısmı Kaldı) */
.hud {
    display: flex; justify-content: center; align-items: center;
    width: 100%; margin-bottom: 10px; padding: 0 10px;
    z-index: 10;
}

.score-board { display: flex; gap: 20px; align-items: center; }
.score-box { font-size: 1.5rem; text-shadow: 0 0 10px rgba(255,255,255,0.2); }
.p1-color { color: #ff0055; text-shadow: 0 0 15px #ff0055; }
.p2-color { color: #00ccff; text-shadow: 0 0 15px #00ccff; }
.timer { color: #fff; font-size: 1.2rem; background: #111; padding: 5px 10px; border: 1px solid #333; border-radius: 4px; }

/* CANVAS */
canvas {
    /* Canvas arkası biraz daha koyu olsun ki saha net görünsün */
    background: radial-gradient(circle at center, rgba(26, 26, 26, 0.8), rgba(0, 0, 0, 0.9));
    border: 4px solid #333; border-bottom: 4px solid #00ff88;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.1);
    display: block; width: 100%; height: auto; max-height: 60vh;
    backdrop-filter: blur(5px); /* Arka planı hafif bulanıklaştır */
}

/* MENÜLER (OVERLAY & PAUSE) */
#overlay, #pause-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 20; backdrop-filter: blur(5px);
}

#pause-overlay { background: rgba(0,0,0,0.85); z-index: 25; }

h1 { font-size: 1.8rem; color: #00ff88; margin-bottom: 5px; text-shadow: 0 0 10px #00ff88; text-align: center; }
.subtitle { color: #888; font-family: 'Roboto', sans-serif; font-size: 0.8rem; margin-bottom: 30px; letter-spacing: 4px; }

.mode-select, .btn-group { display: flex; gap: 15px; margin-top: 20px; }
button {
    background: transparent; color: #00ff88; border: 2px solid #00ff88;
    padding: 15px 25px; font-family: 'Press Start 2P', cursive; font-size: 0.8rem;
    cursor: pointer; border-radius: 0; transition: 0.2s;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}
button:hover { background: #00ff88; color: #000; box-shadow: 0 0 30px #00ff88; transform: scale(1.05); }

.key { display: inline-block; padding: 2px 6px; background: #333; border: 1px solid #555; border-radius: 3px; color: #fff; font-size: 0.7rem; margin: 0 2px; }

/* MOBİL KONTROLLER */
.mobile-controls {
    display: none; width: 100%; justify-content: space-between;
    padding: 15px 20px; margin-top: 5px;
}
.ctrl-btn {
    width: 65px; height: 65px; border-radius: 50%; border: 2px solid #444;
    background: rgba(255,255,255,0.05); color: #fff; font-size: 1.5rem;
    display: flex; justify-content: center; align-items: center; transition: 0.1s;
    touch-action: manipulation;
}
.ctrl-btn:active { background: rgba(0, 255, 136, 0.2); transform: scale(0.95); border-color: #00ff88; }
.d-pad-horizontal, .action-buttons { display: flex; gap: 20px; }
.jump-btn { border-color: #00ccff; color: #00ccff; }
.shoot-btn { border-color: #ff0055; color: #ff0055; width: 75px; height: 75px; }

@media (max-width: 900px) {
    .mobile-controls { display: flex; }
    .desktop-only { display: none; }
}