@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap');

/* Root scaling setup for responsive design */
:root {
    --iframe-width: 1000px;
    --iframe-height: 750px;
}

@supports (display-mode: window-controls-overlay) {
    body {
        max-height: 100svh;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Comic Sans MS', Tahoma, Geneva, Verdana, sans-serif;
    transition: none !important;
}

/* Mobil iframe modu için temel CSS değişkenleri */
html[data-mode="iframe"] {
    --header-height: 80px;
    --content-height: calc(100% - var(--header-height));
}

html[data-mode="iframe-mobile"] {
    --header-height: 75px;
    --content-height: calc(100% - var(--header-height));
}

html[data-mode="iframe-small"] {
    --header-height: 70px;
    --content-height: calc(100% - var(--header-height));
}

body {
    background-color: #f5f5f5;
    color: #333;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    max-width: 100%;
}

/* Iframe modu */
html[data-mode="iframe"] body,
html[data-mode="iframe-mobile"] body,
html[data-mode="iframe-small"] body {
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* iframe modunda ekran */
html[data-mode="iframe"] .screen,
html[data-mode="iframe-mobile"] .screen,
html[data-mode="iframe-small"] .screen {
    min-height: 100vh;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* iframe modunda container */
html[data-mode="iframe"] .container,
html[data-mode="iframe-mobile"] .container,
html[data-mode="iframe-small"] .container {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    padding: 10px;
    margin: 0;
    border-radius: 0;
}

/* iframe modunda game container */
html[data-mode="iframe"] .game-container,
html[data-mode="iframe-mobile"] .game-container,
html[data-mode="iframe-small"] .game-container {
    width: 100%;
    height: 100vh;
    padding: 0;
    margin: 0;
}

/* iframe modunda header */
html[data-mode="iframe"] .header,
html[data-mode="iframe-mobile"] .header,
html[data-mode="iframe-small"] .header {
    margin: 3px;
    min-height: var(--header-height);
    height: var(--header-height);
    width: calc(100% - 6px);
    padding: 12px 18px;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

/* Header içindeki elemanları mobil iframe'de küçültme */
html[data-mode="iframe"] .header *,
html[data-mode="iframe-mobile"] .header *,
html[data-mode="iframe-small"] .header * {
    font-size: 95% !important;
    line-height: 1.2;
    margin: 0;
}

/* Saat bilgisini küçültme */
html[data-mode="iframe"] .time-info,
html[data-mode="iframe-mobile"] .time-info,
html[data-mode="iframe-small"] .time-info {
    font-size: 16px !important;
    padding: 2px 4px !important;
    margin-right: 3px !important;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

html[data-mode="iframe"] .time-info i,
html[data-mode="iframe-mobile"] .time-info i,
html[data-mode="iframe-small"] .time-info i {
    font-size: 12px !important;
    margin-right: 2px !important;
}

/* Player ve skor bilgisini kompakt hale getirme */
html[data-mode="iframe"] .player-info,
html[data-mode="iframe"] .score-info,
html[data-mode="iframe-mobile"] .player-info,
html[data-mode="iframe-mobile"] .score-info,
html[data-mode="iframe-small"] .player-info,
html[data-mode="iframe-small"] .score-info {
    padding: 2px 5px !important;
    gap: 3px !important;
    min-width: 0;
}

html[data-mode="iframe"] #player-name,
html[data-mode="iframe"] #score,
html[data-mode="iframe-mobile"] #player-name,
html[data-mode="iframe-mobile"] #score,
html[data-mode="iframe-small"] #player-name,
html[data-mode="iframe-small"] #score {
    font-size: 12px !important;
    padding: 1px 3px !important;
    max-width: 60px;
}

html[data-mode="iframe-small"] #player-name,
html[data-mode="iframe-small"] #score {
    font-size: 10px !important;
    max-width: 50px;
}

/* İl gösterme alanını daha kompakt hale getirme */
html[data-mode="iframe"] #current-province,
html[data-mode="iframe-mobile"] #current-province,
html[data-mode="iframe-small"] #current-province {
    font-size: 18px !important;
    padding: 2px 4px !important;
    min-height: 0;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
}

html[data-mode="iframe-mobile"] #current-province {
    font-size: 16px !important;
    max-width: 100px;
}

html[data-mode="iframe-small"] #current-province {
    font-size: 14px !important;
    max-width: 90px;
}

/* Soru bilgisi ve şehir butonu daha küçük */
html[data-mode="iframe"] .question-info,
html[data-mode="iframe-mobile"] .question-info,
html[data-mode="iframe-small"] .question-info {
    gap: 5px;
    flex-direction: row;
    align-items: center;
    min-width: 0;
}

/* Oyun sonlandırma butonunu küçültme */
html[data-mode="iframe"] #end-game,
html[data-mode="iframe-mobile"] #end-game,
html[data-mode="iframe-small"] #end-game {
    width: 30px !important;
    height: 18px !important;
    font-size: 5px !important; /* Yazı boyutunu küçülttüm */
    padding: 1px !important;
    margin: 0 !important;
    line-height: 1 !important;
}

/* Ses butonunu küçültme */
html[data-mode="iframe"] #sound-toggle-game,
html[data-mode="iframe-mobile"] #sound-toggle-game,
html[data-mode="iframe-small"] #sound-toggle-game {
    width: 22px !important;
    height: 22px !important;
    font-size: 10px !important;
    margin-right: 2px !important;
    padding: 0 !important;
}

