/* ================================================== */
/* BAYRAK OYUNU - ANA STİL DOSYASI                    */
/* Avrupa/style.css'den bağımsız, temiz yapı          */
/* ================================================== */

/* ======================== */
/* 1. CSS DEĞİŞKENLERİ      */
/* ======================== */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #00E676;
    --danger: #FF4757;
    --warning: #FFD32A;
    --dark: #434A54;
    --light: #F5F7FA;
    --font: 'DynaPuff', cursive;
    --glass: rgba(255, 255, 255, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font);
    letter-spacing: 0.5px;
}


/* Rainbow harflere ince siyah çerçeve - tüm oyun başlıkları için */
.game-title-line .rainbow-letter {
    -webkit-text-stroke: 1px #000000;
    text-stroke: 1px #000000;
    paint-order: stroke fill;
}

/* ======================== */
/* 2. TEMEL LAYOUT          */
/* ======================== */

/* Grid layout - MASAÜSTÜ İÇİN DÜZENLENMIŞ */
.layout-grid {
    display: grid !important;
    grid-template-columns: 1fr 280px;
    grid-template-rows: auto 1fr auto;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 15px !important;
    gap: 15px !important;
    overflow: hidden !important;
}

/* Side column wrapper gizle */
.side-column-wrapper {
    display: none !important;
}

/* Map area base styles */
.map-area {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-radius: 20px !important;
    margin: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Header */
.top-bar {
    grid-column: 1 / -1;
    /* Tüm genişliği kapla */
    grid-row: 1 / 2;
    margin: 0 !important;
    border-radius: 20px !important;
    min-height: 60px !important;
}

/* Footer */
.bottom-bar {
    grid-column: 1 / -1;
    /* Tüm genişliği kapla */
    grid-row: 3 / 4;
    margin: 0 !important;
    border-radius: 20px !important;
    min-height: 60px !important;
}

/* ======================== */
/* 3. BAYRAK SORU ALANI     */
/* ======================== */
.flag-question-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 20px;
    gap: 25px;
    width: 100%;
    height: 100%;
}

/* Soru konteyneri */
.question-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 3px solid var(--primary);
    position: relative;
}

/* Soru etiketi */
.question-label {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 12px 30px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    display: inline-block;
    text-align: center;
    letter-spacing: 1px;
}

/* Bayrak + Harita wrapper */
.flag-map-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* Ana bayrak konteyneri */
.main-flag-container {
    flex: 2;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ana bayrak görseli */
.main-flag {
    width: 100%;
    max-width: 450px;
    max-height: 300px;
    /* Geniş bayrakların taşmasını önle */
    height: auto;
    object-fit: contain;
    /* En-boy oranını koru */
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border: 4px solid #fff;
    transition: transform 0.3s ease;
}

.main-flag:hover {
    transform: scale(1.02);
}

/* Map Hint removed */

/* Ülke şekli bayrakla */
.country-shape-with-flag {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/3;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

.country-shape-with-flag svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 5px 20px rgba(0, 0, 0, 0.3));
}

.country-shape-with-flag img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* ======================== */
/* 4. QUIZ SEÇENEKLERİ      */
/* ======================== */
.quiz-options-container {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 700px;
    flex-wrap: wrap;
    justify-content: center;
}

