﻿/* ============================================================================
   ÇANAKKALE 1915: SEDDÜLBAHİR SİPER SAVUNMASI - SİNEMATİK ARAYÜZ VE EFEKTLER
   ============================================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #141618;
    font-family: 'Segoe UI', 'Georgia', Tahoma, serif;
    color: #ebe3d2;
}

#game-canvas-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Referans görseldeki sinematik karanlık köşe (Vignette) ve hafif savaş tozu filtresi */
#cinematic-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 54%, rgba(12, 10, 8, 0.58) 100%),
        linear-gradient(180deg, rgba(18, 20, 22, 0.22) 0%, rgba(0, 0, 0, 0) 20%, rgba(16, 13, 10, 0.28) 100%);
}

/* Hasar alındığında ekran kenarlarında beliren kan ve sarsıntı efekti */
#damage-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.22s ease-out;
    background: radial-gradient(circle at 50% 50%, rgba(120, 10, 10, 0) 42%, rgba(135, 12, 8, 0.78) 100%);
}

/* ----------------------------------------------------------------------------
   HUD (OYUN İÇİ GÖSTERGE PANELİ)
   ---------------------------------------------------------------------------- */
#hud-root {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    display: none;
}

/* Üst Taktik Durum Çubuğu (Dalga, Düşman Sayısı, Savunma Hattı) */
.hud-top-bar {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 22px;
    background: rgba(20, 18, 15, 0.78);
    border: 1px solid rgba(194, 166, 117, 0.42);
    border-radius: 4px;
    padding: 9px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.hud-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 135px;
}

.hud-metric-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #b5a689;
    margin-bottom: 2px;
}

.hud-metric-value {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #f2e9d8;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.hud-divider {
    width: 1px;
    background: rgba(194, 166, 117, 0.25);
}

/* Dalga Duyuru Afişi */
#wave-banner {
    position: absolute;
    top: 92px;
    left: 50%;
    transform: translate(-50%, -12px);
    text-align: center;
    background: linear-gradient(90deg, rgba(20,18,15,0) 0%, rgba(28,24,18,0.88) 20%, rgba(28,24,18,0.88) 80%, rgba(20,18,15,0) 100%);
    padding: 12px 48px;
    border-top: 1px solid rgba(206, 174, 114, 0.5);
    border-bottom: 1px solid rgba(206, 174, 114, 0.5);
    opacity: 0;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

#wave-banner-title {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 2.2px;
    color: #e8c782;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

#wave-banner-sub {
    font-size: 13px;
    color: #dcd3c2;
    margin-top: 4px;
}

/* Silah Arkadaşı (Sağdaki Osmanlı Askeri) Alt Yazı Uyarısı */
#comrade-callout {
    position: absolute;
    bottom: 112px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(22, 19, 15, 0.82);
    border-left: 3px solid #d4a853;
    padding: 8px 18px;
    font-size: 14px;
    color: #ede4d3;
    border-radius: 3px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
    opacity: 0;
    transition: opacity 0.35s ease;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

#comrade-callout strong {
    color: #e6be70;
}

/* Sol Alt: Sağlık Göstergesi */
.hud-bottom-left {
    position: absolute;
    bottom: 24px;
    left: 28px;
    background: rgba(20, 18, 15, 0.80);
    border: 1px solid rgba(194, 166, 117, 0.4);
    padding: 12px 18px;
    border-radius: 4px;
    min-width: 240px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
}

.health-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    letter-spacing: 1.2px;
    color: #c8ba9e;
    margin-bottom: 7px;
    font-weight: 600;
}

.health-bar-track {
    width: 100%;
    height: 11px;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

#health-bar-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #8b261d, #d9534f);
    transition: width 0.18s ease-out;
}

.trench-stance-hint {
    margin-top: 7px;
    font-size: 11px;
    color: #9e927b;
}

/* Sağ Alt: Türk Mavzeri (7.65mm Mauser 1903) Mühimmat Göstergesi */
.hud-bottom-right {
    position: absolute;
    bottom: 24px;
    right: 28px;
    background: rgba(20, 18, 15, 0.80);
    border: 1px solid rgba(194, 166, 117, 0.4);
    padding: 12px 20px;
    border-radius: 4px;
    min-width: 230px;
    text-align: right;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
}

