/* ==========================================================================
   1. GENEL LAYOUT (MASAÜSTÜ & ORTAK)
   ========================================================================== */
body {
    background-color: #020617;
    color: white;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

.milyoner-layout {
    display: grid !important;
    grid-template-columns: 1fr 300px !important;
    gap: 30px !important;
    margin: 30px auto !important;
    align-items: start !important;
    width: 95% !important;
    max-width: 1200px !important;
}

/* SOL TARAF: SORU VE ŞIKLAR */
.quiz-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    width: 100% !important;
}

.question-box {
    background: rgba(15, 23, 42, 0.9) !important;
    border: 3px solid #8b5cf6 !important;
    padding: 40px 20px !important;
    border-radius: 20px !important;
    min-height: 140px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    color: #fff !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.2) !important;
}

.options-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 15px !important;
}

.option-btn {
    background: #1e293b !important;
    border: 2px solid rgba(139, 92, 246, 0.4) !important;
    color: #fff !important;
    padding: 18px 25px !important;
    border-radius: 50px !important;
    text-align: left !important;
    font-size: 1.1rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    position: relative;
    overflow: hidden;
}

.option-btn span {
    color: #f1c40f !important;
    font-weight: 900 !important;
    margin-right: 12px !important;
}

.option-btn:hover {
    background: #334155 !important;
    border-color: #8b5cf6 !important;
}

/* ==========================================================================
   2. DOĞRU / YANLIŞ / BEKLEME EFEKTLERİ (!important)
   ========================================================================== */
.option-btn.waiting {
    background: #f39c12 !important;
    border-color: #fff !important;
    color: white !important;
}

.option-btn.correct-answer, .option-btn.correct {
    background: #10b981 !important;
    border-color: #fff !important;
    color: white !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6) !important;
}

.option-btn.wrong-answer, .option-btn.wrong {
    background: #ef4444 !important;
    border-color: #fff !important;
    color: white !important;
}

/* ==========================================================================
   3. SAĞ TARAF: PARA AĞACI (MASAÜSTÜ)
   ========================================================================== */
.money-tree {
    background: #0f172a !important;
    border: 2px solid rgba(139, 92, 246, 0.2) !important;
    border-radius: 15px !important;
    padding: 15px !important;
    position: sticky;
    top: 20px;
}

.money-tree ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column-reverse !important; /* Büyük ödül üstte */
}

.money-tree li {
    padding: 10px 15px !important;
    margin-bottom: 4px !important;
    color: #94a3b8 !important;
    font-size: 1rem !important;
    display: flex !important;
    justify-content: space-between !important;
    border-radius: 8px !important;
    transition: all 0.3s ease;
}

.money-tree li.active {
    background: #f1c40f !important;
    color: #000 !important;
    font-weight: 800 !important;
    transform: scale(1.05);
}

.money-tree li.safe-point {
    color: #06b6d4 !important;
}

/* ==========================================================================
   4. JOKERLER & MODAL & TOAST
   ========================================================================== */
.jokers-row {
    display: flex !important;
    justify-content: center !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
}

.joker-btn {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    border: 2px solid #06b6d4 !important;
    background: rgba(6, 182, 212, 0.1) !important;
    color: #06b6d4 !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: 0.3s;
}

.joker-btn:disabled { opacity: 0.3; cursor: not-allowed; }

#game-over-modal {
    display: none;
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    background: rgba(0, 0, 0, 0.95) !important;
    z-index: 999999 !important;
    align-items: center; justify-content: center;
}

.game-toast-message {
    position: fixed; top: 20%; left: 50%;
    transform: translate(-50%, -50%);
    background: #06b6d4; color: white;
    padding: 15px 35px; border-radius: 50px;
    z-index: 10000; font-weight: 800;
    border: 2px solid white;
}

main.container {
    padding-top: 20px;
    min-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* BAŞLANGIÇ EKRANI (Selection Screen) DÜZENLEME */
.selection-screen {
    background: rgba(15, 23, 42, 0.9) !important;
    border: 2px solid #8b5cf6 !important;
    border-radius: 20px !important;
    padding: 60px 20px !important;
    margin: 40px auto !important; /* Header'dan uzaklaşması için pay */
    max-width: 600px !important;
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.3) !important;
    animation: slideUp 0.6s ease-out;
}

.selection-screen h1 {
    color: #f1c40f !important;
    font-size: clamp(1.8rem, 5vw, 2.5rem) !important; /* Mobil uyumlu font */
    margin-bottom: 20px !important;
    text-transform: uppercase;
}

.selection-screen p {
    color: #cbd5e1 !important;
    margin-bottom: 40px !important;
    font-size: 1.1rem !important;
    line-height: 1.6;
}

.btn-primary {
    background: #8b5cf6 !important;
    color: white !important;
    border: none !important;
    padding: 15px 50px !important;
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4) !important;
}

.btn-primary:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.6) !important;
    background: #7c3aed !important;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   5. MOBİL DÜZENLEME (768px VE ALTI) - KRİTİK ALAN
   ========================================================================== */
@media (max-width: 768px) {
    /* Ana yerleşimi dikey yap */
    .milyoner-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-top: 5px !important;
    }

    /* Ödül listesini ekranın en üstüne sabitle */
    .money-tree {
        order: -1 !important; 
        width: 100% !important;
        background: rgba(15, 23, 42, 0.9) !important;
        border-bottom: 2px solid #8b5cf6 !important;
        padding: 5px 0 !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        /* Scroll barı gizle */
        scrollbar-width: none; 
    }
    
    .money-tree::-webkit-scrollbar { display: none; }

    .money-tree ul {
        display: flex !important;
        flex-direction: row !important; /* Yatay dizilim */
        padding: 5px 15px !important;
        gap: 8px !important;
        align-items: center !important;
    }

    .money-tree li {
        flex: 0 0 auto !important; /* Büzülmeyi engelle */
        min-width: 90px !important;
        padding: 6px 10px !important;
        background: #1e293b !important;
        border-radius: 30px !important; /* Elips görünümü */
        font-size: 0.75rem !important;
        color: #94a3b8 !important;
        display: flex !important;
        flex-direction: column !important; /* No ve miktarı alt alta al */
        align-items: center !important;
        border: 1px solid rgba(139, 92, 246, 0.3) !important;
    }

    /* Seviye numarasını (üstteki küçük rakam) göster */
    .money-tree li span {
        font-size: 0.6rem !important;
        opacity: 0.7;
        margin-right: 0 !important;
        margin-bottom: 2px;
    }

    /* Aktif olan ödülü parlat */
    .money-tree li.active {
        background: #f1c40f !important;
        color: #000 !important;
        border-color: #fff !important;
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(241, 196, 15, 0.4) !important;
    }

    .money-tree li.safe-point {
        border-color: #06b6d4 !important;
        color: #06b6d4 !important;
    }

    /* Soru ve Şıklar Arasındaki Boşluğu Daralt */
    .question-box {
        padding: 25px 15px !important;
        font-size: 1.1rem !important;
        margin-bottom: 5px !important;
    }
    
    .jokers-row { margin-bottom: 10px !important; }
}