* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #e8e8e8;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.game-container {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

header {
  text-align: center;
  margin-bottom: 1.5rem;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #a855f7;
}

.subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.card-area {
  margin-bottom: 1.5rem;
}

.scratch-card {
  position: relative;
  background: linear-gradient(145deg, #2d2d44 0%, #1e1e2e 100%);
  border-radius: 0.75rem;
  padding: 1.25rem;
  border: 3px solid #a855f7;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.symbols-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  min-height: 140px;
}

.symbol-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: #e8e8e8;
}

.symbol-cell.revealed {
  animation: reveal 0.3s ease;
}

.symbol-cell.win {
  background: rgba(34, 197, 94, 0.4);
  border-color: #22c55e;
  color: #fff;
}

@keyframes reveal {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

.scratch-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 1.25rem;
  pointer-events: none;
}

.scratch-overlay .overlay-cell {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%);
  border-radius: 0.5rem;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.scratch-overlay .overlay-cell.scratched {
  pointer-events: none;
  background: transparent;
}

.actions {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-play {
  background: #a855f7;
  color: #fff;
}

.btn-play:hover {
  background: #c084fc;
  transform: translateY(-1px);
}

.result-area {
  min-height: 2.5rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
}

.result-area.win {
  color: #4ade80;
}

.result-area.lose {
  color: #94a3b8;
}