.weapon-name-label {
    font-size: 11px;
    letter-spacing: 1.3px;
    color: #c4b496;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.ammo-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

#bullet-icons {
    display: flex;
    gap: 5px;
    align-items: flex-end;
}

.cartridge-icon {
    width: 7px;
    height: 26px;
    border-radius: 3px 3px 1px 1px;
    background: linear-gradient(180deg, #d8dfe6 0%, #d8dfe6 28%, #d4a642 29%, #9e741f 100%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.cartridge-icon.spent {
    opacity: 0.18;
    transform: translateY(4px);
}

#ammo-count .clip-num {
    font-size: 28px;
    font-weight: 800;
    color: #f5ecd9;
}

#ammo-count .reserve-num {
    font-size: 16px;
    color: #aa9d84;
}

#reload-prompt {
    position: absolute;
    top: 56%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(24, 20, 15, 0.85);
    border: 1px solid rgba(224, 182, 102, 0.6);
    padding: 6px 16px;
    font-size: 12px;
    letter-spacing: 1.4px;
    color: #f0ca78;
    border-radius: 3px;
    display: none;
}

/* Nişangah (Crosshair) ve İsabet İmleri (Hitmarker) */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    transition: opacity 0.15s ease;
}

.ch-line {
    position: absolute;
    background: rgba(245, 238, 220, 0.85);
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.9);
}

.ch-top    { width: 2px; height: 6px; left: 11px; top: 0; }
.ch-bottom { width: 2px; height: 6px; left: 11px; bottom: 0; }
.ch-left   { width: 6px; height: 2px; left: 0; top: 11px; }
.ch-right  { width: 6px; height: 2px; right: 0; top: 11px; }
.ch-dot    { width: 2px; height: 2px; left: 11px; top: 11px; border-radius: 50%; }

#hit-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0;
    transition: opacity 0.08s ease;
}

#hit-marker::before,
#hit-marker::after {
    content: '';
    position: absolute;
    background: #ffffff;
}

#hit-marker::before {
    width: 100%;
    height: 2px;
    top: 10px;
    left: 0;
}

#hit-marker::after {
    width: 2px;
    height: 100%;
    left: 10px;
    top: 0;
}

#hit-marker.hit-kill::before,
#hit-marker.hit-kill::after {
    background: #ff9f43;
}

#hit-marker.hit-headshot::before,
#hit-marker.hit-headshot::after {
    background: #ff3b30;
    box-shadow: 0 0 8px #ff3b30;
}

#kill-feed {
    position: absolute;
    top: 43%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: #f3c66f;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95);
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* Duraklatma Menüsü (ESC) ve Ses Ayarları */
.pause-card {
    max-width: 500px;
    padding: 30px 36px;
}

.pause-title {
    font-size: 28px;
    margin-bottom: 6px;
}

.pause-status-note {
    font-size: 13.5px;
    color: #c8bca6;
    margin-bottom: 22px;
}

.pause-menu-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pause-menu-btn {
    width: 100%;
    padding: 13px 24px;
    font-size: 15px;
}

.secondary-btn {
    background: rgba(28, 24, 18, 0.92);
    color: #efe4ce;
    border: 1px solid rgba(209, 175, 110, 0.55);
    padding: 12px 26px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
}

.secondary-btn:hover {
    background: rgba(54, 45, 32, 0.95);
    border-color: #e6c57e;
    transform: translateY(-1px);
}

.danger-outline-btn {
    border-color: rgba(217, 83, 79, 0.55);
    color: #f2b6b4;
}

.danger-outline-btn:hover {
    background: rgba(92, 28, 25, 0.78);
    border-color: #ff6b6b;
    color: #ffffff;
}

.audio-settings-box {
    background: rgba(12, 10, 8, 0.65);
    border: 1px solid rgba(201, 169, 108, 0.32);
    border-radius: 5px;
    padding: 18px 22px;
    text-align: left;
}

.audio-settings-heading {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.8px;
    color: #e8c782;
    margin-bottom: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(201, 169, 108, 0.22);
    padding-bottom: 8px;
}

.audio-setting-row {
    margin-bottom: 14px;
}