/* Çok küçük ekranlarda daha kompakt görünüm */
html[data-mode="iframe-small"] .header * {
    font-size: 80% !important;
}

html[data-mode="iframe-small"] .time-info {
    font-size: 14px !important;
    padding: 1px 3px !important;
}

html[data-mode="iframe-small"] #current-province {
    font-size: 12px !important;
    max-width: 70px;
}

html[data-mode="iframe-small"] #player-name,
html[data-mode="iframe-small"] #score {
    font-size: 10px !important;
    max-width: 50px;
}

/* Header içindeki bölümleri düzenleme */
html[data-mode="iframe"] .header .info,
html[data-mode="iframe-mobile"] .header .info,
html[data-mode="iframe-small"] .header .info {
    gap: 1px;
}

html[data-mode="iframe"] .header .header-right,
html[data-mode="iframe-mobile"] .header .header-right,
html[data-mode="iframe-small"] .header .header-right {
    gap: 2px;
}

/* Orta kısımdaki öğeleri daha esnek hale getirme */
html[data-mode="iframe"] .header .question-info,
html[data-mode="iframe-mobile"] .header .question-info,
html[data-mode="iframe-small"] .header .question-info {
    flex: 0.8;
    min-width: 0;
}

/* En küçük ekranlarda Toggle butonlarını gizleme */
@media (max-width: 400px) {
    html[data-mode="iframe"] .toggle-buttons-container,
    html[data-mode="iframe-mobile"] .toggle-buttons-container {
        display: none;
    }
}

/* iframe modunda içerik */
html[data-mode="iframe"] .game-content,
html[data-mode="iframe-mobile"] .game-content,
html[data-mode="iframe-small"] .game-content {
    height: calc(100% - var(--header-height) - 6px);
    width: calc(100% - 6px);
    margin: 0 3px 3px 3px;
    flex-direction: column; /* Mobil ekranda tek sütun */
}

/* iframe modunda harita */
html[data-mode="iframe"] #map-container,
html[data-mode="iframe-mobile"] #map-container,
html[data-mode="iframe-small"] #map-container {
    width: 100%;
    height: 100%;
    margin: 0;
    flex: 1;
}

/* iframe modunda skor tablosu */
html[data-mode="iframe"] .scoreboard,
html[data-mode="iframe-mobile"] .scoreboard,
html[data-mode="iframe-small"] .scoreboard {
    display: none;
}

/* Mobilde toogle butonlarını gizleme */
html[data-mode="iframe-mobile"] .toggle-buttons-container,
html[data-mode="iframe-small"] .toggle-buttons-container {
    display: none;
}

/* Mobilde metin boyutlarını küçültme */
html[data-mode="iframe-mobile"] .header *,
html[data-mode="iframe-small"] .header * {
    font-size: 90%;
}

html[data-mode="iframe-small"] .header * {
    font-size: 80%;
}

/* Mobilde butonları küçültme */
html[data-mode="iframe-mobile"] #show-city-btn,
html[data-mode="iframe-mobile"] #risk-btn,
html[data-mode="iframe-small"] #show-city-btn,
html[data-mode="iframe-small"] #risk-btn {
    width: 60px !important; /* Genişliği artırdım */
    height: 20px !important; /* Yüksekliği artırdım */
    font-size: 8px !important; /* Font boyutunu artırdım */
    padding: 1px 2px !important;
    margin: 0 !important;
    letter-spacing: 0 !important;
    min-width: 0;
    white-space: nowrap;
    display: flex;
    justify-content: center;
    align-items: center;
}

html[data-mode="iframe-small"] #show-city-btn,
html[data-mode="iframe-small"] #risk-btn {
    width: 50px !important; /* Küçük ekranda da biraz büyük olsun */
    height: 18px !important;
    font-size: 7px !important;
}

/* Küçük mobilde oyuncu ve skor bilgisi */
html[data-mode="iframe-small"] #current-province {
    font-size: 12px;
    max-width: 70px;
}

/* Oyunun iframe modunda haritayı doğru göstermesi */
html[data-mode="iframe"] #map-container svg,
html[data-mode="iframe-mobile"] #map-container svg,
html[data-mode="iframe-small"] #map-container svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

/* Mobil iframe meta tagler için */
@media (max-width: 480px) {
    html[data-mode="iframe"] .header {
        min-height: 70px;
        height: 70px;
    }
    
    html[data-mode="iframe"] .game-content {
        height: calc(100% - 75px);
    }
    
    html[data-mode="iframe"] .toggle-buttons-container {
        display: none;
    }
}

@media (max-width: 360px) {
    html[data-mode="iframe"] .header {
        min-height: 65px;
        height: 65px;
    }
    
    html[data-mode="iframe"] .game-content {
        height: calc(100% - 70px);
    }
    
    html[data-mode="iframe"] #current-province {
        font-size: 14px;
        max-width: 80px;
    }
}

/* Eski iframe CSS stillerini temizleyebilirsiniz veya başka bir dosyada yedekleyebilirsiniz */
/* Aşağıdaki eski iframe CSS stillerini kaldırıyorum, çünkü yeni sistemimizde kullanmıyoruz */
@media all and (display-mode: iframe) {
    /* Bu stil bloğunu siliyorum ve yerine yukarıdaki yeni stilleri kullanıyoruz */
}