.quiz-option-btn {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    padding: 20px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid #cbd5e0;
    border-radius: 18px;
    cursor: pointer;
    background: #f8fafc;
    color: var(--dark);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.quiz-option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.quiz-option-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.quiz-option-btn:hover::before {
    left: 100%;
}

.quiz-option-btn.correct {
    background: linear-gradient(135deg, #00E676, #00C853) !important;
    color: white !important;
    border-color: #00C853 !important;
    animation: correctBounce 0.6s ease;
}

.quiz-option-btn.wrong {
    background: linear-gradient(135deg, #FF4757, #FF3838) !important;
    color: white !important;
    border-color: #FF3838 !important;
    animation: wrongShake 0.5s ease;
}

.quiz-option-btn.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.quiz-option-btn.hint-btn {
    justify-content: center !important;
}

/* ======================== */
/* 5. SIDEBAR STİLLERİ      */
/* ======================== */

/* ===== MASAÜSTÜ: İPUCU SIDEBAR ===== */
#country-info-sidebar {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    height: 100% !important;
    width: 100% !important;
    position: relative !important;
    right: auto !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    z-index: 100;
    perspective: 1000px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: pointer;
    overflow: hidden !important;
}

/* ===== MASAÜSTÜ: MULTIPLAYER SIDEBAR ===== */
#multiplayer-sidebar {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    height: 100% !important;
    width: 100% !important;
    position: relative !important;
    right: auto !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    z-index: 100 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 15px !important;
}

/* Masaüstünde gizleme/gösterme */
body.single-mode #multiplayer-sidebar {
    display: none !important;
}

body.multi-mode #country-info-sidebar {
    display: none !important;
}


.sidebar-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

#country-info-sidebar.flipped .sidebar-flipper {
    transform: rotateY(180deg);
}

.sidebar-front,
.sidebar-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sidebar-front {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 4px solid white;
    color: white;
    transform: rotateY(0deg);
    transition: transform 0.3s;
}

.sidebar-front:hover {
    transform: scale(1.02);
}

.sidebar-front::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: none;
    border-radius: 10px;
    pointer-events: none;
}

.sidebar-back {
    background: rgba(255, 255, 255, 0.96);
    border: 2px solid var(--primary);
    color: #333;
    transform: rotateY(180deg);
    padding: 20px;
    justify-content: flex-start;
}

.sidebar-back .sidebar-title {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
}

.sidebar-back .country-info-content {
    width: 100%;
}

#country-info-sidebar .sidebar-title {
    color: #ffc107;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.country-info-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    width: 100%;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-data {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.info-label {
    font-size: 0.7rem;
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.85rem;
    color: #2d3436;
    font-weight: 700;
    line-height: 1.3;
}

.continent-info {
    border-left-color: var(--primary);
}

.population-info {
    border-left-color: #00b894;
}

.capital-info {
    border-left-color: #e17055;
}

.neighbors-info {
    border-left-color: #0984e3;
}

