body { font-family: sans-serif; text-align: center; background: #e0f2f1; margin: 0; padding: 1rem; touch-action: manipulation; }
#game-container { max-width: 420px; margin: auto; background: white; padding: 1.5rem; border-radius: 15px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
#menu button { background: #00897b; color: white; border: none; padding: 10px 20px; margin: 5px; font-size: 1rem; border-radius: 8px; cursor: pointer; font-weight: bold; }
#memory-grid { display: grid; gap: 8px; margin-top: 1rem; justify-content: center; }
.grid-S { grid-template-columns: repeat(2, 1fr); }
.grid-M { grid-template-columns: repeat(4, 1fr); }
.grid-L { grid-template-columns: repeat(4, 1fr); }
.card { aspect-ratio: 1; background: #00897b; border-radius: 8px; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; color: white; cursor: pointer; user-select: none; }
.card.flipped { background: #ffffff; border: 2px solid #00897b; color: #333; }
.hidden { display: none !important; }
#message { margin-top: 1rem; font-weight: bold; font-size: 1.1rem; color: #00796b; min-height: 1.5rem; }