/* Mobil cihazlar için ek ayarlamalar */
@media all and (max-width: 480px) and (display-mode: iframe) {
    /* Bu stil bloğunu siliyorum ve yerine yukarıdaki yeni stilleri kullanıyoruz */
}

/* Küçük ekranlı mobil cihazlar için ek ayarlamalar */
@media all and (max-width: 380px) and (display-mode: iframe) {
    /* Bu stil bloğunu siliyorum ve yerine yukarıdaki yeni stilleri kullanıyoruz */
}

/* Mobil iframe özel stilleri */
html.mobile-iframe body {
    /* Bu stil bloğunu siliyorum ve yerine yukarıdaki yeni stilleri kullanıyoruz */
}

/* Küçük ekranlı mobil iframe için ekstra düzenlemeler */
html.mobile-iframe.small-screen .header {
    /* Bu stil bloğunu siliyorum ve yerine yukarıdaki yeni stilleri kullanıyoruz */
}

.container {
    max-width: 460px;
    margin: 0 auto;
    padding: 23px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    position: relative;
}

.container h1 {
    color: #5c97d3;
    margin-bottom: 5px;
    text-align: center;
    font-size: 26px;
    width: 100%;
}

.screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    padding: 10px;
    width: 100%;
    overflow: hidden;
}

.hidden {
    display: none;
}

h1, h2, h3 {
    color: #5c97d3;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
    margin-top: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    text-align: center;
    color: #5c97d3;
}

.form-group input[type="text"] {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 0 auto;
    display: block;
}

.form-group input[type="range"] {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

#time-display {
    display: block;
    margin-top: 5px;
    color: #5c97d3;
    font-weight: bold;
}

#start-game {
    margin-top: 15px;
    width: 100%;
    max-width: 300px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

button {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

button:active {
    transform: scale(0.95);
}

.game-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0 5px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1fd2d5 0%, #30dadd 100%) padding-box,
                linear-gradient(135deg, #1fd2d5 0%, #3ed7da 100%) border-box;
    border: 3px solid transparent;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
    margin-top: 3px;
    position: relative;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
    height: auto;
    min-height: 85px;
}

.header * {
    position: relative;
}

.header .info,
.header .question-info,
.header .header-right {
    display: flex;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

#current-province,
.time-info,
#show-city-btn,
#end-game,
#risk-btn,
.show-names-toggle {
    flex-shrink: 0;
    position: relative;
}

.header .info {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
}

.header .question-info {
    flex: 1;
    text-align: center;
    flex-wrap: nowrap;
}

.header .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
}

.show-names-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.toggle-label {
    color: white;
    font-size: 14px;
    font-weight: 500;
    flex-wrap: nowrap;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-wrap: nowrap;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
    flex-wrap: nowrap;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 1s;
    flex-wrap: nowrap;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 1s;
    flex-wrap: nowrap;
}

input:checked + .slider {
    background-color: #2ecc71;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.info {
    display: flex;
    gap: 25px;
    align-items: center;
    flex-wrap: nowrap;
}

.question-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    flex: 1;
    flex-wrap: nowrap;
}

.question-info h2 {
    color: #fff;
    margin: 0;
    font-size: 22px;
    text-align: center;
    flex-wrap: nowrap;
}

#current-province {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #3498db;
    padding: 6px 10px;
    border-radius: 15px;
    color: white;
    font-weight: 800;
    font-size: 36px;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    margin-bottom: 5px;
}

#current-province i {
    margin-right: 10px;
    font-size: 1.4em;
}

.player-info, .time-info, .score-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 22px;
    color: #fff;
}

.player-info span, .score-info span {
    font-size: 22px;
    font-weight: bold;
}

#player-name, #score {
    font-size: 19px;
    font-weight: bold;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 6px;
}

#end-game {
    width: auto;
    min-width: 90px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-radius: 23px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    margin: 0;
    word-break: break-word;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

#end-game:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.game-content {
    display: flex;
    padding: 0;
    gap: 10px;
    flex-direction: row-reverse;
    justify-content: space-between;
    width: 100%;
    margin-top: 0;
    align-items: flex-start;
    flex: 1;
    overflow: hidden;
}

.scoreboard {
    flex: 0 0 200px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 12px;
    border: 3px solid transparent;
    border-radius: 12px;
    background: linear-gradient(#f9f9f9, #f9f9f9) padding-box,
                linear-gradient(135deg, #1fd2d5 0%, #1a9b9e 100%) border-box;
    box-shadow: 0 0 15px rgba(31, 210, 213, 0.2);
    margin-left: 0;
    margin-top: 5px;
    overflow: hidden;
    height: 100%;
}

#map-container {
    position: relative;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
    background: linear-gradient(#f9f9f9, #f9f9f9) padding-box,
                linear-gradient(135deg, #1fd2d5 0%, #1a9b9e 100%) border-box;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 5px 0 5px 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

#map-container svg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    padding: 0;
}

#map-container:fullscreen {
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    border: none;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#map-container:fullscreen svg {
    width: 90%;
    height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.90);
    object-fit: contain;
    max-width: 90%;
    max-height: 90vh;
}

/* Tam ekran modunda gizlenecek elementler */
#map-container:fullscreen::before,
#map-container:fullscreen #current-province,
#map-container:fullscreen .time-info,
#map-container:fullscreen #show-city-btn,
#map-container:fullscreen #end-game,
#fullscreen-elements,
#fullscreen-elements.hidden,
#fs-current-province,
#fs-time-info,
#fs-show-city-btn,
#fs-end-game {
    display: none;
}