.hint-cost-label {
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 5px;
    color: #ffd54f;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.sidebar-shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

/* ======================== */
/* 6. PROGRESS & FEEDBACK   */
/* ======================== */
.progress-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.progress-indicator .current {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.progress-indicator .total {
    font-size: 1rem;
    color: #888;
}

.feedback-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: 900;
    z-index: 10000;
    text-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: feedbackPop 0.8s ease forwards;
    pointer-events: none;
}

.feedback-overlay.correct {
    color: var(--success);
}

.feedback-overlay.wrong {
    color: var(--danger);
}

.feedback-overlay.warning {
    color: var(--warning);
}

/* Reward indicator */
.reward-indicator {
    position: absolute;
    top: -15px;
    right: -15px;
    background: linear-gradient(135deg, #FFD93D, #FF6B6B);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 3px 15px rgba(255, 107, 107, 0.4);
    display: none;
}

.reward-indicator.active {
    display: block;
    animation: pulse 1s ease infinite;
}

/* ======================== */
/* 7. REWARD KARTLARI       */
/* ======================== */
.reward-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.r-card {
    background: linear-gradient(145deg, #ffffff, #f0f2f5);
    padding: 18px 12px;
    border-radius: 20px;
    width: 100px;
    cursor: pointer;
    font-size: 0.85rem;
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.r-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.r-card:hover::before {
    left: 100%;
}

.r-card:hover {
    border-color: var(--primary);
    background: linear-gradient(145deg, #ffffff, #e8ecf0);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.25);
}

.r-icon-box {
    width: 55px;
    height: 55px;
    border-radius: 18px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 5px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.r-card[data-reward="block"] .r-icon-box {
    background: linear-gradient(135deg, #ff9a56, #ff6b6b);
}

.r-card[data-reward="slash200"] .r-icon-box {
    background: linear-gradient(135deg, #a855f7, #8b5cf6);
}

.r-card[data-reward="slashAll75"] .r-icon-box {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.r-title {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--dark);
    text-align: center;
}

.r-desc {
    font-size: 0.7rem;
    color: #656D78;
    text-align: center;
    line-height: 1.2;
}

/* ======================== */
/* 8. PLAY BUTTON & LOGIN   */
/* ======================== */
.play-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.play-btn:hover {
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.login-card::before {
    background: #E6E6FA;
}

/* Login Card - Bayrak oyunu için özel ayarlar */
.login-card {
    max-height: 90vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 20px 25px !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}

.login-card::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Opera */
}

/* Setup panel kaydırma desteği */
#setup-panel {
    max-height: none !important;
    overflow: visible !important;
}

.setup-view {
    max-height: none !important;
    overflow: visible !important;
}

/* Scroll inputs - oyuncu listesi için */
.scroll-inputs {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Play butonu taşmasını önle */
.play-btn,
.continue-btn {
    flex-shrink: 0 !important;
    min-height: auto !important;
    white-space: nowrap !important;
    margin-top: 15px !important;
}

/* ======================== */
/* ZORLUK MODU BUTONLARI    */
/* ======================== */
.difficulty-seg,
.difficulty-seg-multi {
    display: flex;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    width: 100%;
    max-width: 280px;
}

.diff-btn,
.diff-btn-multi {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.diff-btn:first-child,
.diff-btn-multi:first-child {
    border-radius: 10px 0 0 10px;
}

.diff-btn:last-child,
.diff-btn-multi:last-child {
    border-radius: 0 10px 10px 0;
}

/* Kolay mod aktif */
.diff-btn.active[data-difficulty="easy"],
.diff-btn-multi.active[data-difficulty="easy"] {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

/* Zor mod aktif */
.diff-btn.active[data-difficulty="hard"],
.diff-btn-multi.active[data-difficulty="hard"] {
    background: linear-gradient(135deg, #e17055, #d63031);
    color: white;
    box-shadow: 0 4px 15px rgba(214, 48, 49, 0.4);
}

.diff-btn:hover:not(.active),
.diff-btn-multi:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

/* Label ve kontrol satırı düzenlemeleri */
.control-row {
    margin-bottom: 8px;
}

.control-row label {
    min-width: 60px;
    font-size: 0.9rem;
}

/* Brand alanı daha kompakt */
.brand-area {
    margin-bottom: 10px !important;
}

.brand-area p {
    margin: 5px 0 !important;
    font-size: 0.85rem !important;
}

/* Title wrapper daha kompakt */
.title-wrapper {
    margin-bottom: 5px;
}

/* Game title küçült */
.game-title-line.large {
    font-size: 1.4rem;
    line-height: 1.2;
}

/* Mode tabs daha kompakt */
.mode-tabs {
    margin-bottom: 12px !important;
}

/* Slider container daha kompakt */
.slider-container {
    padding: 10px 15px !important;
    margin: 8px 0 !important;
}

/* Fun input alanları */
.fun-input {
    padding: 10px 15px !important;
    font-size: 0.95rem !important;
}

/* Segment control daha küçük */
.segment-control {
    margin: 5px 0 !important;
}

.segment-control button {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
}

/* ======================== */
/* 9. ANİMASYONLAR          */
/* ======================== */
@keyframes correctBounce {

    0%,
    100% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.1);
    }

    60% {
        transform: scale(0.95);
    }
}

@keyframes wrongShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-15px) rotate(-2deg);
    }

    40% {
        transform: translateX(15px) rotate(2deg);
    }

    60% {
        transform: translateX(-10px) rotate(-1deg);
    }

    80% {
        transform: translateX(10px) rotate(1deg);
    }
}

@keyframes feedbackPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

@keyframes scoreBump {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
        color: var(--success);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes modalIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.pop-in {
    animation: fadeIn 0.5s ease forwards;
}

.score-bump {
    animation: scoreBump 0.3s ease;
}

/* ======================== */
/* 10. ROTATE OVERLAY       */
/* ======================== */
#rotate-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E0F7FA 0%, #81D4FA 100%);
    z-index: 10000;
    display: none !important;
    /* Her zaman gizli - oyun her yönde oynanabilir */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ======================== */
/* 11. MODALLER             */
/* ======================== */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-box {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 25px;
    padding: 30px;
    max-width: 90%;
    width: 450px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-box h3 {
    color: #2d3436;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.target-box {
    width: 350px;
}

.target-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.target-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.target-btn:hover {
    border-color: var(--primary);
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.gray-btn {
    background: linear-gradient(135deg, #636e72, #4a5568);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.gray-btn:hover {
    background: linear-gradient(135deg, #4a5568, #2d3436);
    transform: translateY(-2px);
}

/* ======================== */
/* 12. INSTAGRAM PROMO      */
/* ======================== */
.instagram-promo-box {
    position: fixed !important;
    left: 20px !important;
    bottom: 20px !important;
    width: 240px !important;
    z-index: 100 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: linear-gradient(135deg, #ff416c, #ff4b2b) !important;
    color: white !important;
    padding: 15px !important;
    border-radius: 15px !important;
    text-decoration: none !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    box-shadow: 0 5px 15px rgba(255, 75, 43, 0.4) !important;
    transition: transform 0.2s !important;
    height: 60px !important;
}

.instagram-promo-box:hover {
    transform: scale(1.03) !important;
}

.instagram-promo-box i {
    font-size: 2rem !important;
}

/* ======================== */
/* 13. YARDIMCI STILLER     */
/* ======================== */
.glass-morphism {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.vibrant-text {
    text-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
    filter: brightness(1.2);
}

.loading {
    pointer-events: none;
    opacity: 0.7;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Flag display shimmer */
.flag-display-area {
    position: relative;
    overflow: hidden;
}

.flag-display-area::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

/* ============================================ */
/* RESPONSIVE: TABLET (768px - 1024px)         */
/* ============================================ */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Removed empty rulesets */

    .quiz-options-container {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
    }

    .quiz-option-btn {
        flex: 0 1 auto !important;
        min-width: 120px !important;
        max-width: 180px !important;
    }
}

/* ============================================ */
/* RESPONSIVE: MOBILE PORTRAIT (<900px, dikey) */
/* Bayrak → Seçenekler → İpucu sıralaması       */
/* ============================================ */
@media (orientation: portrait) and (max-width: 900px) {

    /* Rotate overlay KESİNLİKLE gizli */
    #rotate-screen-overlay {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Screen görünürlük kontrolü - SADECE .active olan ekranlar görünsün */
    .screen {
        display: none !important;
    }

    .screen.active {
        display: flex !important;
    }

    #login-screen.active {
        display: flex !important;
        justify-content: center;
        align-items: center;
    }

    #game-screen {
        filter: none !important;
        pointer-events: auto !important;
        background: transparent !important;
        height: 100dvh !important;
    }

    #game-screen.active {
        display: flex !important;
    }

    body {
        background-attachment: fixed;
        /* fix scroll issues */
        overflow: hidden !important;
        /* Prevent double scroll */
    }

    /* Main layout - Dikey düzen - FLEXBOX DÖNÜŞÜMÜ */
    .layout-grid {
        display: flex !important;
        flex-direction: column !important;
        height: 100dvh !important;
        width: 100vw !important;
        padding: 5px 0 !important;
        gap: 0 !important;
        overflow: hidden !important;
    }

    /* Header - Mobil */
    .top-bar {
        order: 0;
        flex: 0 0 auto !important;
        min-height: 40px !important;
        margin: 5px 10px !important;
        z-index: 80 !important;
        background: rgba(255, 255, 255, 0.9) !important;
    }

    /* Map Area - Mobil */
    .map-area {
        order: 1;
        grid-column: auto !important;
        grid-row: auto !important;
        flex: 1 1 0 !important;
        margin: 0 5px !important;
        padding: 5px !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        background: linear-gradient(135deg, rgba(29, 179, 152, 0.9), rgba(46, 204, 113, 0.85)) !important;
        border-radius: 15px !important;
        min-height: 0 !important;
        max-height: calc(100dvh - 180px) !important;
        overflow: hidden !important;
    }

    /* Flag question area adjustments */
    .flag-question-area {
        justify-content: flex-start !important;
        padding: 5px !important;
        gap: 5px !important;
        height: 100% !important;
        flex: 1 1 0 !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    .question-container {
        padding: 8px !important;
        order: 1;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1) !important;
        gap: 5px !important;
        flex: 0 1 auto !important;
    }

    .question-label {
        font-size: 0.9rem !important;
        padding: 6px 15px !important;
        display: none !important;
    }

    /* Bayrak */
    .main-flag-container {
        max-width: 100% !important;
        min-width: unset !important;
        flex: 1 1 auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .main-flag {
        max-height: 18vh !important;
        width: auto !important;
        max-width: 80% !important;
        border-radius: 10px !important;
    }

    /* Harita ipucu mobilde gizli */
    .country-map-hint {
        display: none !important;
    }

    /* Seçenekler */
    .quiz-options-container {
        order: 2;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        width: 100% !important;
        padding: 0 8px !important;
        margin-top: 0 !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        max-height: 35vh !important;
        overflow-y: auto !important;
    }

    .quiz-option-btn {
        width: 100% !important;
        max-width: none !important;
        min-width: unset !important;
        padding: 8px 8px !important;
        font-size: 0.85rem !important;
        background: #ffffff !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12) !important;
        border: 1px solid #e0e0e0 !important;
        color: #333 !important;
        opacity: 1 !important;
        text-align: center !important;
        justify-content: center !important;
        font-weight: 600 !important;
        min-height: 36px !important;
        border-radius: 10px !important;
        /* Mobilde hover efektini devre dışı bırak - sticky hover sorununu önler */
        transform: none !important;
    }

    /* Mobilde hover efektini kapat - dokunma sonrası yukarı kayma sorununu çözer */
    .quiz-option-btn:hover {
        transform: none !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12) !important;
    }

    /* Correct/Wrong animasyonları için transform izin ver */
    .quiz-option-btn.correct {
        transform: none !important;
        animation: correctBounce 0.6s ease !important;
    }

    .quiz-option-btn.wrong {
        transform: none !important;
        animation: wrongShake 0.5s ease !important;
    }

    /* Sidebars - Mobil */
    /* İPUCU - Önce görünürlük kontrolü */
    #country-info-sidebar {
        grid-column: auto !important;
        grid-row: auto !important;
        order: 3;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: 100% !important;
        height: auto !important;
        max-height: 60px !important;
        margin-top: 5px !important;
        z-index: 50 !important;
        display: block;
        background: transparent !important;
        padding: 0 5px !important;
        flex: 0 0 auto !important;
    }

    /* Body class overrides for display logic */
    body.single-mode #country-info-sidebar {
        display: block !important;
    }

    body.single-mode #multiplayer-sidebar {
        display: none !important;
    }

    body.multi-mode #country-info-sidebar {
        display: none !important;
    }

    body.multi-mode #multiplayer-sidebar {
        display: block !important;
    }

    #country-info-sidebar .sidebar-flipper {
        height: auto !important;
        transform: none !important;
        /* Disable flip on mobile if we show expanded content */
    }

    /* Mobilde ipucunu her zaman açık/flat göster */
    #country-info-sidebar .sidebar-front {
        /* İpucu - Kapalı Hali */
        position: relative !important;
        height: auto !important;
        min-height: 50px !important;
        flex-direction: row !important;
        padding: 5px 10px !important;
        gap: 15px !important;
        background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
        transform: none !important;
        -webkit-backface-visibility: visible !important;
        backface-visibility: visible !important;
    }

    /* Eğer ipucu açıldıysa .flipped class'ı gelir, biz yine de düzgün gösterelim */
    #country-info-sidebar.flipped .sidebar-flipper {
        transform: none !important;
    }

    #country-info-sidebar.flipped .sidebar-back {
        position: relative !important;
        transform: none !important;
        display: flex !important;
        margin-top: 10px !important;
    }

    #country-info-sidebar.flipped .sidebar-front {
        display: none !important;
    }

    #country-info-sidebar .sidebar-back {
        /* Sadece flipped olduğunda görünür */
        display: none;
        position: relative !important;
        height: auto !important;
        transform: none !important;
        padding: 10px !important;
    }

    #country-info-sidebar .sidebar-front i {
        font-size: 1.5rem !important;
        margin: 0 !important;
    }

    #country-info-sidebar .sidebar-front span {
        margin: 0 !important;
        font-size: 1rem !important;
    }

    #country-info-sidebar .hint-cost-label {
        margin: 0 0 0 auto !important;
    }

    /* Diff buttons fix in mobile */
    .difficulty-seg,
    .segment-control.difficulty-seg,
    .difficulty-seg-multi {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-top: 10px !important;
        background: #f0f0f0 !important;
    }

    .diff-btn,
    .diff-btn-multi {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px !important;
        opacity: 1 !important;
        visibility: visible !important;
        font-size: 0.9rem !important;
    }

    /* Multiplayer Sidebar */
    #multiplayer-sidebar {
        grid-column: auto !important;
        grid-row: auto !important;
        order: 3;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 50px !important;
        max-height: 70px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 3px !important;
        z-index: 50 !important;
        flex-shrink: 0 !important;
    }

    #multiplayer-sidebar .players-list {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
        width: 100% !important;
    }

    #multiplayer-sidebar .p-card {
        min-width: 65px !important;
        max-width: 80px !important;
        flex: 0 0 auto !important;
        padding: 4px 6px !important;
        font-size: 0.75rem !important;
    }

    #multiplayer-sidebar .p-card .p-name {
        font-size: 0.7rem !important;
    }

    #multiplayer-sidebar .p-card .p-score {
        font-size: 0.75rem !important;
    }

    #multiplayer-sidebar .sidebar-title {
        display: none !important;
    }

    /* Footer - Mobil */
    .bottom-bar {
        order: 4;
        flex: 0 0 auto !important;
        min-height: 40px !important;
        margin: 0 5px 5px 5px !important;
        background: rgba(255, 255, 255, 0.9) !important;
    }

    .instagram-promo-box {
        display: none !important;
    }
}

