/* Genel Ayarlar */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body{
   
    background-image: url("img/arkaplan.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    margin: 0;
    width: 100%;
    min-height: 100vh;

    font-family: 'Comic Sans MS', cursive;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;
    
}
:root { 
    /* Kutuları maksimum boyuta çektik (16vh), kenarlara tam yayılım sağlar */
    --sq: 16vh; 
    --primary: #ff5555;; 
}

@media (max-width: 1024px) { 
    :root { --sq: 16vw; } 
}



/* 🎲 OYUN TAHTASI - PC KENARLARINA TAM YAYILIM */
#board-container { 
    display: grid; 
    grid-template-columns: repeat(9, var(--sq)); 
    /* Dikdörtgen formunu en belirgin hale getirmek için 1.3 katı yaptık */
    grid-template-rows: repeat(4, calc(var(--sq) * 1.2)); 
    gap: 9px; /* Kutular arası boşluğu biraz artırarak ferahlık sağladık */
    position: relative; 
    padding: 10px; 
    margin: auto;
}

.square { 
    width: var(--sq); 
    /* Yükseklik 1.3 yapılarak tam bir dikdörtgen sağlandı */
    height: calc(var(--sq) * 1); 
    background: white; 
    border-radius: 20px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); 
    overflow: hidden; 
}

.square img { 
    width: 100%; 
    height: 100%; 
    object-fit: fill; 
}

/* 🎡 MERKEZ PANEL (ÇARK VE SKOR) */
#center-dashboard { 
    grid-column: 2 / 9; 
    grid-row: 2 / 5; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: space-around; 
    z-index: 50; 
}

.dashboard-inner { 
    display: flex; 
    width: 100%; 
    justify-content: space-evenly; 
    align-items: center; 
}

/* Mevcut .turn-label stilini silebilirsin veya bununla güncelleyebilirsin */
#step-display { 
    font-size: 2.2rem; /* Yazı boyutunu biraz küçülttük */
    color: var(--primary); 
    font-weight: 900; 
    text-shadow: 2px 2px white; 
    margin: 5px 0 15px 0; /* Boşlukları düzenledik */
}

#current-pawn-display{
    max-height:75px;
}



/* 🎡 ÇARK TASARIMI */
#wheel-container { 
    position: relative; 
    width: 28vh; 
    height: 28vh; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 35px;
}

#wheel { 
    width: 100%; 
    height: 100%; 
    border-radius: 50%; 
    border: 10px solid white; 
    background: conic-gradient(#ff6b6b 0 90deg, #feca57 90deg 180deg, #1dd1a1 180deg 270deg, #54a0ff 270deg 360deg); 
    transition: transform 4s cubic-bezier(0.15, 0, 0.15, 1); 
    position: relative; 
}

#pointer { 
    position: absolute; 
    top: -15px; 
    left: 50%; 
    transform: translateX(-50%); 
    border-left: 20px solid transparent; 
    border-right: 20px solid transparent; 
    border-top: 38px solid var(--primary); 
    z-index: 100; 
}

.num { 
    position: absolute;
    font-weight: 900;
    font-size: 3rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center; 
}

.n4 { top: 15%; left: 15%; transform: rotate(-45deg); }
.n1 { top: 15%; right: 15%; transform: rotate(45deg); }
.n2 { bottom: 15%; right: 15%; transform: rotate(135deg); }
.n3 { bottom: 15%; left: 15%; transform: rotate(225deg); }

/* ♟️ PİYONLAR */
#pawns-layer { 
    position: absolute; 
    inset: 0; 
    pointer-events: none; 
    z-index: 100; 
}

.player-pawn { 
    width: calc(var(--sq) * 0.45); 
    position: absolute; 
    transition: all 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.28); 
    transform: translate(-50%, -50%); 
}

.active-pawn-glow { 
    filter: drop-shadow(0 0 15px gold); 
    animation: bounce 1.5s infinite; 
}

@keyframes bounce { 
    0%, 100% { transform: translate(-50%, -50%); } 
    50% { transform: translate(-50%, -80%); } 
}
/* Karelerin içindeki görsellerin piyonu engellememesi için */
.square img {
    pointer-events: none;
    user-select: none;
}