#game-screen:fullscreen {
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

#game-screen:fullscreen .game-container {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

#game-screen:fullscreen .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, #1fd2d5 0%, #30dadd 100%) padding-box,
                linear-gradient(135deg, #1fd2d5 0%, #3ed7da 100%) border-box;
    border: 3px solid transparent;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
    margin-top: 3px;
}

#game-screen:fullscreen .game-content {
    margin-top: 80px;
    height: calc(100% - 80px);
}

#game-screen:fullscreen .scoreboard {
    position: fixed;
    right: 20px;
    top: 80px;
    width: 250px;
    max-height: calc(100% - 100px);
    overflow-y: auto;
}

#game-screen:fullscreen #fullscreen-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#game-screen:fullscreen #map-container {
    height: 100%;
    border: none;
    margin: 0;
    overflow: hidden;
}

#game-screen:fullscreen #map-container svg {
    width: 100%;
    height: 96%;
    display: block;
    margin: auto;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
}

.show-answers-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    width: 100%;
    justify-content: space-between;
}

.toggle-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-left: 10px;
    align-items: flex-end;
}

.toggle-label {
    color: white;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 1s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 1s;
}

input:checked + .slider {
    background-color: #2ecc71;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
}

#game-over.visible {
    display: flex;
}

#game-over .container {
    background-color: white;
    padding: 35px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    max-width: 460px;
    width: auto;
    text-align: center;
}

#play-again {
    margin-top: 20px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

#play-again:hover {
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

#score {
    font-size: 24px;
    font-weight: bold;
    color: #5c97d3;
}

.player-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 3px 0;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.player-score:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.player-score .rank {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 30px;
}

.player-score .rank i {
    font-size: 16px;
}

.player-score .rank .fa-medal.gold {
    color: #FFD700;
}

.player-score .rank .fa-medal.silver {
    color: #C0C0C0;
}

.player-score .rank .fa-medal.bronze {
    color: #CD7F32;
}

.player-score .player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.player-score span.name {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

.player-score span.score {
    color: #2ecc71;
    font-size: 18px;
    font-weight: bold;
    margin-left: auto;
}

#leaderboard {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

/* Skor tablosu kaydırma çubuğu stili */
#leaderboard::-webkit-scrollbar {
    width: 8px;
}

#leaderboard::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#leaderboard::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#leaderboard::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Risk butonu stili */
#risk-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 3px;
    width: 130px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

#risk-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

#risk-btn:hover::before {
    left: 100%;
}

#risk-btn.active {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

#risk-btn:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

#risk-btn.active:hover {
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

#risk-btn:active {
    transform: scale(0.95);
}

/* Ödül popup stili */
.reward-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(39, 174, 96, 0.9);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    z-index: 9999;
    display: none;
    animation: popupAnimation 2s ease-in-out;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

@keyframes popupAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    80% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

#risk-btn-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

#risk-info-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#risk-info-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.risk-info-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 400px;
    display: none;
    animation: popupAnimation 0.3s ease-out;
}

.risk-info-popup h3 {
    color: #e74c3c;
    margin-bottom: 15px;
    text-align: center;
}

.risk-info-popup p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.risk-info-popup ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}

.risk-info-popup li {
    margin-bottom: 5px;
}

.risk-info-popup button {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    width: 100%;
}

.risk-info-popup button:hover {
    opacity: 0.9;
}

@keyframes popupAnimation {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

svg {
    width: 100%;
    height: 100%;
    display: block;
    margin: 0;
    object-fit: contain;
}

.province {
    fill: #99f5fb;
    stroke: #000;
    stroke-width: 0.7;
    transition: all 1s ease;
    cursor: pointer;
}

.province:hover {
    fill: #2980b9;
    stroke: #2980b9;
    stroke-width: 2;
}

.province.selected {
    fill: #f39c12;
    stroke: #e67e22;
    stroke-width: 2;
}

.province.correct {
    fill: #4CAF50 !important;
    stroke: #388E3C !important;
    stroke-width: 2px !important;
    pointer-events: none !important;
}

.province.incorrect {
    animation: wrongAnswer 1s ease forwards;
}

@keyframes wrongAnswer {
    0% {
        fill: #3498db;
        stroke: #2980b9;
    }
    50% {
        fill: #e74c3c;
        stroke: #c0392b;
    }
    100% {
        fill: #3498db;
        stroke: #2980b9;
    }
}

.province.highlight {
    fill: #ffd700 !important;
    stroke: #ffd700 !important;
    stroke-width: 2px !important;
    transition: all 1s ease;
}

.province-label {
    font-size: 10px;
    pointer-events: none;
    text-anchor: middle;
    fill: #333;
    font-weight: bold;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #1fd2d5;
    color: #1fd2d5;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.rank {
    font-weight: bold;
    color: #1fd2d5;
}

.final-score {
    text-align: center;
    margin-bottom: 30px;
}

.final-score h2 {
    font-size: 28px;
}

.top-players {
    margin-bottom: 30px;
}

.top-players h3 {
    text-align: center;
    margin-bottom: 15px;
}

#top-scores {
    list-style-position: inside;
    padding: 0 20px;
}

#top-scores li {
    padding: 8px 0;
    border-bottom: 1px solid #1fd2d5;
    color: #1fd2d5;
}