/* ============================================ */
/* RESPONSIVE: MOBILE LANDSCAPE (<900px, yatay)*/
/* ============================================ */
@media (max-height: 600px) and (orientation: landscape) {

    .layout-grid {
        display: flex !important;
        flex-direction: row !important;
        padding: 0 !important;
        gap: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        overflow: hidden !important;
    }

    #game-screen {
        background: transparent !important;
    }

    .top-bar {
        position: absolute;
        top: 3px !important;
        /* 3px separation */
        left: 3px !important;
        /* 3px separation */
        width: calc(100% - 6px) !important;
        /* 3px separation from right */
        height: auto !important;
        /* Allow growing to fit content */
        min-height: 40px !important;
        padding: 1px 10px !important;
        z-index: 90;
        background: rgba(255, 255, 255, 0.8) !important;
        /* Semi-transparent background */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        pointer-events: none;
        display: flex !important;
        align-items: center !important;
        border-radius: 10px !important;
        /* Rounded corners for floating look */
    }

    .top-bar * {
        pointer-events: auto;
    }

    .header-content {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .bottom-bar {
        display: none !important;
    }

    .map-area {
        flex: 1 !important;
        height: 100% !important;
        /* Start 50px down roughly matching header height, but let's be safe */
        padding: 50px 5px 5px 5px !important;
        margin-top: 3px !important;
        /* Explicit 3px separation from "header line" if relative */
        margin-right: 0 !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
    }

    /* Adjusted Sidebar Logic */
    /* Multiplayer sidebar stays on right */
    /* Multiplayer Sidebar */
    /* Only show active player in landscape to save space */
    #multiplayer-sidebar {
        /* FIXED POSITION REMOVED -> FLEX FLOW */
        position: relative !important;
        /* Sit in the flex container */
        right: auto !important;
        left: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: auto !important;
        /* Fit content */
        max-width: 250px !important;
        /* Safety constraint */
        min-width: unset !important;
        /* Let it shrink to content */
        height: calc(100% - 90px) !important;
        /* Adjusted for new margins (79+11) */
        z-index: 95;
        margin: 79px 8px 11px 0 !important;
        /* Requested strict margins */
        order: 5 !important;
        /* Keep on right side */
        display: flex !important;
        flex-direction: column !important;
        background: transparent !important;
        pointer-events: none;
        overflow: hidden !important;
        padding: 5px !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
        /* Don't grow, just fit content */
        align-self: stretch !important;
        /* Stretch to match game area height */
    }

    #multiplayer-sidebar .players-list {
        pointer-events: auto;
        /* Re-enable clicks on list */
        background: rgba(255, 255, 255, 0.95);
        border-radius: 12px;
        padding: 5px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    /* Hide non-active players in mobile landscape */
    #multiplayer-sidebar .p-card {
        display: none !important;
    }

    #multiplayer-sidebar .p-card.active-turn {
        display: block !important;
        /* SHOW ONLY ACTIVE */
        width: 100% !important;
        margin: 0 !important;
        border: 2px solid var(--p-color, #333) !important;
    }

    /* Single Player Mode: HIDE Sidebar, SHOW Button */
    body.single-mode #country-info-sidebar {
        display: none !important;
    }

    body.single-mode .map-area {
        margin-right: 0 !important;
    }

    /* Show hint button in single mode landscape */
    body.single-mode #mobile-hint-btn.mobile-landscape-only {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .hint-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        /* Space between icon and text */
        text-align: center;
    }

    /* Multi Mode: Show Sidebar */
    body.multi-mode #multiplayer-sidebar {
        display: flex !important;
    }

    /* Single Mode: Hide multiplayer hint button */
    body.single-mode #mp-hint-btn {
        display: none !important;
    }

    /* Multi Mode: Hide mobile hint button, show multiplayer hint button */
    body.multi-mode #mobile-hint-btn {
        display: none !important;
    }

    body.multi-mode #mp-hint-btn {
        display: flex !important;
    }

    body.multi-mode .map-area {
        margin-right: 0 !important;
        /* No fixed margin needed */
    }

    .flag-question-area {
        flex-direction: row !important;
        gap: 15px !important;
        padding: 10px !important;
        /* Force 10px padding */
        width: 95% !important;
        /* Shrink by 5% */
        height: 95% !important;
        /* Shrink by 5% */
        align-items: center !important;
    }

    .question-container {
        flex: 1 !important;
        width: auto !important;
        height: auto !important;
        max-height: 90% !important;
        padding: 10px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    .question-label {
        font-size: 0.9rem !important;
        padding: 5px 15px !important;
        margin-bottom: 5px !important;
    }

    .quiz-options-container {
        width: auto !important;
        flex: 1 1 auto !important;
        /* Grow and shrink */
        min-width: 200px !important;
        /* Minimum readable width */
        flex-direction: column !important;
        flex-direction: column !important;
        gap: 8px !important;
        justify-content: center !important;
        align-items: center !important;
        /* Center options horizontally */
        text-align: center !important;
    }

    /* Make question container same height as options */
    .question-container {
        flex: 1 !important;
        width: auto !important;
        height: 100% !important;
        /* Fill available height */
        max-height: none !important;
        /* Remove constraints */
        padding: 5px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        /* Distribute content */
        align-self: stretch !important;
        /* Stretch to match options container height */
    }

    /* Small Instagram Promo in Landscape - HIDE desktop version, show new mobile one */
    .instagram-promo-box.desktop-only {
        display: none !important;
    }

    .instagram-landscape-promo {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
        color: white;
        text-decoration: none;
        padding: 8px 15px;
        border-radius: 20px;
        font-weight: 700;
        font-size: 0.8rem;
        width: 100%;
        max-width: 220px;
        margin-top: 5px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        transition: transform 0.2s;
    }

    .instagram-landscape-promo:active {
        transform: scale(0.95);
    }

    .instagram-promo-box i {
        font-size: 1rem !important;
    }

    .quiz-option-btn {
        padding: 15px 5px !important;
        /* Larger padding */
        font-size: 1rem !important;
        /* Larger text */
        white-space: normal !important;
        /* Allow wrapping */
        line-height: 1.2 !important;
        height: auto !important;
        min-height: 50px !important;
        /* Taller */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #mobile-hint-btn {
        padding: 15px 5px !important;
        font-size: 1rem !important;
        min-height: 50px !important;
    }

    .flag-map-wrapper {
        height: 100% !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 10px !important;
        flex: 1 !important;
        margin-top: 5px !important;
        /* Reduced to 5px as requested */
        padding-left: 20px !important;
    }

    .main-flag-container {
        flex: 1 !important;
        max-height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .main-flag {
        max-height: 35vh !important;
        /* REDUCED HEIGHT */
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }

    .country-map-hint {
        padding: 5px !important;
        max-width: 120px !important;
        /* Constrain map width */
        min-width: unset !important;
        flex: 0 0 auto !important;
    }

    #country-shape-svg {
        height: 60px !important;
        /* Smaller SVG container */
    }

    #country-shape-svg svg {
        max-height: 50px !important;
    }
}

