* { 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: 900px; padding: 10px; }
#top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 0 4px; }
#completed, #stock-count { font-size: 16px; color: #ccc; }
#completed span, #stock-count span { color: #fff; font-weight: 700; }
.hud-btn { padding: 8px 16px; background: #7c3aed; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; }
.hud-btn:hover { background: #8b5cf6; }
.hud-btn:disabled { opacity: 0.3; cursor: default; }
#tableau { display: flex; gap: 3px; justify-content: center; }
.column { width: 80px; min-height: 100px; position: relative; }
.card { width: 80px; height: 110px; 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); position: absolute; left: 0; user-select: none; cursor: pointer; border: 2px solid transparent; }
.card.face-down { background: linear-gradient(135deg, #4c1d95, #7c3aed); color: transparent; cursor: default; }
.card.selected { border-color: #8b5cf6; box-shadow: 0 0 10px rgba(139,92,246,0.5); }
#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: #8b5cf6; }
#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) {
  .column { width: 34px; }
  .card { width: 34px; height: 50px; font-size: 10px; padding: 2px; border-radius: 4px; }
  #overlay-box { padding: 24px 20px; }
  #overlay-box h1 { font-size: 28px; }
}
