/* =========================================================
   2048 - OYUN TASARIMI
   ========================================================= */

.game-body {
    background-color: #faf8ef; /* 2048 Orijinal kemik rengi arka plan */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.game-header {
    width: 100%;
    max-width: 600px; /* 2048 için daha dar ve şık bir header */
    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: 800px;
    align-items: flex-start;
}

/* OYUN ÇERÇEVESİ (NEUBRUTALISM + 2048 Ruhu) */
#game-2048-wrapper {
    position: relative;
    background-color: #bbada0;
    padding: 15px;
    border: 4px solid #000;
    border-radius: 12px;
    box-shadow: 6px 6px 0px #000;
    width: 450px;
    height: 450px;
}

/* IZGARA (ARKA PLAN HÜCRELERİ) */
.board-2048 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    height: 100%;
}

.grid-cell {
    background-color: rgba(238, 228, 218, 0.35);
    border-radius: 8px;
    width: 100%;
    height: 100%;
}

/* HAREKETLİ SAYILAR (TAŞLAR / TILES) */
#tile-container {
    position: absolute;
    top: 15px;
    left: 15px;
    width: calc(100% - 30px);
    height: calc(100% - 30px);
    pointer-events: none; /* Mouse ile etkileşimi engelle, klavye ile oynanacak */
}

.tile {
    position: absolute;
    width: calc(25% - 11.25px); /* 4 sütun, aralarda 15px boşluk hesabıyla tam oturur */
    height: calc(25% - 11.25px);
    background-color: #eee4da;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 45px;
    font-weight: bold;
    color: #776e65;
    /* Kayma animasyonları efsane görünecek */
    transition: transform 0.15s ease-in-out, background-color 0.15s ease;
    border: 2px solid #000; 
    box-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

/* YENİ OLUŞAN KART ANİMASYONU */
@keyframes appear {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}
.tile-new { animation: appear 0.2s ease forwards; }

/* Orijinal Renk Paleti (SAYILARA GÖRE) */
.tile-2 { background-color: #eee4da; color: #776e65; }
.tile-4 { background-color: #ede0c8; color: #776e65; }
.tile-8 { background-color: #f2b179; color: #f9f6f2; }
.tile-16 { background-color: #f59563; color: #f9f6f2; }
.tile-32 { background-color: #f67c5f; color: #f9f6f2; }
.tile-64 { background-color: #f65e3b; color: #f9f6f2; }
.tile-128 { background-color: #edcf72; color: #f9f6f2; font-size: 40px; box-shadow: 0 0 10px rgba(237, 207, 114, 0.5), 2px 2px 0px rgba(0,0,0,0.2); }
.tile-256 { background-color: #edcc61; color: #f9f6f2; font-size: 40px; box-shadow: 0 0 15px rgba(237, 204, 97, 0.5), 2px 2px 0px rgba(0,0,0,0.2); }
.tile-512 { background-color: #edc850; color: #f9f6f2; font-size: 40px; box-shadow: 0 0 20px rgba(237, 200, 80, 0.5), 2px 2px 0px rgba(0,0,0,0.2); }
.tile-1024 { background-color: #edc53f; color: #f9f6f2; font-size: 30px; }
.tile-2048 { background-color: #edc22e; color: #f9f6f2; font-size: 30px; box-shadow: 0 0 30px rgba(237, 194, 46, 0.6), 2px 2px 0px rgba(0,0,0,0.2); }

.game-ad {
    margin-top: 0; background-color: #fff; border: 3px solid #000; box-shadow: 4px 4px 0px #000;
}