/* =========================================
   GENEL AYARLAR
   ========================================= */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Merriweather', serif;
}

body {
    background-image: url('https://www.transparenttextures.com/patterns/aged-paper.png'), linear-gradient(to bottom, #1a0b0b, #2e1c11);
    background-blend-mode: overlay;
    background-size: auto, cover;
    background-attachment: fixed;
    /* Resim yüklenmezse diye yedek renk */
    background-color: #2e1c11; 
    color: #f4e4d0;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* Mobil kaydırma sorununu çözen ayar */
    overflow-y: auto; 
    overflow-x: hidden;
}

/* =========================================
   KAPSAYICILAR
   ========================================= */
#menu-screen, #game-screen, #islahat-submenu, #quiz-screen, #siyasi-submenu { /* #siyasi-submenu EKLENDİ */
    width: 100%;
    max-width: 600px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Mobilde üstten başlasın */
    padding: 20px 15px 50px 15px;
    box-sizing: border-box;
    animation: fadeIn 0.5s ease-out;
}

/* =========================================
   METİN VE BAŞLIKLAR
   ========================================= */
h1.main-title {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    text-shadow: 2px 2px 4px #000000;
    margin-bottom: 20px;
    text-align: center;
    font-size: 2rem;
    line-height: 1.2;
}

.subtitle {
    font-family: 'Cinzel', serif;
    color: #a07f52;
    margin-bottom: 25px;
    font-size: 1.1em;
    text-align: center;
    font-weight: bold;
}

.topic-title {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
    text-shadow: 2px 2px 5px black;
}

/* =========================================
   BUTONLAR VE MENÜ
   ========================================= */
.category-grid, .options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
}

.cat-btn {
    background: linear-gradient(135deg, rgba(45, 27, 14, 0.9), rgba(60, 40, 25, 0.95));
    border: 2px solid #a07f52;
    border-radius: 12px;
    padding: 15px;
    color: #f4e4d0;
    font-family: 'Cinzel', serif;
    font-size: 1em;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 80px;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.cat-btn:active { transform: scale(0.98); }
.cat-btn span { font-size: 1.5em; }

/* Özel Butonlar */
.gold-btn {
    background: linear-gradient(135deg, #b8860b, #d4af37) !important;
    color: #2e1c11 !important;
    border-color: #fff !important;
    font-weight: bold;
}
.quiz-mode-btn {
    background: linear-gradient(135deg, #7c0a02, #9e1b1b) !important;
    border-color: #ff6b6b !important;
}

.back-btn {
    align-self: flex-start;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #a07f52;
    color: #a07f52;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.85em;
    margin-bottom: 15px;
}

/* =========================================
   KAVANOZ (STANDART)
   ========================================= */
.jar {
    width: 200px;
    height: 240px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(212, 175, 55, 0.15));
    border: 5px solid #806341;
    border-top: none;
    border-radius: 15px 15px 60px 60px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    margin: 0 auto 30px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.jar::before {
    content: ''; position: absolute; top: -25px; left: 50%; transform: translateX(-50%);
    width: 220px; height: 25px;
    background: #a07f52; border-radius: 5px; border-bottom: 3px solid #5a3e26;
    box-shadow: 0 5px 10px rgba(0,0,0,0.4);
}

/* Kağıt Parçaları - KAVANOZ İÇİNE OTURTULDU */
.paper-scrap {
    width: 50px; 
    height: 50px; 
    background-color: #f4e4d0;
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    position: absolute; 
    opacity: 0.9; 
    border-radius: 3px;
    border: 1px solid #d4af37; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: #7c0a02; 
    font-family: 'Cinzel', serif; 
    font-weight: bold;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3); 
    font-size: 1.2em;
    
    /* YENİ EKLENEN KISIM: Z-INDEX AYARI */
    z-index: 1; /* Kavanozun içinde ama yazının altında kalsın */
}

/* KAVANOZUN İÇİNDEKİ KONUMLARI DÜZELTMEK İÇİN HTML'DEKİ style="" DEĞERLERİNİ CSS İLE EZELİM */
/* 1. Kağıt */
.jar .paper-scrap:nth-child(1) {
    top: 60% !important; /* Yukarıdan %60 aşağı it */
    left: 20% !important;
    transform: rotate(-15deg);
}

/* 2. Kağıt */
.jar .paper-scrap:nth-child(2) {
    top: 70% !important; /* Daha da aşağı */
    left: 45% !important;
    transform: rotate(20deg);
}

/* 3. Kağıt */
.jar .paper-scrap:nth-child(3) {
    top: 55% !important; 
    left: 65% !important;
    transform: rotate(45deg);
}

/* =========================================
   SONUÇ KARTI (GİZLİ BAŞLAR)
   ========================================= */
#result-card {
    display: none; /* ÖNEMLİ: Başlangıçta gizli */
    position: relative;
    width: 95%; max-width: 500px; margin: 0 auto 20px auto;
    background-color: #f0ead6;
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    border: 2px solid #cbbfa3; border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 25px 20px; text-align: center;
    animation: slideDown 0.3s ease-out;
}

/* =========================================
   QUIZ SORU KUTUSU (GÖRÜNÜR BAŞLAR)
   ========================================= */
.question-container {
    display: block; /* ÖNEMLİ: Hep görünür */
    position: relative;
    width: 95%; max-width: 500px; margin: 0 auto 20px auto;
    background-color: #f0ead6;
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    border: 3px double #5d4037; border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 25px 20px; text-align: center;
}

.label {
    font-family: 'Cinzel', serif; font-size: 0.8em; color: #8c7b70;
    text-transform: uppercase; letter-spacing: 1px; font-weight: bold;
    margin-bottom: 15px; display: block; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 5px;
}

#word-text, #quiz-question {
    font-family: 'Merriweather', serif; 
    font-size: 1.3em; font-weight: bold; color: #33221a; 
    line-height: 1.4; margin-bottom: 20px; display: block;
}

