@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600;700&family=Rajdhani:wght@500;600;700;800&family=Inter:wght@400;500;700&display=swap');

/* --- Genel Değişkenler & Sıfırlama --- */
:root {
    --primary: #1877f2;
    --primary-glow: rgba(24, 119, 242, 0.6);
    --accent-gold: #ffc107;
    --accent-gold-glow: rgba(255, 193, 7, 0.7);
    --accent-cyan: #00f2fe;
    --accent-cyan-glow: rgba(0, 242, 254, 0.6);
    --danger-red: #ff3366;
    --danger-glow: rgba(255, 51, 102, 0.7);
    --field-green: #10b981;
    --field-green-glow: rgba(16, 185, 129, 0.6);
    --bg-dark: #070d1e;
    --bg-card: rgba(13, 24, 52, 0.85);
    --border-glass: rgba(255, 255, 255, 0.15);
}

.efe-kosu-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px auto;
    font-family: 'Rajdhani', 'Inter', sans-serif;
    color: #ffffff;
    user-select: none;
    -webkit-user-select: none;
}

/* --- Oyun Sahnesi Konteyneri --- */
.game-container-outer {
    position: relative;
    width: 100%;
    height: 640px;
    background: #000000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(24, 119, 242, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.1);
    touch-action: none !important;
}

@media (max-width: 768px) {
    .game-container-outer {
        height: 80vh;
        min-height: 520px;
        border-radius: 12px;
    }
}

#threeCanvasContainer {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    touch-action: none !important;
}

#threeCanvasContainer canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    touch-action: none !important;
}

/* --- Geri Sayım (3-2-1) Overlay --- */
.countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 10, 25, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 25;
    pointer-events: none;
}

.countdown-number {
    font-family: 'Oswald', sans-serif;
    font-size: 110px;
    font-weight: 800;
    color: #ffc107;
    text-shadow: 0 0 40px rgba(255, 193, 7, 0.9), 0 0 80px rgba(24, 119, 242, 0.8);
    transform: scale(0.5);
    animation: countPulse 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite;
    letter-spacing: 2px;
}

@keyframes countPulse {
    0% { transform: scale(0.4); opacity: 0.2; }
    50% { transform: scale(1.15); opacity: 1; filter: brightness(1.3); }
    100% { transform: scale(1); opacity: 0.9; }
}

/* --- Speed Lines & Power Effects Overlay --- */
.screen-fx-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.speed-lines-active {
    opacity: 1;
    background: radial-gradient(circle, transparent 40%, rgba(255, 193, 7, 0.2) 80%, rgba(255, 100, 0, 0.4) 100%);
    box-shadow: inset 0 0 80px rgba(255, 180, 0, 0.8);
    animation: speedPulse 0.4s infinite alternate;
}

.magnet-aura-active {
    opacity: 1;
    box-shadow: inset 0 0 60px rgba(0, 242, 254, 0.7);
    animation: magnetPulse 0.8s infinite alternate;
}

.damage-flash {
    opacity: 1 !important;
    background: radial-gradient(circle, rgba(255, 0, 50, 0.45) 0%, rgba(255, 0, 0, 0.8) 100%) !important;
    box-shadow: inset 0 0 100px rgba(255, 0, 0, 0.9) !important;
}

.multiplier-aura-active {
    opacity: 1;
    box-shadow: inset 0 0 60px rgba(16, 185, 129, 0.7);
}

@keyframes speedPulse {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.02); filter: brightness(1.3); }
}

@keyframes magnetPulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* --- Oyun İçi HUD (Heads Up Display) --- */
.game-hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
    pointer-events: none;
}

.hud-left, .hud-right, .hud-center {
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: auto;
}