/* Hint Button Style */
.hint-btn {
    background: linear-gradient(135deg, #FFD54F, #FFCA28) !important;
    color: #333 !important;
    border-color: #FFC107 !important;
    font-weight: 800;
}

.hint-btn:hover {
    background: linear-gradient(135deg, #FFCA28, #FFB300) !important;
    border-color: #FFA000 !important;
}

.hint-btn i {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Responsive Notification Text */
@media (max-width: 900px) {

    /* Hide hint button icon in portrait/mobile generally (overridden if necessary) */
    .hint-btn i {
        display: none !important;
    }

    .feedback-overlay {
        font-size: 1.5rem !important;
        /* Smaller feedback text */
        padding: 10px 20px !important;
        width: 80% !important;
        text-align: center !important;
    }

    /* SweetAlert2 Mobile Adjustments */
    div:where(.swal2-container) div:where(.swal2-popup) {
        width: 90% !important;
        font-size: 0.8rem !important;
        padding: 10px !important;
    }

    div:where(.swal2-title) {
        font-size: 1.2rem !important;
    }

    div:where(.swal2-html-container) {
        font-size: 0.9rem !important;
    }
}

/* FIX: Player Info Display Cutoff in Portrait Mode */
.player-info-display {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    padding: 5px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    min-width: 120px;
    max-width: none !important;
    /* Allow expansion */
}

#display-username {
    font-weight: 800;
    color: var(--dark);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: visible;
    /* Show full text */
    text-overflow: clip;
    /* No ellipsis */
}