.reveal-btn {
    display: block; width: fit-content; margin: 0 auto;
    font-family: 'Cinzel', serif; font-size: 0.9em; font-weight: bold;
    text-transform: uppercase; letter-spacing: 1px;
    color: #5d4037; background: transparent;
    border: 2px solid #8d6e63;
    padding: 12px 35px; border-radius: 50px;
    cursor: pointer;
}

.meaning {
    display: none; font-family: 'Cinzel', serif; font-size: 1.5em;
    font-weight: 700; color: #800000; margin-top: 20px; padding-top: 15px;
    border-top: 1px dashed #cbbfa3; animation: fadeIn 0.4s;
}

button.draw-btn {
    display: block; margin: 0 auto;
    font-family: 'Cinzel', serif; padding: 16px 40px; 
    font-size: 1.3em; font-weight: bold;
    background: linear-gradient(to bottom, #1e3c00, #2e5700); 
    color: #f4e4d0;
    border: 2px solid #d4af37; border-radius: 50px; 
    cursor: pointer; box-shadow: 0 8px 20px rgba(0,0,0,0.6); 
    width: 90%; max-width: 350px;
}
button.draw-btn:active { transform: scale(0.96); }

.counter {
    width: 100%; text-align: center; margin-top: 20px;
    color: #d4af37; font-family: 'Cinzel', serif; font-size: 1em; opacity: 0.9;
}

/* =========================================
   QUIZ MODU ŞIKLAR
   ========================================= */
.quiz-header { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.score-board { color: #ffd700; font-family: 'Cinzel', serif; font-weight: bold; background: rgba(0,0,0,0.5); padding: 5px 15px; border-radius: 10px; }

.quiz-opt-btn {
    background: linear-gradient(to bottom, #3e2723, #281a16);
    color: #f4e4d0; border: 1px solid #8d6e63;
    padding: 15px; border-radius: 8px; cursor: pointer;
    font-family: 'Cinzel', serif; font-size: 0.95em; font-weight: bold;
    min-height: 60px;
}
.quiz-opt-btn.correct { background: #27ae60 !important; border-color: #2ecc71 !important; }
.quiz-opt-btn.wrong { background: #c0392b !important; border-color: #e74c3c !important; opacity: 0.7; }

#quiz-feedback { margin-top: 20px; font-size: 1.5em; font-weight: bold; font-family: 'Cinzel', serif; height: 30px; }

/* =========================================
   ANİMASYONLAR
   ========================================= */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   MOBİL UYUMLULUK (KOMPAKT MOD)
   ========================================= */
@media (max-width: 500px) {
    /* Genel boşlukları kıs */
    #menu-screen, #game-screen, #islahat-submenu, #quiz-screen, #siyasi-submenu {
        padding: 10px 10px 40px 10px;
    }

    /* Başlık boyutları */
    h1.main-title { font-size: 1.5rem; margin-bottom: 15px; }
    .subtitle { font-size: 1rem; margin-bottom: 15px; }
    .topic-title { font-size: 1.3em; margin-bottom: 15px; }

    /* Butonları tek sıraya düşür */
    .category-grid, .options-grid { grid-template-columns: 1fr; gap: 10px; }

    /* Kavanoz Küçültme */
    .jar { width: 140px; height: 180px; margin-bottom: 15px; }
    .jar::before { width: 110%; top: -20px; height: 20px; }
    .paper-scrap { width: 35px; height: 35px; }

    /* Kutu Küçültme */
    #result-card, .question-container { padding: 15px 10px; margin-bottom: 15px; }
    #word-text, #quiz-question { font-size: 1.1em; margin-bottom: 15px; }
    .meaning { font-size: 1.3em; margin-top: 15px; }
    .label { margin-bottom: 10px; }
    
    .reveal-btn { padding: 10px 25px; font-size: 0.85em; }
    button.draw-btn { padding: 12px 30px; font-size: 1.1em; width: 100%; }
    .quiz-opt-btn { padding: 12px; font-size: 0.9em; min-height: 50px; }
}