#top-scores li:last-child {
    border-bottom: none;
}

.time-info {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2ecc71;
    padding: 12px 18px;
    border-radius: 25px;
    color: white;
    margin-right: 15px;
    font-size: 28px;
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.time-info i {
    margin-right: 12px;
    font-size: 1.2em;
}

/* Responsive design media queries for iframe */
@media (max-width: 1200px) {
    :root {
        --scale-factor: 0.95;
    }
}

@media (max-width: 992px) {
    :root {
        --scale-factor: 0.9;
    }
    
    .header {
        flex-wrap: nowrap;
        gap: 5px;
        min-height: 50px;
        padding: 3px 5px;
    }
    
    #current-province {
        font-size: 30px;
        padding: 5px 8px;
    }
    
    .time-info {
        font-size: 28px;
        padding: 6px 10px;
    }
}

@media (max-width: 768px) {
    :root {
        --scale-factor: 0.85;
    }
    
    #map-container {
        height: 450px;
    }
    
    .scoreboard {
        height: 450px;
        flex: 0 0 180px;
    }
    
    .game-content {
        flex-direction: row-reverse;
        gap: 5px;
    }
    
    .info {
        gap: 5px;
    }
}

@media (max-width: 576px) {
    :root {
        --scale-factor: 0.8;
    }
}

/* Özel iframe düzenlemeleri */
@media (max-height: 700px) {
    #map-container {
        height: 98%;
    }
    
    .scoreboard {
        height: 98%;
    }
    
    .header {
        min-height: 50px;
    }
    
    #current-province {
        font-size: 35px;
    }
    
    .time-info {
        font-size: 28px;
    }
}

iframe .container,
iframe .game-container,
iframe .game-content,
iframe .header,
iframe #map-container,
iframe .scoreboard {
    transform-origin: center top;
    transition: none !important;
}

/* Iframe içinde iken özel ayarlar */
@media all and (display-mode: iframe) {
    /* Bu stil bloğunu siliyorum ve yerine yukarıdaki yeni stilleri kullanıyoruz */
}

/* Mobil cihazlar için ek ayarlamalar */
@media all and (max-width: 480px) and (display-mode: iframe) {
    /* Bu stil bloğunu siliyorum ve yerine yukarıdaki yeni stilleri kullanıyoruz */
}

/* Küçük ekranlı mobil cihazlar için ek ayarlamalar */
@media all and (max-width: 380px) and (display-mode: iframe) {
    /* Bu stil bloğunu siliyorum ve yerine yukarıdaki yeni stilleri kullanıyoruz */
}

#show-city-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #000;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 1s ease;
    margin-top: 3px;
    width: auto;
    min-width: 150px;
    height: auto;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

#show-city-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Tarayıcı özel stilleri */
@supports (-webkit-appearance:none) {
    .header {
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(5px);
    }
}

@supports (-moz-appearance:none) {
    .header {
        background-color: rgba(255, 255, 255, 0.98);
    }
}

@supports (-ms-ime-align:auto) {
    .header {
        background-color: rgba(255, 255, 255, 0.98);
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(5px);
    }
}

/* Özel Alert Stilleri */
.custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.alert-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 80%;
    text-align: center;
}

.alert-content p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}

.alert-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.alert-button:hover {
    background-color: #2980b9;
}

/* Tam ekrandan çıkıldığında */
#map-container:not(:fullscreen) .game-container {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    z-index: auto !important;
    margin-top: 0 !important;
    padding: 0 13px !important;
    overflow: hidden !important;
}

#map-container:not(:fullscreen) .header {
    position: relative !important;
    width: 100% !important;
    z-index: auto !important;
    background: linear-gradient(135deg, #1fd2d5 0%, #30dadd 100%) padding-box,
                linear-gradient(135deg, #1fd2d5 0%, #3ed7da 100%) border-box !important;
    border: 3px solid transparent !important;
    border-radius: 10px !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 10px !important;
    margin-top: 5px !important;
    padding: 5px 8px !important;
    min-height: 60px !important;
}

#map-container:not(:fullscreen) .game-content {
    margin-top: 0 !important;
    height: auto !important;
    display: flex !important;
    padding: 0 !important;
    gap: 20px !important;
    flex-direction: row-reverse !important;
    justify-content: space-between !important;
    width: 100% !important;
    overflow: hidden !important;
}

#map-container:not(:fullscreen) .time-info {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    z-index: auto !important;
    background-color: #2ecc71 !important;
    padding: 12px 20px !important;
    border-radius: 25px !important;
    color: white !important;
    margin-right: 15px !important;
    font-size: 42px !important;
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3) !important;
}

#map-container:not(:fullscreen) .time-info i {
    color: white !important;
    font-size: 1.2em !important;
    margin-right: 12px !important;
}

#map-container:not(:fullscreen) .time-info span {
    color: white !important;
    font-weight: bold !important;
}

#map-container:not(:fullscreen) #current-province {
    position: relative !important;
    z-index: auto !important;
    padding: 8px 15px !important;
    border-radius: 15px !important;
    font-size: 48px !important;
    color: white !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    border: none !important;
    background-color: #3498db !important;
    margin-bottom: 5px !important;
}

#map-container:not(:fullscreen) #current-province i {
    font-size: 1.4em !important;
    margin-right: 10px !important;
    display: inline-block !important;
    color: white !important;
}

