/**
 * puzzle-2048.css — Styles dédiés au jeu 2048
 * Styles propres au jeu uniquement — communs dans games.css
 */

/* ── Grille ──────────────────────────────────────────────────────────────────── */
.gm2048-grid {
    display: grid;
    grid-template-columns: repeat(var(--gm-cols, 4), 1fr);
    gap: 10px;
    background: #bbada0;
    border-radius: 8px;
    padding: 10px;
    max-width: 440px;
    margin: 0 auto;
    touch-action: none;
    user-select: none;
}

/* ── Cellule (tuile ou vide) ──────────────────────────────────────────────────── */
.gm2048-cell {
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    background: rgba(238, 228, 218, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: clamp(.9rem, 5vw, 1.9rem);
    color: #776e65;
    line-height: 1;
}

/* ── Tuile avec valeur ────────────────────────────────────────────────────────── */
.gm2048-tile { animation: gm2048-pop .13s ease; }
.gm2048-light { color: #f9f6f2; }

@keyframes gm2048-pop {
    0%   { transform: scale(0.45); }
    65%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ── Couleurs classiques 2048 ────────────────────────────────────────────────── */
.gm2048-tile-2    { background: #eee4da; }
.gm2048-tile-4    { background: #ede0c8; }
.gm2048-tile-8    { background: #f2b179; }
.gm2048-tile-16   { background: #f59563; }
.gm2048-tile-32   { background: #f67c5f; }
.gm2048-tile-64   { background: #f65e3b; }
.gm2048-tile-128  { background: #edcf72; font-size: clamp(.75rem, 4vw, 1.55rem); }
.gm2048-tile-256  { background: #edcc61; font-size: clamp(.75rem, 4vw, 1.55rem); }
.gm2048-tile-512  { background: #edc850; font-size: clamp(.75rem, 4vw, 1.55rem); }
.gm2048-tile-1024 { background: #edc53f; font-size: clamp(.65rem, 3.5vw, 1.3rem); }
.gm2048-tile-2048 {
    background: #edc22e;
    font-size: clamp(.65rem, 3.5vw, 1.3rem);
    animation: gm2048-pop .13s ease, gm2048-glow 1.2s ease infinite alternate;
}

@keyframes gm2048-glow {
    from { box-shadow: 0 0 16px 4px rgba(243, 215, 116, .45); }
    to   { box-shadow: 0 0 38px 14px rgba(243, 215, 116, .85); }
}
