/* ESC duraklatma menüsü */
#pause-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 40;
    text-align: center;
}
#pause-menu > div {
    margin: 10px auto; /* ortala ve dikey boşluk */
    display: block; /* alt alta */
    transition: transform 0.2s ease-in-out;
}
#pause-menu > div:hover {
    transform: scale(1.1);
}
/* Oyun sonu karartma */
.dim-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5); /* %50 karartma */
    z-index: 20; /* oyun içi öğelerin arkasında, tebrik ve maskotun altında */
    display: none;
    pointer-events: none;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    height: 100vh;
}

/* Oyun Sahnesi */
.scene {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Orijinal görsel */
.original-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

/* Aydınlanmış Discord binası */
.discord-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    pointer-events: none;
    z-index: 5;
}

/* Aydınlanmış X binası */
.x-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    pointer-events: none;
    z-index: 5;
}

/* Aydınlanmış Telegram binası */
.telegram-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    pointer-events: none;
    z-index: 5;
}

/* Aydınlanmış Sentient binası */
.sentient-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    pointer-events: none;
    z-index: 5;
}

/* NPC'ler container */
.npcs-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 12;
}

.npc {
    position: absolute;
    max-height: 10vh;
    width: auto;
    pointer-events: none;
}

/* Maskot karakteri için özel stil - 3 kat daha büyük */
.npc[src*="maskot.png"] {
    max-height: 24vh; /* 8vh * 3 = 24vh */
    width: auto;
}

/* Oyun başlığı container */
.game-title-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 15;
    cursor: pointer;
}



.game-title {
    font-size: 96px; /* 72px'den 96px'e büyütüldü */
    color: #FFD700; /* Sarı renk */
    transition: transform 0.2s ease-in-out;
}



.game-title:hover { transform: scale(1.1); }
.game-title:hover {
    transform: scale(1.1);
}

/* Müzik düğmesi */
#music-toggle {
    margin-top: -10px;
    transition: transform 0.2s ease;
}
#music-toggle:hover { transform: scale(1.1); }

/* Efekt toggle */
#sfx-toggle { transition: transform 0.2s ease; }
#sfx-toggle:hover { transform: scale(1.1); }

/* Oyun açıklaması için font ve stil */
@font-face {
    font-family: 'Karma Suture';
    src: url('Karma Suture.otf') format('opentype');
}

.game-description {
    font-family: 'Karma Suture', sans-serif;
    font-size: 18px;
    color: #FFD700;
    text-align: center;
    max-width: 600px;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    white-space: pre-line; /* \n satır sonlarını uygula */
    pointer-events: auto; /* Tıklamayı yakala ve üst elemana geçirme */
    cursor: default;
}

#hint-text {
    font-family: 'Karma Suture', sans-serif;
    font-size: 18px;
    color: #FFD700;
    text-align: center;
    margin-top: 12px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Sol üst bilgi paneli */
.info-panel {
    position: absolute;
    top: 20px;
    left: 350px; /* 250px'den 350px'e sağa alındı */
    color: white;
    font-size: 32px;
    font-weight: bold;
    z-index: 10;
    min-width: 250px;
}

.info-item {
    margin-bottom: 5px;
    display: flex;
    justify-content: flex-start; /* Sola yaslanmış */
    align-items: center;
    gap: 15px; /* Etiket ile sayı arası mesafe */
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item .pixel-text {
    color: #ccc;
    min-width: 120px; /* Etiketler için sabit genişlik */
}

.info-item > div:last-child {
    color: #FFD700; /* Sarı renk */
    font-weight: bold;
}

/* Puan için özel stil - daha büyük */
.info-item:first-child > div:last-child {
    font-size: 40px; /* Daha büyük puan */
}

/* Yüksek skor paneli kullanılmıyor */
.high-scores-panel { display: none !important; }
.high-scores-title { display: none !important; }
.high-scores-list { display: none !important; }

.high-score-item {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.high-score-item:last-child {
    margin-bottom: 0;
}

.high-score-item span:first-child {
    color: #ccc;
}

.high-score-item span:last-child {
    color: #FFD700;
    font-weight: bold;
}

/* Tebrik mesajı */
.congratulations {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    color: #FFD700;
    background: none; /* Siyah arka plan kaldırıldı */
    padding: 30px 40px;
    border-radius: 15px;
    text-align: center;
    z-index: 25;
    display: none;
}

/* Final puan için özel stil */
#final-score {
    font-size: 48px; /* Daha büyük puan */
    color: #FFD700; /* Sarı renk */
    font-weight: bold;
    margin-top: 10px;
}



/* Tekrar Oyna bölümü */
.play-again-section {
    margin-top: 50px;
    text-align: center;
}

#play-again-text {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

#play-again-text:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

#play-again-text:active {
    transform: scale(0.95);
}