#map-container:not(:fullscreen) #show-city-btn {
    background-color: #ffd700 !important;
    color: #000 !important;
    border: none !important;
    padding: 6px 10px !important;
}

#map-container:not(:fullscreen) #map-container {
    position: relative !important;
    width: 100% !important;
    height: calc(100vh - 200px) !important;
    border: 3px solid transparent !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    background: linear-gradient(#f9f9f9, #f9f9f9) padding-box,
                linear-gradient(135deg, #1fd2d5 0%, #1a9b9e 100%) border-box !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1) !important;
    margin-top: 10px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

#map-container:not(:fullscreen) #map-container svg {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    margin: auto !important;
    object-fit: cover !important;
    max-width: 100% !important;
    max-height: 100% !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(1.3) !important;
    padding: 0 !important;
}

/* Sayfa kaydırma davranışını düzeltmek için */
html, body {
    overflow-x: hidden !important;
}

.screen {
    overflow: hidden !important;
    position: relative !important;
    height: 100vh !important;
    width: 100% !important;
}

#map-container:fullscreen::before,
#map-container:fullscreen #current-province,
#map-container:fullscreen .time-info,
#map-container:fullscreen #show-city-btn,
#map-container:fullscreen #end-game,
#fullscreen-elements,
#fullscreen-elements.hidden,
#fs-current-province,
#fs-time-info,
#fs-show-city-btn,
#fs-end-game {
    display: none;
}

#game-screen:fullscreen {
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

#game-screen:fullscreen .game-container {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

#game-screen:fullscreen .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, #1fd2d5 0%, #30dadd 100%) padding-box,
                linear-gradient(135deg, #1fd2d5 0%, #3ed7da 100%) border-box;
    border: 3px solid transparent;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
    margin-top: 3px;
}

#game-screen:fullscreen .game-content {
    margin-top: 80px;
    height: calc(100% - 80px);
}

#game-screen:fullscreen #map-container {
    height: 100%;
    border: none;
    margin: 0;
    overflow: hidden;
}

#game-screen:fullscreen .scoreboard {
    position: fixed;
    right: 20px;
    top: 80px;
    width: 250px;
    max-height: calc(100% - 100px);
    overflow-y: auto;
}

#game-screen:fullscreen #fullscreen-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#game-screen:fullscreen #map-container svg {
    width: 100%;
    height: 84%;
    display: block;
    margin: auto;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    position: absolute;
    top: 50%;
    left: 51%;
    transform: translate(-50%, -50%) scale(1);
}

.show-answers-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    width: 100%;
    justify-content: space-between;
}

.toggle-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-left: 10px;
    align-items: flex-end;
}

.toggle-label {
    color: white;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 1s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 1s;
}

input:checked + .slider {
    background-color: #2ecc71;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
}

#game-over.visible {
    display: flex;
}

#game-over .container {
    background-color: white;
    padding: 35px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    max-width: 460px;
    width: auto;
    text-align: center;
}

#play-again {
    margin-top: 20px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

#play-again:hover {
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.heart-container {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.heart {
    position: relative;
    width: 100px;
    height: 90px;
    background-color: #ff4d4d;
    transform: rotate(-45deg);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.5);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.heart:before,
.heart:after {
    content: "";
    position: absolute;
    width: 100px;
    height: 90px;
    background-color: #ff4d4d;
    border-radius: 50%;
}

.heart:before {
    top: -45px;
    left: 0;
}

.heart:after {
    top: 0;
    left: 45px;
}

.heart span {
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Dancing Script', cursive;
    transform: rotate(45deg);
    text-align: center;
    z-index: 1;
    width: 100%;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
    top: -10px;
    left: 20px;
}

@keyframes heartbeat {
    0% {
        transform: rotate(-45deg) scale(1);
    }
    14% {
        transform: rotate(-45deg) scale(1.1);
    }
    28% {
        transform: rotate(-45deg) scale(1);
    }
    42% {
        transform: rotate(-45deg) scale(1.1);
    }
    70% {
        transform: rotate(-45deg) scale(1);
    }
}

#score {
    font-size: 24px;
    font-weight: bold;
    color: #5c97d3;
}

.player-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 3px 0;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.player-score:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.player-score .rank {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 30px;
}

.player-score .rank i {
    font-size: 16px;
}

.player-score .rank .fa-medal.gold {
    color: #FFD700;
}

.player-score .rank .fa-medal.silver {
    color: #C0C0C0;
}

.player-score .rank .fa-medal.bronze {
    color: #CD7F32;
}

.player-score .player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.player-score span.name {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

.player-score span.score {
    color: #2ecc71;
    font-size: 18px;
    font-weight: bold;
    margin-left: auto;
}

#leaderboard {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

/* Skor tablosu kaydırma çubuğu stili */
#leaderboard::-webkit-scrollbar {
    width: 8px;
}

#leaderboard::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#leaderboard::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#leaderboard::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Risk butonu stili */
#risk-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 3px;
    width: 130px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

#risk-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

#risk-btn:hover::before {
    left: 100%;
}

#risk-btn.active {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

#risk-btn:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

#risk-btn.active:hover {
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

#risk-btn:active {
    transform: scale(0.95);
}

/* Ödül popup stili */
.reward-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(39, 174, 96, 0.9);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    z-index: 9999;
    display: none;
    animation: popupAnimation 2s ease-in-out;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

@keyframes popupAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    80% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

#risk-btn-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