.hud-pill {
    background: rgba(7, 13, 30, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: 30px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.hud-pill i {
    font-size: 18px;
}

.hud-stat-title {
    font-size: 12px;
    color: #a0aec0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hud-stat-val {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.hud-score-glow {
    color: var(--accent-gold);
    text-shadow: 0 0 12px var(--accent-gold-glow);
}

.hud-ball-glow {
    color: #00f2fe;
    text-shadow: 0 0 10px var(--accent-cyan-glow);
}

/* Aktif Power-Up Sayaçları */
.powerup-indicators {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 5px;
}

.powerup-bar-item {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 170px;
    position: relative;
    overflow: hidden;
}

.powerup-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 1;
    opacity: 0.35;
    transition: width 0.1s linear;
}

.powerup-bar-item span, .powerup-bar-item i {
    position: relative;
    z-index: 2;
    font-size: 12px;
    font-weight: 700;
}

.pu-magnet .powerup-fill { background: #00f2fe; }
.pu-boots .powerup-fill { background: #ff9900; }
.pu-armband .powerup-fill { background: #10b981; }

.pu-magnet { border-color: #00f2fe; color: #00f2fe; }
.pu-boots { border-color: #ff9900; color: #ff9900; }
.pu-armband { border-color: #10b981; color: #10b981; }

/* HUD Aksiyon Butonları */
.hud-btn {
    background: rgba(13, 24, 52, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.hud-btn:hover {
    background: var(--primary);
    transform: scale(1.08);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Combo Duyurusu */
.combo-badge {
    position: absolute;
    top: 90px;
    right: 25px;
    background: linear-gradient(135deg, #ff007f, #7928ca);
    padding: 6px 14px;
    border-radius: 12px;
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 0, 127, 0.6);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.combo-badge.show {
    transform: scale(1);
}

/* --- Pop-up / Overlay Katmanları --- */
.game-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 10, 25, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    padding: 20px;
    overflow-y: auto;
    transition: opacity 0.3s ease;
}

.game-card-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 620px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(24, 119, 242, 0.3);
    position: relative;
    animation: modalIn 0.35s ease-out;
}

@keyframes modalIn {
    0% { transform: scale(0.9) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.game-title-hero {
    font-family: 'Oswald', sans-serif;
    font-size: 38px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 5px 0;
    background: linear-gradient(135deg, #ffffff 20%, #86e7ff 60%, #1877f2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.game-subtitle {
    font-size: 15px;
    color: #a0aec0;
    margin-bottom: 25px;
    font-weight: 500;
}

/* Karakter Seçici Grid */
.character-select-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.char-grid-title {
    font-size: 14px;
    font-weight: 700;
    color: #86e7ff;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-slider-wrap {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.char-slider-wrap::-webkit-scrollbar {
    height: 5px;
}
.char-slider-wrap::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.char-item-card {
    flex: 0 0 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 10px 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.char-item-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.char-item-card.active {
    border-color: var(--accent-gold);
    background: rgba(255, 193, 7, 0.15);
    box-shadow: 0 0 15px var(--accent-gold-glow);
}

.char-avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin: 0 auto 6px auto;
    display: block;
}

.char-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Kontrol İpuçları Kutusu */
.controls-guide-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 25px;
    font-size: 12px;
}

.ctrl-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ctrl-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: bold;
    color: var(--accent-cyan);
    font-size: 11px;
}

.ctrl-desc {
    color: #cbd5e0;
    font-size: 11px;
}

/* Butonlar */
.btn-efe-primary {
    background: linear-gradient(135deg, #1877f2, #0052cc);
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 14px 40px;
    border-radius: 35px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px var(--primary-glow);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
}

.btn-efe-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 40px rgba(24, 119, 242, 0.8);
    color: #fff;
}

.btn-efe-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-efe-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

/* Oyun Sonu Skor İstatistik Kartı */
.gameover-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0 25px 0;
}

.stat-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 15px;
}

.stat-box-title {
    font-size: 13px;
    color: #a0aec0;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-box-val {
    font-family: 'Oswald', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
}

.stat-box.highlight {
    border-color: var(--accent-gold);
    background: rgba(255, 193, 7, 0.08);
}
.stat-box.highlight .stat-box-val {
    color: var(--accent-gold);
    text-shadow: 0 0 15px var(--accent-gold-glow);
}

/* Mobil Dokunmatik D-Pad / Kontrol Tuşları */
.mobile-controls-panel {
    display: none;
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    padding: 0 20px;
    z-index: 12;
    pointer-events: none;
}

@media (max-width: 768px) {
    .mobile-controls-panel {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.touch-btn-cluster {
    display: flex;
    gap: 15px;
    pointer-events: auto;
}

.touch-btn {
    width: 58px;
    height: 58px;
    background: rgba(7, 13, 30, 0.65);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 15px rgba(0,0,0,0.6);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.touch-btn:active {
    background: var(--primary);
    transform: scale(0.92);
    border-color: #fff;
}

.touch-btn.jump-btn {
    background: rgba(24, 119, 242, 0.6);
    border-color: #86e7ff;
}

.touch-btn.slide-btn {
    background: rgba(255, 51, 102, 0.6);
    border-color: #ff99bb;
}

/* Liderlik Tablosu Kartı & Modal */
.leaderboard-modal-content {
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 5px;
}

.leaderboard-table-wrap {
    width: 100%;
    margin-top: 15px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.leaderboard-table th {
    font-size: 13px;
    color: #a0aec0;
    text-transform: uppercase;
    padding: 8px 12px;
    text-align: left;
    font-weight: 700;
}

.leaderboard-table tr.lb-row {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.leaderboard-table tr.lb-row:hover {
    background: rgba(24, 119, 242, 0.2);
}

.leaderboard-table td {
    padding: 10px 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
}

.leaderboard-table td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.leaderboard-table td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 14px;
}

.rank-1 { background: linear-gradient(135deg, #ffd700, #ffae00); color: #000; box-shadow: 0 0 10px #ffd700; }
.rank-2 { background: linear-gradient(135deg, #e0e0e0, #9e9e9e); color: #000; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #8c4a16); color: #fff; }
.rank-other { background: rgba(255, 255, 255, 0.1); color: #a0aec0; }

/* Ses ve Müzik Seçim Kartı */
.audio-selector-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 15px 0;
}

.audio-selector-box select {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}