.audio-setting-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    color: #e4dac6;
    margin-bottom: 6px;
    font-weight: 600;
}

.audio-setting-value {
    color: #f0ca78;
    font-weight: 800;
    font-size: 13px;
}

.audio-slider {
    width: 100%;
    accent-color: #c89b48;
    height: 6px;
    cursor: pointer;
}

.audio-mute-row {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(201, 169, 108, 0.2);
}

.mute-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #f2e8d5;
    font-weight: 600;
    cursor: pointer;
}

.mute-toggle-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #d9534f;
    cursor: pointer;
}

.audio-settings-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.audio-settings-actions button {
    flex: 1;
    padding: 11px 14px;
    font-size: 13px;
}

/* Sinematik Mermi Kamerası (Bullet Cam Letterbox) */
#bullet-cam-overlay {
    position: fixed;
    inset: 0;
    z-index: 6;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bullet-cam-bar {
    width: 100%;
    height: 68px;
    background: linear-gradient(180deg, rgba(6, 5, 4, 0.94) 0%, rgba(12, 10, 8, 0.85) 100%);
    border-color: rgba(212, 178, 114, 0.45);
    display: flex;
    align-items: center;
    padding: 0 32px;
}

.bullet-cam-top {
    border-bottom: 1px solid rgba(212, 178, 114, 0.45);
    justify-content: space-between;
}

.bullet-cam-bottom {
    border-top: 1px solid rgba(212, 178, 114, 0.45);
    justify-content: flex-end;
}

.bullet-cam-badge {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.4px;
    color: #f0ca78;
    border: 1px solid rgba(240, 202, 120, 0.55);
    padding: 5px 14px;
    background: rgba(34, 27, 17, 0.85);
}

.bullet-cam-info {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #efe5d0;
}

.bullet-cam-skip-hint {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #d8caa8;
    background: rgba(28, 24, 18, 0.85);
    border: 1px solid rgba(201, 169, 108, 0.4);
    padding: 5px 14px;
    border-radius: 3px;
}

/* ----------------------------------------------------------------------------
   BAŞLANGIÇ VE OYUN SONU EKRANLARI
   ---------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(16, 15, 12, 0.45) 0%, rgba(10, 9, 8, 0.82) 100%);
    backdrop-filter: blur(2px);
}

.modal-card {
    max-width: 640px;
    width: 92%;
    background: linear-gradient(180deg, rgba(30, 26, 20, 0.94) 0%, rgba(19, 17, 13, 0.96) 100%);
    border: 1px solid rgba(201, 169, 108, 0.55);
    border-radius: 6px;
    padding: 34px 40px;
    text-align: center;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.85);
}

.historical-badge {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 2.5px;
    color: #d4b272;
    border: 1px solid rgba(212, 178, 114, 0.4);
    padding: 4px 14px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.game-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #f4ecda;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
    margin-bottom: 10px;
}

.game-desc {
    font-size: 14.5px;
    line-height: 1.6;
    color: #cfc4b0;
    margin-bottom: 22px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    text-align: left;
    background: rgba(12, 10, 8, 0.55);
    border: 1px solid rgba(194, 166, 117, 0.22);
    padding: 16px 20px;
    border-radius: 4px;
    margin-bottom: 24px;
}

.ctrl-item {
    font-size: 13px;
    color: #ddd3c0;
}

.ctrl-key {
    display: inline-block;
    background: rgba(209, 175, 110, 0.18);
    border: 1px solid rgba(209, 175, 110, 0.5);
    color: #f0ca78;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 6px;
    font-size: 12px;
}

.primary-btn {
    background: linear-gradient(180deg, #b88a3e 0%, #876021 100%);
    color: #fff8eb;
    border: 1px solid #e6c57e;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    transition: transform 0.12s ease, filter 0.12s ease;
}

.primary-btn:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.end-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.victory-text { color: #e8c36b; }
.defeat-text  { color: #e0534c; }

#end-stats {
    background: rgba(12, 10, 8, 0.55);
    border: 1px solid rgba(194, 166, 117, 0.25);
    padding: 16px 22px;
    border-radius: 4px;
    margin: 20px 0 24px;
    text-align: left;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 14px;
}

.stat-item:last-child {
    border-bottom: none;
}
