.game-memory-game #game-container{flex-direction:column;justify-content:flex-start;align-items:center;min-height:calc(100vh - 200px);max-height:calc(100vh - 200px);padding:20px;display:flex;overflow-y:auto}#game-grid{aspect-ratio:1;background:#f7f3ec;border-radius:12px;gap:12px;width:min(600px,90vw,70vh);max-width:100%;margin:0 auto;padding:20px;display:grid;box-shadow:0 4px 6px #0000001a}.memory-card{aspect-ratio:1;cursor:pointer;perspective:1000px;border-radius:8px;position:relative;overflow:hidden}.memory-card .card-back,.memory-card .card-front{backface-visibility:hidden;border-radius:8px;justify-content:center;align-items:center;width:100%;height:100%;font-size:2rem;font-weight:700;transition:transform .3s;display:flex;position:absolute;box-shadow:0 2px 4px #0000001a}.memory-card .card-back{color:#fff;background:#e0603a;transform:rotateY(0)}.memory-card .card-front{color:#e0603a;background:#fffdf9;transform:rotateY(180deg)}.memory-card.revealed .card-back{transform:rotateY(180deg)}.memory-card.revealed .card-front{transform:rotateY(0)}.memory-card.matched{opacity:.7;cursor:default}.memory-card.matched .card-front{color:#5a8a4a;background:#dcecd2}.memory-card:not(.matched):hover .card-back{transform:scale(1.05)rotateY(0);box-shadow:0 4px 8px #0003}@media (width<=768px){#game-grid{gap:8px;padding:12px}.memory-card .card-back,.memory-card .card-front{font-size:1.5rem}}@media (width<=480px){#game-grid{gap:6px;padding:8px}.memory-card .card-back,.memory-card .card-front{font-size:1.2rem}}.immersive-mode #game-container{min-height:calc(100vh - 150px);max-height:calc(100vh - 150px);overflow-y:auto}.immersive-mode #game-grid{max-width:min(80vw,75vh)}@media (width>=768px) and (width<=1024px){.game-memory-game #game-container{box-sizing:border-box;justify-content:flex-start;width:100%;max-height:60vh;padding:8px;overflow:visible}.immersive-mode #game-container{max-height:60vh;padding:8px;overflow:visible}#game-grid{box-sizing:border-box;aspect-ratio:1;gap:5px;width:min(60vw,60vh - 80px);max-width:60vw;height:min(60vw,60vh - 80px);max-height:calc(60vh - 80px);margin:0 auto;padding:8px;overflow:hidden}.memory-card{min-width:0;min-height:0}.memory-card .card-back,.memory-card .card-front{font-size:clamp(.8rem,1.5vw,1.4rem)}}
