:root {
  --primary: #F97316;
  --secondary: #FB923C;
  --accent: #FED7AA;
  --background: #7C2D12;
  --surface: #9A3412;
  --text: #ffffff;
  --text-muted: #FED7AA;
  --danger: #ef4444;
  --success: #22c55e;

  --cell-hidden: #EA580C;
  --cell-revealed: #FFE4E6;
  --cell-hover: #F97316;

  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--background);
  color: var(--text);
  font-family: var(--font-family);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.game-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 100%;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.game-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.title {
  margin: 0;
  font-size: 2rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

.stats-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: var(--surface);
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,0.1);
  box-sizing: border-box;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.stat-value {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text);
}

.reset-button {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.2s;
  box-shadow: var(--shadow);
  border: 2px solid #fff;
}

.reset-button:hover {
  transform: scale(1.05);
  background: var(--secondary);
}

.reset-button:active {
  transform: scale(0.95);
}

.emoji {
  font-size: 1.5rem;
}

.canvas-wrapper {
  display: flex;
  justify-content: center;
  padding: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,0.1);
  overflow: auto;
}

canvas {
  cursor: pointer;
  border-radius: 4px;
}

.controls-panel {
  display: flex;
  justify-content: center;
}

.difficulty-select {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.1);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  background: rgba(255,255,255,0.2);
  color: var(--text);
}

.btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 10px var(--primary);
}

.btn.primary {
  background: var(--primary);
  color: white;
}

.btn.primary:hover {
  background: var(--secondary);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(5px);
  opacity: 1;
  transition: opacity 0.3s;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: var(--surface);
  padding: 32px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--accent);
  color: var(--text);
}

.modal-content h2 {
  margin-top: 0;
  color: var(--accent);
}
