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

:root {
  --bg-color: #0D1B2A;
  --primary-color: #0984E3;
  --secondary-color: #74B9FF;
  --accent-color: #E17055;
  --text-color: #FFFFFF;
  --text-muted: #A0AEC0;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --border-radius: 12px;
}

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

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

header {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(13, 27, 42, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10;
  border-bottom: 1px solid var(--glass-border);
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.game-container {
  flex: 1;
  display: flex;
  padding: 1.5rem;
  gap: 1.5rem;
  overflow: hidden;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.canvas-panel {
  flex: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
}

canvas {
  max-width: 100%;
  max-height: 100%;
  cursor: pointer;
}

.controls-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 350px;
}

.clues-container {
  flex: 1;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.clues-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.clue-item {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.clue-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.clue-item.active {
  background: rgba(9, 132, 227, 0.15);
  border-color: rgba(9, 132, 227, 0.3);
}

.clue-item.completed {
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.6;
}

.clue-number {
  font-weight: 700;
  margin-right: 0.5rem;
  color: var(--secondary-color);
}

.actions-panel {
  display: flex;
  gap: 0.75rem;
}

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

button:hover {
  background: #0a95ff;
  transform: translateY(-1px);
}

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

button.secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

button.accent {
  background: var(--accent-color);
}

button.accent:hover {
  background: #ef8065;
}

/* Modal / Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #162436;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.overlay.show .modal {
  transform: scale(1);
}

.modal h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.modal p {
  margin-bottom: 2rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .game-container {
    flex-direction: column;
    overflow-y: auto;
  }
  .controls-panel {
    min-width: 100%;
  }
  .canvas-panel {
    min-height: 400px;
  }
  body {
    overflow: auto;
    height: auto;
  }
}