#risk-info-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#risk-info-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.risk-info-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 400px;
    display: none;
    animation: popupAnimation 0.3s ease-out;
}

.risk-info-popup h3 {
    color: #e74c3c;
    margin-bottom: 15px;
    text-align: center;
}

.risk-info-popup p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.risk-info-popup ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}

.risk-info-popup li {
    margin-bottom: 5px;
}

.risk-info-popup button {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    width: 100%;
}

.risk-info-popup button:hover {
    opacity: 0.9;
}

@keyframes popupAnimation {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

/* High resolution screens specific adjustments */
@media (min-width: 1800px) {
    #map-container svg {
        width: 90%;
        height: 90%;
        max-width: 1600px;
    }
    
    .container {
        max-width: 520px;
    }
}

/* Specific fix for 1920x1080 resolution */
@media (width: 1920px) and (height: 1080px) {
    #map-container {
        height: 650px;
    }
    
    #map-container svg {
        width: 90%;
        height: 90%;
        transform: translate(-50%, -50%) scale(0.95);
    }
    
    .header {
        width: 100%;
        justify-content: space-between;
    }
    
    .game-content {
        align-items: flex-start;
        justify-content: center;
    }
}

/* Ses düğmesi stilleri */
.sound-toggle-container {
    position: absolute;
    top: 15px;
    left: 15px;
}

.sound-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2980b9, #3498db);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 
                0 0 0 2px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.3s ease;
}

/* Oyun ekranındaki ses düğmesi */
#sound-toggle-game {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin-right: 10px;
}

.sound-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25), 
                0 0 0 2px rgba(255, 255, 255, 0.2) inset;
}

.sound-toggle-btn:active {
    transform: scale(0.95);
}

/* Tam ekran butonu stilleri */
#fullscreen-btn {
    transition: all 0.2s ease;
}

#fullscreen-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 10px rgba(31, 210, 213, 0.5);
    border-color: rgba(31, 210, 213, 0.8);
}

#fullscreen-btn:active {
    transform: scale(0.95);
}

/* Mobil iframe özel stilleri */
html.mobile-iframe body {
    overflow: hidden;
    max-width: 100%;
    max-height: 100%;
    touch-action: manipulation;
}

html.mobile-iframe .header {
    transform: scale(1);
    min-height: 75px;
}

html.mobile-iframe .game-content {
    height: calc(100% - 80px);
}

html.mobile-iframe .scoreboard {
    display: none;
}

html.mobile-iframe #map-container {
    width: 100%;
    height: 100%;
}

html.mobile-iframe #map-container svg {
    transform: translate(-50%, -50%) scale(1);
}

/* Küçük ekranlı mobil iframe için ekstra düzenlemeler */
html.mobile-iframe.small-screen .header {
    transform: scale(0.95);
    min-height: 70px;
}

html.mobile-iframe.small-screen .game-content {
    height: calc(100% - 75px);
}

html.mobile-iframe.small-screen #current-province {
    font-size: 14px;
    max-width: 100px;
}

/* Çok küçük ekranlı mobil iframe için ekstra düzenlemeler */
html.mobile-iframe.very-small-screen .header {
    transform: scale(0.9);
    min-height: 65px;
}

html.mobile-iframe.very-small-screen .game-content {
    height: calc(100% - 70px);
}

html.mobile-iframe.very-small-screen #current-province {
    font-size: 13px;
    max-width: 90px;
}

html.mobile-iframe.very-small-screen .toggle-buttons-container {
    display: none;
}

/* Risk info butonunu küçültme */
html[data-mode="iframe"] #risk-info-btn,
html[data-mode="iframe-mobile"] #risk-info-btn,
html[data-mode="iframe-small"] #risk-info-btn {
    width: 18px !important;
    height: 18px !important;
    font-size: 10px !important;
    min-width: 0;
}

/* Risk butonu container */
html[data-mode="iframe"] #risk-btn-container,
html[data-mode="iframe-mobile"] #risk-btn-container,
html[data-mode="iframe-small"] #risk-btn-container {
    gap: 5px !important;
    display: flex;
    align-items: center;
}

/* Bunu da ekleyerek düğmelerin dışında taşma sorununu çözelim */
html[data-mode="iframe"] button,
html[data-mode="iframe-mobile"] button,
html[data-mode="iframe-small"] button {
    overflow: hidden;
}

/* Oyuncu ve Skor bilgisi alanı flexbox ayarları */
html[data-mode="iframe"] .info,
html[data-mode="iframe-mobile"] .info,
html[data-mode="iframe-small"] .info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex-shrink: 1;
}

/* Oyuncu ve skor bilgisi metinleri */
html[data-mode="iframe"] .player-info span:first-child,
html[data-mode="iframe"] .score-info span:first-child,
html[data-mode="iframe-mobile"] .player-info span:first-child,
html[data-mode="iframe-mobile"] .score-info span:first-child,
html[data-mode="iframe-small"] .player-info span:first-child,
html[data-mode="iframe-small"] .score-info span:first-child {
    font-size: 10px !important;
}

/* Şehri göster butonunu daha küçük yap ve fontunu küçült */
html[data-mode="iframe"] #show-city-btn,
html[data-mode="iframe-mobile"] #show-city-btn,
html[data-mode="iframe-small"] #show-city-btn {
    width: 50px !important;
    height: 18px !important;
    font-size: 7px !important;
    padding: 1px 2px !important;
    margin: 0 !important;
    letter-spacing: 0 !important;
    min-width: 0;
    white-space: nowrap;
}

