/* =========================================================
   MAYIN TARLASI - ÖZEL TASARIM
   ========================================================= */

.game-body {
    background-color: #f4f4f0; /* Klasik oyunlara uygun açık arka plan */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.game-header {
    width: 100%;
    max-width: 800px;
    margin-top: 10px;
    background-color: #ffffff;
    border: 3px solid #000;
    border-radius: 8px;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 4px 4px 0px #000;
    z-index: 10;
}

.game-layout {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    max-width: 1000px;
    align-items: flex-start;
}

/* OYUN ÇERÇEVESİ */
#minesweeper-wrapper {
    background-color: #c0c0c0; /* Orijinal Windows 98 gri rengi */
    border: 4px solid #000;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 6px 6px 0px #000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 100%;
    overflow-x: auto;
}

/* ÜST PANEL (Sayaçlar ve Gülücük) */
.ms-header {
    background-color: #c0c0c0;
    border: 3px solid #808080;
    border-right-color: #fff;
    border-bottom-color: #fff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ms-counter {
    background-color: #000;
    color: #ff0000; /* Dijital kırmızı */
    font-family: 'Courier New', Courier, monospace;
    font-size: 28px;
    font-weight: bold;
    padding: 2px 8px;
    border: 2px solid #808080;
    border-left-color: #808080;
    border-top-color: #808080;
    border-right-color: #fff;
    border-bottom-color: #fff;
    min-width: 70px;
    text-align: center;
}

.ms-smiley {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background-color: #c0c0c0;
    border: 3px solid #fff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-smiley:active {
    border: 3px solid #808080;
    border-right-color: #fff;
    border-bottom-color: #fff;
}

/* IZGARA (BOARD) */
#ms-board {
    display: grid;
    /* 16x16 Orta Seviye Izgarası */
    grid-template-columns: repeat(var(--ms-cols, 16), 25px);
    grid-template-rows: repeat(var(--ms-rows, 16), 25px);
    background-color: #808080;
    border: 3px solid #808080;
    border-right-color: #fff;
    border-bottom-color: #fff;
}

/* HÜCRELER (CELLS) */
.ms-cell {
    width: 25px;
    height: 25px;
    background-color: #c0c0c0;
    border: 3px solid #fff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    font-weight: 900;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    user-select: none;
}

/* Açılmış (Tıklanmış) Hücre */
.ms-cell.revealed {
    border: 1px solid #808080;
    background-color: #c0c0c0;
}

/* Renk Kodları (Mayın Tarlası Klasikleri) */
.val-1 { color: #0000ff; }
.val-2 { color: #008000; }
.val-3 { color: #ff0000; }
.val-4 { color: #000080; }
.val-5 { color: #800000; }
.val-6 { color: #008080; }
.val-7 { color: #000000; }
.val-8 { color: #808080; }

.mine { background-color: #ff0000 !important; }

/* REKLAM */
.game-ad {
    margin-top: 0; background-color: #fff; border: 3px solid #000; box-shadow: 4px 4px 0px #000;
}

@media (max-width: 780px) {
    .game-layout {
        max-width: 100%;
    }

    #minesweeper-wrapper {
        width: 100%;
    }
}
