@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --primary: #00B894;
  --secondary: #55EFC4;
  --accent: #FDCB6E;
  --background: #0A1F1C;
  --surface: rgba(255, 255, 255, 0.05);
  --text: #F5F5F5;
  --border-radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 600px;
  padding: 20px;
}

header {
  text-align: center;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(0, 184, 148, 0.3);
}

.stats {
  display: flex;
  justify-content: space-around;
  width: 100%;
  background: var(--surface);
  backdrop-filter: blur(10px);
  padding: 15px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
}

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

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}

.game-board {
  position: relative;
  background: var(--surface);
  border-radius: var(--border-radius);
  padding: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

canvas {
  display: block;
  cursor: grab;
  touch-action: none;
}

canvas:active {
  cursor: grabbing;
}

.controls {
  display: flex;
  gap: 15px;
  width: 100%;
}

button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: var(--border-radius);
  background: var(--primary);
  color: var(--background);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

button:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3);
}

button:active {
  transform: translateY(0);
}

.difficulty-select {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.diff-btn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 15px;
}

.diff-btn.active {
  background: var(--primary);
  color: var(--background);
  border-color: var(--primary);
}

/* Win Overlay */
#win-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 31, 28, 0.9);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  z-index: 10;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#win-overlay h2 {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 20px;
}

#win-overlay p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

@media (max-width: 500px) {
  h1 { font-size: 1.8rem; }
  .stat-value { font-size: 1.2rem; }
  .container { padding: 10px; }
}