html[data-mode="iframe-small"] #show-city-btn {
    width: 40px !important;
    height: 16px !important;
    font-size: 6px !important;
}

/* Risk butonunu küçültme */
html[data-mode="iframe"] #risk-btn,
html[data-mode="iframe-mobile"] #risk-btn,
html[data-mode="iframe-small"] #risk-btn {
    width: 60px !important; /* Genişliği artırdım */
    height: 20px !important; /* Yüksekliği artırdım */
    font-size: 8px !important; /* Font boyutunu artırdım */
    padding: 1px 2px !important;
    margin: 0 !important;
    letter-spacing: 0 !important;
    min-width: 0;
    white-space: nowrap;
}

html[data-mode="iframe-small"] #risk-btn {
    width: 50px !important; /* Küçük ekranda da biraz büyük olsun */
    height: 18px !important;
    font-size: 7px !important;
}

/* Doğru yanıtları göster butonunu küçültme */
html[data-mode="iframe"] .toggle-buttons-container,
html[data-mode="iframe-mobile"] .toggle-buttons-container {
    transform: scale(0.7);
    transform-origin: right center;
    margin-right: -5px;
}

html[data-mode="iframe"] .toggle-label,
html[data-mode="iframe-mobile"] .toggle-label {
    font-size: 8px !important;
    white-space: nowrap;
}

html[data-mode="iframe"] .switch,
html[data-mode="iframe-mobile"] .switch {
    width: 30px !important;
    height: 16px !important;
}

html[data-mode="iframe"] .slider:before,
html[data-mode="iframe-mobile"] .slider:before {
    height: 12px !important;
    width: 12px !important;
    left: 2px !important;
    bottom: 2px !important;
}

html[data-mode="iframe"] input:checked + .slider:before,
html[data-mode="iframe-mobile"] input:checked + .slider:before {
    transform: translateX(14px) !important;
}

/* Oyunu bitir butonunu daha da küçültme */
html[data-mode="iframe"] #end-game,
html[data-mode="iframe-mobile"] #end-game,
html[data-mode="iframe-small"] #end-game {
    width: 30px !important;
    height: 18px !important;
    font-size: 5px !important; /* Yazı boyutunu küçülttüm */
    padding: 1px !important;
    margin: 0 !important;
    line-height: 1 !important;
}

/* Mobilde sadece süre, ask province ve şehri göster butonlarını gösterme kuralı */
html[data-mode="iframe-mobile"] .header-right,
html[data-mode="iframe-small"] .header-right {
    display: flex;
    align-items: center;
}

html[data-mode="iframe-mobile"] #end-game,
html[data-mode="iframe-small"] #end-game,
html[data-mode="iframe-mobile"] #risk-btn,
html[data-mode="iframe-small"] #risk-btn,
html[data-mode="iframe-mobile"] #risk-info-btn,
html[data-mode="iframe-small"] #risk-info-btn,
html[data-mode="iframe-mobile"] #sound-toggle-game,
html[data-mode="iframe-small"] #sound-toggle-game,
html[data-mode="iframe-mobile"] #risk-btn-container,
html[data-mode="iframe-small"] #risk-btn-container,
html[data-mode="iframe-mobile"] .toggle-buttons-container,
html[data-mode="iframe-small"] .toggle-buttons-container {
    display: none !important;
}

/* Süre, ask province ve şehri göster butonlarını daha belirgin yapma */
html[data-mode="iframe-mobile"] #current-province,
html[data-mode="iframe-small"] #current-province {
    font-size: 26px !important; /* 28px'den 26px'e düşürdüm (2px azaltma) */
    max-width: 180px !important; /* Daha geniş alan */
    font-weight: bold !important;
}

html[data-mode="iframe-mobile"] #show-city-btn,
html[data-mode="iframe-small"] #show-city-btn {
    width: 65px !important; /* Genişliği küçülttüm */
    height: 20px !important; /* Yüksekliği küçülttüm */
    font-size: 8px !important; /* Yazı boyutunu küçülttüm */
    display: flex !important;
}

html[data-mode="iframe-mobile"] .time-info,
html[data-mode="iframe-small"] .time-info {
    font-size: 20px !important;
    padding: 4px 8px !important;
}

/* Tablet için aynı kurallar (daha geniş ekranlar için) */
@media (min-width: 481px) and (max-width: 768px) {
    html[data-mode="iframe"] #end-game,
    html[data-mode="iframe"] #risk-btn,
    html[data-mode="iframe"] #risk-info-btn,
    html[data-mode="iframe"] #sound-toggle-game,
    html[data-mode="iframe"] #risk-btn-container,
    html[data-mode="iframe"] .toggle-buttons-container {
        display: none !important;
    }
    
    html[data-mode="iframe"] #current-province {
        font-size: 28px !important; /* 30px'den 28px'e düşürdüm (2px azaltma) */
        max-width: 200px !important; /* Daha geniş alan */
        font-weight: bold !important;
    }
    
    html[data-mode="iframe"] .time-info {
        font-size: 22px !important;
    }
    
    html[data-mode="iframe"] #show-city-btn {
        width: 70px !important; /* Genişliği küçülttüm */
        height: 22px !important; /* Yüksekliği küçülttüm */
        font-size: 9px !important; /* Yazı boyutunu küçülttüm */
        display: flex !important;
    }
}