* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #0a3d0a; display: flex; justify-content: center; min-height: 100vh; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; overflow-x: hidden; color: #e0e0e0; }
#game-container { position: relative; width: 100%; max-width: 800px; padding: 10px; }
#top-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; gap: 8px; }
.cell-group { display: flex; gap: 4px; }
.cell { width: 72px; height: 100px; border: 2px solid rgba(255,255,255,0.2); border-radius: 6px; background: rgba(0,0,0,0.15); position: relative; cursor: pointer; }
.cell.foundation { border-color: rgba(255,255,255,0.3); }
.cell .card { position: absolute; top: 0; left: 0; }
#tableau { display: flex; gap: 4px; justify-content: center; }
.column { width: 72px; min-height: 100px; position: relative; cursor: pointer; }
.column .card { position: absolute; left: 0; width: 72px; cursor: pointer; }
.card { width: 72px; height: 100px; border-radius: 6px; background: #fff; color: #111; font-size: 14px; font-weight: 700; padding: 4px 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.3); user-select: none; border: 2px solid transparent; }
.card.red { color: #dc2626; }
.card.selected { border-color: #3b82f6; box-shadow: 0 0 10px rgba(59,130,246,0.5); }
.card .rank-suit { pointer-events: none; }
.hud-btn { padding: 8px 16px; background: #1e40af; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; }
.hud-btn:hover { background: #2563eb; }
#overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; background: rgba(12,13,20,0.85); z-index: 100; }
#overlay.hidden { display: none; }
#overlay-box { text-align: center; padding: 40px 60px; background: #161822; border: 2px solid #2a2d3a; border-radius: 12px; }
#overlay-box h1 { font-size: 42px; margin-bottom: 16px; color: #3b82f6; }
#screen-gameover h1 { color: #10b981; }
#overlay-box p { font-size: 20px; margin-bottom: 10px; color: #ccc; }
.controls-hint { font-size: 16px !important; color: #999 !important; }
.action-hint { font-size: 16px !important; color: #777 !important; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity:0.5; } 50% { opacity:1; } }
@media (max-width: 640px) {
  .cell, .card, .column .card, .column { width: 42px; }
  .cell, .card, .column .card { height: 62px; font-size: 11px; padding: 2px 3px; }
  #overlay-box { padding: 24px 20px; }
  #overlay-box h1 { font-size: 28px; }
}