/* Piyonların z-index değerini yükseltelim */
#pawns-layer {
    z-index: 999;
}

/* Bildirim paneli animasyonu için */
.status-good { border-color: #2ecc71 !important; background: #fafffa !important; }
.status-bad { border-color: #e74c3c !important; background: #fffafa !important; }

/* Mobil için basit bir düzeltme */
@media (max-width: 768px) {
    #board-container {
        transform: scale(0.8); /* Küçük ekranlarda tahtayı sığdırır */
    }
}



#step-display {
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Yazıya derinlik katan bir gölge */
    text-shadow: 2px 2px 0px #ffffff, 4px 4px 0px rgba(0,0,0,0.05);
}
/* 📢 BİLDİRİM PANELİ DUYGU TEMALARI */
.status-good { border-color: #2ecc71 !important; background: #f0fff4 !important; } /* Mutlu/Yeşil */
.status-bad { border-color: #e74c3c !important; background: #fff5f5 !important; }  /* Üzgün/Kırmızı */
.status-info { border-color: #f1c40f !important; background: #fefff0 !important; } /* Bilgi/Sarı */

/* Açılış Animasyonu */
#status-content {
    animation: popIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes popIn {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* 🖼️ DİĞER EKRANLAR */
.full-page-screen { background-color: aliceblue; position: fixed; inset: 0; z-index: 5000; display: flex; justify-content: center; align-items: center; }
.bg-image { position: absolute; width: 100%; height: 100%; object-fit: fill; z-index: -1; }
.overlay-btn { padding: 18px 45px; background:#e34747; color: white; border: 6px solid white; border-radius: 60px; font-size: 26px; font-weight: 900; cursor: pointer; box-shadow: 0 10px 25px rgba(0,0,0,0.2); transition: 0.2s; }
 .bottom-btn { position: absolute; bottom: 5%; background: ffe3e3; }

.overlay { position: fixed; inset: 0; background: rgba(194, 233, 251, 0.98); z-index: 6000; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.modal-content { background: white; padding: 25px; border-radius: 30px; border: 6px solid var(--primary); text-align: center; max-width: 450px; }
#question-image { width: 100%; border-radius: 15px; margin: 15px 0; }
.btn-cloud { border: none; padding: 12px 25px; border-radius: 50px; color: white; background-color:#3787d7; font-weight: bold; cursor: pointer; font-family: 'Comic Sans MS', cursive; margin: 5px; font-size: 1.1rem; }
.btn-success { background: #2ecc71; }
.btn-danger { background: #e74c3c; }

.neon-btn {     
    width: 100px;
    height: 100px;
    font-weight: 900;
    color: white;
    border: 4px solid white;
    border-radius: 50%;
    cursor: pointer;
    margin: 10px;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
    transition: 0.2s;
    font-size: 2rem;
    }
        
    
.neon-btn2 {    
   width: 286px;
    height: 100px;
    font-weight: 900;
    color: white;
    border: 4px solid white;
    border-radius: 20px;
    cursor: pointer;
    margin: 10px;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
    transition: 0.2s;
    font-size: 2rem;
    }
        
        


.neon-btn:nth-child(1) { background: #ff6b6b; } 
.neon-btn:nth-child(2) { background: #1dd1a1; }
.neon-btn:nth-child(3) { background: #feca57; } 
.neon-btn:nth-child(4) { background: #5f27cd; }

body {
   
    font-family: 'Comic Sans MS';
}


.main-wrapper {
            display: flex;
            gap: 15px;
            max-width: 1000px;
            width: 100%;
        }

        /* Ortak Kutu Yapısı */
        .card {
            background: #fff;
            border: 3px solid #000;
            display: flex;
            flex-direction: column;
            overflow: hidden; /* Kenarlıkların dışına taşmayı önler */
        }

        .header {
            padding: 8px;
            text-align: center;
            font-weight: 800;
            font-size: 18px;
            border-bottom: 3px solid #000;
            text-transform: uppercase;
        }

        /* Sol Kutu: Öğeler */
        .items-box {
            flex: 1;
            min-width: 120px;
        }
        .items-box .header { background-color: #ffcc33; }
        .items-content {
            padding: 15px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
        }
        .items-content img, .items-content span { font-size: 40px; }

        /* Sağ Kutu: Oyun Yönergesi */
        .guide-box {
            flex: 4;
            display: flex;
            flex-direction: column;
        }
        .guide-box .header { background-color: #ff6633; }
        
        /* ÖNEMLİ: Scroll ve Yükseklik Ayarı */
        .guide-content {
            padding: 15px 20px;
            overflow-y: auto; /* İçerik taşarsa kaydırılabilir yap */
            max-height: 500px; /* Masaüstü varsayılan yükseklik */
        }

        .guide-content h3 {
            margin: 0 0 5px 0;
            font-size: 16px;
            font-weight: 800;
        }

        .guide-content p {
            margin: 0 0 15px 0;
            font-weight: 700;
            font-size: 14px;
        }

        .guide-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .guide-list li {
            position: relative;
            padding-left: 18px;
            margin-bottom: 6px;
            font-weight: 700; /* Yazıları kalınlaştırdık */
            font-size: 14px;
            line-height: 1.3;
        }

        .guide-list li::before {
            content: "•";
            position: absolute;
            left: 0;
            font-weight: 800;
        }

        .shapes-inline {
            font-size: 20px;
            vertical-align: middle;
            margin: 0 3px;
        }

        /* MOBİL AYARLAR */
        @media (max-width: 768px) {
            .main-wrapper {
                flex-direction: column; /* Kutuları alt alta diz */
            }

            .guide-content {
                max-height: 250px; /* Mobilde kutu yüksekliğini küçük tut */
                background-color: #fff;
                /* Scroll bar görünümü (opsiyonel) */
                scrollbar-width: thin;
                scrollbar-color: #ff6633 #f0f0f0;
            }
            
            /* Chrome/Safari için scrollbar tasarımı */
            .guide-content::-webkit-scrollbar {
                width: 6px;
            }
            .guide-content::-webkit-scrollbar-thumb {
                background: #ff6633;
                border-radius: 10px;
            }
        }

.score-card{
	    padding: 25px;
    background-color: #fff;
    border-radius: 30px;
}


#active-player-info{
    text-align: center;
    padding: 20px;
    background-color: #a2fde7;
    border-radius: 30px;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    margin: 25px;
}

/* 4. Adım Yazısı */
#step-display {
    font-size: 1rem !important;
        color: #230606 !important;
    font-weight: 700 !important;
    text-shadow: none;
}

/* 5. Karelerin Canlandırılması */
.square {
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    border: 3px solid rgba(255,255,255,0.4) !important;
}

.square:hover {
    transform: scale(1.05) !important;
    z-index: 10 !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
}
/* --- ÇOCUKSU TASARIM DOKUNUŞLARI --- */

#selection-title {
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive; /* Yuvarlak ve samimi font */
    color: #fae7ff !important; /* Canlı turuncu-kırmızı renk */
    text-shadow: 2px 2px 0px #c4d7ff; /* Yazıya derinlik katan sarı gölge */
    font-size: 2.8rem; /* Yazıyı biraz daha büyüttük */
    text-align: center;
    margin-bottom: 30px;
}

/* Eğer butonları da çocuksu yapmak istersen bu kodu da ekle */
.selection-card {
    border-radius: 40px !important; /* Köşeleri iyice yuvarla */
    border: 6px solid #3498db !important; /* Mavi kalın çerçeve */
    box-shadow: 0 8px 15px rgba(0,0,0,0.1); /* Hafif yumuşak gölge */
    transition: transform 0.3s ease;
}

.selection-card:hover {
    transform: scale(1.1) rotate(3deg); /* Üzerine gelince zıplar gibi büyüsün */
}
/* --- KARAKTER SEÇİM EKRANI DÜZENLEMESİ --- */

/* 1. Karakterleri Yan Yana (X Ekseninde) Dizmek İçin */
.pawn-container {
    display: flex !important;      /* Esnek kutu modelini zorla açar */
    flex-direction: row !important; /* Yan yana dizilmelerini sağlar */
    justify-content: center;        /* Karakterleri ortalar */
    align-items: center;            /* Dikeyde hizalar */
    gap: 75px;                   /* Karakterlerin arasına boşluk bırakır */
    flex-wrap: wrap;                /* Ekran sığmazsa alt satıra geçer */
    padding: 20px;
}

/* 2. Karakterlerin Görünümü ve Animasyonu */
.pawn-option {
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.pawn-option:hover {
    transform: scale(1.2) rotate(5deg); /* Üstüne gelince büyü ve neşeli dur */
}

.pawn-option img {
    width: 120px;                   /* Piyonların seçim ekranındaki boyutu */
    height: auto;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.1));
}

/* 3. Başlığın (Karakterini Seç) Çocuksu Tasarımı */
.kid-title, #selection-title {
    font-family: 'Comic Sans MS', cursive !important;
    color: #33093f !important;   
    text-shadow: 3px 3px 0px   #c4d7ff !important; /* Sarı gölge */
    font-size: 3rem !important;
    margin-bottom: 40px;
    text-align: center;
}


 

/* --- MASAÜSTÜ (PC) AYARLARI --- */
@media screen and (min-width: 769px) {
    #game-area {
        display: block; /* Flex'i devreden çıkarıyoruz */
        position: relative;
        width: fit-content;
        margin: auto;
    }

    #board-container {
        display: grid;
        position: relative;
    }

    /* Dashboard'u tam ortaya çiviliyoruz */
    #center-dashboard {
        position: absolute; /* Board'un üzerine bindirir */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%); /* Tam merkezleme */
        z-index: 100;
        pointer-events: none; /* Arkadaki karelere tıklamayı engellemez */
    }

    /* Dashboard içindeki butonların tıklanabilir olması için */
    .dashboard-inner {
        pointer-events: auto;
    }
}


/* 4. Mobil ve Küçük Ekranlar İçin Sihirli Dokunuş */
@media (max-width: 1024px) {
    #board-container {
        transform: scale(0.8); 
    }
    .num {
    font-weight: 700;
    font-size: 2rem;
}

#wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid white;
    background: conic-gradient(#ff6b6b 0 90deg, #feca57 90deg 180deg, #1dd1a1 180deg 270deg, #54a0ff 270deg 360deg);
    transition: transform 4s cubic-bezier(0.15, 0, 0.15, 1);
    position: relative;
}

#pointer {
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 24px solid var(--primary);
    z-index: 100;
}

    #wheel-container {
        width: 15vh !important;
        height: 15vh !important;
            margin: 10px;
    }
    
    .cocukarka {
        width: 250px !important;
    }

    /* --- dashboard-inner Güncellemesi (Tablet) --- */
    .dashboard-inner {
        flex-direction: column; /* Elemanları alt alta al */
        gap: 20px;
        align-items: center;
    }
}

@media (max-width: 600px) {
    #board-container {
        transform: scale(0.68);
        transform-origin: center center;
		    gap: 1px;
    }
	
	.square {
     border: 1px solid rgba(255, 255, 255, 0.4) !important;
}
    
	.pawn-container {
    gap: 30px;
 }


    #active-player-info {
        padding: 5px;
        width: 90%; /* Mobilde daha geniş dursun */
        margin: 5px auto;
    }

    /* --- dashboard-inner Güncellemesi (Telefon) --- */
    .dashboard-inner {
        display: flex;
        flex-direction: column; /* Kesinlikle dikey sıra */
        gap: 15px;
        width: 100%;
    }

    /* Çarkın mobilde çok yer kaplamaması için ayar */
    .wheel-box {
        display: flex;
        justify-content: center;
        transform: scale(0.85); /* Çarkı biraz daha dengele */
    }

    /* Skor kartını mobilde daha kompakt yap */
    .score-card {
        padding: 10px;
        font-size: 1rem;
    }

    #player-scores-list {
        display: flex;
        flex-direction: row; /* Puanları yan yana dizerek yer kazan */
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
}

/* 5. Karelerin ve Piyonların Oranını Koru */
.square {
    width: var(--sq);
    height: var(--sq);
    position: relative;
}

.player-pawn {
    width: calc(var(--sq) * 0.5); 
}

.modal-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 sütun yap */
    gap: 10px;
    margin-top: 15px;
}

/* Mobilde tek sütun olsun */
@media (max-width: 600px) {
    .modal-buttons {
        grid-template-columns: 1fr;
    }
}