/* GENEL AYARLAR */
body {
    margin: 0; padding: 0;
    background-color: #050505;
    /* STANDART NEBULA ARKA PLANI */
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(100, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 210, 255, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, #05000a 0%, #120024 100%);
    background-size: cover;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    overflow: hidden; display: flex; flex-direction: column;
    align-items: center; justify-content: center; height: 100vh;
    user-select: none; touch-action: none;
    position: relative;
    gap: 15px;
}

body.turn-p1 { background-image: radial-gradient(circle at center, #001133 0%, #000 100%); } 
body.turn-p2 { background-image: radial-gradient(circle at center, #330000 0%, #000 100%); }

.particle { position: absolute; background: rgba(255, 255, 255, 0.05); border-radius: 50%; animation: floatParticle 20s linear infinite; z-index: 0; }
@keyframes floatParticle { 0% { transform: translateY(0) translateX(0); opacity: 0; } 50% { opacity: 0.5; } 100% { transform: translateY(-100vh) translateX(50px); opacity: 0; } }

#ui-header { 
    z-index: 20; position: relative; text-align: center; 
    margin-top: 10px; margin-bottom: 5px; 
}
h1 { margin: 0; font-size: 2.2rem; letter-spacing: 2px; color: #f1f1f1; text-shadow: 0 0 15px rgba(0,255,255,0.5); font-family: 'Press Start 2P', cursive; }
.game-desc { color: #aaa; margin-top: 8px; font-size: 0.8rem; letter-spacing: 1px; }

/* STANDART BUTONLAR (GRİ/NEON) */
.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: 201; /* Menü üstünde */
    display: flex; align-items: center; gap: 8px; transition: color 0.3s;
}
.back-link:hover { color: #00ff88; }

.control-panel {
    position: absolute; top: 20px; right: 20px;
    display: flex; gap: 10px; z-index: 201; /* Menü üstünde */
}

.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);
    pointer-events: auto;
}
.icon-btn:hover { 
    background: #223; border-color: #00ff88; color: #00ff88; 
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4); 
}

/* OYUN ALANI */
#game-container {
    position: relative; 
    width: 400px; height: 650px; 
    max-height: 75vh;
    background: linear-gradient(to bottom, #000000 0%, #1a237e 20%, #29b6f6 40%, #81d4fa 60%, #bcaaa4 85%, #5d4037 100%);
    background-size: 100% 1000%; background-position: center bottom;
    border: 6px solid #444; overflow: hidden; border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    cursor: pointer; transition: background-position 1.5s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 10;
}

@media (max-width: 450px) {
    #game-container { width: 95vw; height: 70vh; border-width: 4px; }
    h1 { font-size: 1.5rem; }
}

.block {
    position: absolute; height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.2'/%3E%3C/svg%3E"), linear-gradient(to bottom, rgba(255,255,255,0.3) 0%, transparent 20%, transparent 85%, rgba(0,0,0,0.4) 100%);
    border-top: 2px solid rgba(255,255,255,0.4); border-bottom: 3px solid rgba(0,0,0,0.3); 
    border-left: 1px solid rgba(0,0,0,0.2); border-right: 1px solid rgba(0,0,0,0.2);
    box-sizing: border-box; border-radius: 2px; box-shadow: 0 5px 10px rgba(0,0,0,0.4); 
    z-index: 10; pointer-events: none;
}

.perfect-glow { box-shadow: 0 0 20px #fff !important; z-index: 20; }
.combo-glow { box-shadow: 0 0 25px #00ff88, inset 0 0 10px #fff !important; background-color: #00ff88 !important; }

.cloud { position: absolute; width: 100px; height: 35px; background: rgba(255,255,255,0.7); border-radius: 50px; filter: blur(10px); z-index: 0; opacity: 0; transition: opacity 2s; animation: floatCloud 20s linear infinite; pointer-events: none; }
.star { position: absolute; width: 3px; height: 3px; background: white; border-radius: 50%; opacity: 0; transition: opacity 2s; box-shadow: 0 0 5px white; pointer-events: none; z-index: 0; }
.surprise-item { position: absolute; font-size: 3rem; z-index: 1; opacity: 0.8; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2)); pointer-events: none; }

@keyframes floatCloud { from { transform: translateX(-150px); } to { transform: translateX(450px); } }
@keyframes floatUp { 0% { bottom: -50px; transform: translateX(0); } 100% { bottom: 600px; transform: translateX(50px); } }
@keyframes flyAcross { 0% { left: -100px; transform: rotate(45deg); } 100% { left: 400px; transform: rotate(45deg); } }

/* SKORLAR */
#score-single { 
    font-size: 6rem; font-weight: 700; 
    position: absolute; top: 10%; left: 50%; transform: translateX(-50%); 
    color: #fff; opacity: 0.15; z-index: 0; pointer-events: none; 
    text-shadow: 0 0 20px rgba(255,255,255,0.5); font-family: 'Press Start 2P';
}

.hud { position: absolute; top: 110px; z-index: 30; width: 100%; max-width: 400px; pointer-events: none; }

#score-multi { width: 100%; display: flex; justify-content: space-between; padding: 0 20px; }
.p-panel { background: rgba(0,0,0,0.6); border: 2px solid #555; border-radius: 10px; padding: 5px 15px; text-align: center; color: #aaa; transition: 0.3s; }
.p-panel.active { transform: scale(1.1); color: #fff; box-shadow: 0 0 15px rgba(255,255,255,0.2); }
#p1-panel.active { border-color: #00ccff; background: rgba(0, 100, 255, 0.3); }
#p2-panel.active { border-color: #ff0055; background: rgba(255, 0, 85, 0.3); }

.p-panel .label { display: block; font-size: 0.7rem; font-weight: bold; }
.p-panel .value { font-size: 1.2rem; font-weight: 900; }

/* MENÜLER */
#menu-overlay, #game-over-screen, #pause-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10,10,15,0.95);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 100; backdrop-filter: blur(5px);
}

.menu-btn { 
    margin: 10px; padding: 15px 40px; 
    background: transparent; color: #00eaff; border: 2px solid #00eaff;
    font-family: 'Press Start 2P'; font-size: 0.8rem; cursor: pointer; border-radius: 6px; 
    transition: 0.2s; text-transform: uppercase;
}
.menu-btn:hover { background: #00eaff; color: #000; box-shadow: 0 0 20px #00eaff; transform: translateY(-3px); }

/* REKOR KUTUSU (ORTALANDI) */
.highscore-badge {
    background: rgba(255, 204, 0, 0.1); color: #ffcc00;
    padding: 10px 20px; border-radius: 20px; border: 1px solid #ffcc00;
    
    /* Eşit mesafe için margin ayarı */
    margin-top: 30px; 
    margin-bottom: 40px; 
    
    font-weight: bold; text-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
    font-size: 0.9rem;
}

.tutorial { margin-top: 30px; color: #888; font-size: 0.8rem; text-align: center; max-width: 300px; font-family: 'Roboto'; }