/* En Yüksek Skorlar bağlantısı */
#view-high-scores {
    margin-top: 16px;
    cursor: pointer;
}

/* Geri sayım sayacı */
.countdown-timer {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 648px; /* 216px * 3 = 648px */
    color: white;
    background: none; /* Siyah çerçeve kaldırıldı */
    padding: 0; /* Padding kaldırıldı */
    border-radius: 0; /* Border radius kaldırıldı */
    z-index: 15;
}

/* Sağ üst ikonlar kaldırıldı */

/* Oyun sonu maskot animasyonu */
.maskot-anim {
    position: absolute;
    left: 0;
    right: 0;
    top: 40px; /* daha yukarı */
    z-index: 30;
    display: none;
    pointer-events: none; /* tıklamaları engellemez */
    align-items: center; /* aynı hizada olsunlar */
    justify-content: center; /* logo ortada */
}

#maskot-anim-img {
    width: 220px;
    height: auto;
    image-rendering: pixelated;
    position: relative; /* olduğu yerde kalsın */
}

.end-logo {
    height: 220px; /* maskot ile aynı yükseklik */
    width: auto;
    image-rendering: pixelated;
    position: absolute; /* tam ortada sabitlemek için */
    left: 50%;
    top: 0px; /* en yukarı al */
    transform: translateX(-50%);
    z-index: 35;
    pointer-events: none;
}

#maskot-anim-img {
    position: absolute;
    left: calc(50% - 150px); /* logonun solunda */
    bottom: 50px; /* en alttan 50px yukarı */
}

/* Discord binası tıklama alanı */
.discord-click-area {
    position: absolute;
    top: 35%;
    left: 22%; /* 20.2% + 1.8% = 22% (sağa kaydırıldı) */
    width: 8%;
    height: 25%;
    cursor: pointer;
    z-index: 10;
}

/* X binası tıklama alanı */
.x-click-area {
    position: absolute;
    top: 35%;
    left: 38.2%; /* 37% + (8% * 0.15) = 38.2% */
    width: 8%;
    height: 25%;
    cursor: pointer;
    z-index: 10;
}

/* Telegram binası tıklama alanı */
.telegram-click-area {
    position: absolute;
    top: 35%;
    left: 52%;
    width: 8%;
    height: 25%;
    cursor: pointer;
    z-index: 10;
}

/* Sentient binası tıklama alanı */
.sentient-click-area {
    position: absolute;
    top: 40%;
    left: 65%;
    width: 8%;
    height: 25%;
    cursor: pointer;
    z-index: 10;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .discord-click-area {
        top: 30%;
        left: 21%; /* 19.5% + 1.5% = 21% (mobilde de sağa kaydırıldı) */
        width: 10%;
        height: 30%;
    }
    
    .x-click-area {
        top: 30%;
        left: 37%; /* 35.5% + (10% * 0.15) = 37% */
        width: 10%;
        height: 30%;
    }
    
    .telegram-click-area {
        top: 30%;
        left: 50%;
        width: 10%;
        height: 30%;
    }
    
    .sentient-click-area {
        top: 35%;
        left: 63%;
        width: 10%;
        height: 30%;
    }
    
    .game-title {
        font-size: 54px; /* 36px'den 54px'e büyütüldü */
    }
    
    .info-panel {
        top: 15px;
        left: 220px; /* 420px - 200px = 220px */
        font-size: 24px;
        min-width: 200px;
    }
    
    .info-item {
        gap: 10px; /* Mobilde daha az mesafe */
    }
    
    .info-item .pixel-text {
        min-width: 80px; /* Mobilde daha küçük genişlik */
    }
    
    .info-item {
        gap: 10px; /* Mobilde daha az mesafe */
    }
    
    .info-item .pixel-text {
        min-width: 80px; /* Mobilde daha küçük genişlik */
    }
    
    .high-scores-panel {
        font-size: 16px;
        min-width: 200px;
        padding: 15px;
    }
    
    .high-scores-title {
        font-size: 20px;
    }
    
    .congratulations {
        font-size: 24px;
        padding: 20px 25px;
    }
    
    .countdown-timer {
        top: 10px;
        font-size: 486px; /* 162px * 3 = 486px */
        padding: 0;
    }
    
    /* Mobilde maskot da küçük olsun */
    .npc[src*="maskot.png"] {
        max-height: 18vh;
    }
}
