* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #1e293b; color: #f8fafc; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 1rem; }
header h1 { font-size: 2rem; color: #f472b6; margin-bottom: 1rem; }
.controls { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: center; margin-bottom: 1rem; }
.controls select, .controls button { padding: 0.4rem 0.8rem; border-radius: 4px; border: none; font-size: 1rem; }
.controls button { background: #f472b6; color: #fff; cursor: pointer; font-weight: bold; }
.controls b { color: #f472b6; }
.board { display: grid; gap: 8px; perspective: 1000px; }
.card { width: 70px; height: 90px; cursor: pointer; transform-style: preserve-3d; transition: transform 0.4s; position: relative; }
.card.flipped { transform: rotateY(180deg); }
.card.matched { opacity: 0.6; pointer-events: none; }
.card .front, .card .back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.card .front { background: #334155; }
.card .back { background: #475569; transform: rotateY(180deg); }
footer { margin-top: 1rem; }
footer a { color: #f472b6; text-decoration: none; }