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

:root {
  --color-bg-dark: #0a0518;
  --color-accent-pink: #ff2a85;
  --color-accent-violet: #8a2be2;
  --color-accent-blue: #00f0ff;
  --color-accent-gold: #ffd700;
  --color-text-light: #f5f0ff;
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-bg-dark);
  font-family: var(--font-main);
  color: var(--color-text-light);
}

#game-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #1c0e35 0%, #07030f 100%);
}

/* UI Overlays */
.ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  z-index: 20;
}

.interactive {
  pointer-events: auto;
}

/* Glassmorphism Panel */
.glass-panel {
  background: rgba(15, 8, 32, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 42, 133, 0.25);
  border-radius: 20px;
  box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.6),
              inset 0 0 20px rgba(138, 43, 226, 0.2);
  color: var(--color-text-light);
  padding: 35px;
  max-width: 480px;
  width: 90%;
  text-align: center;
}

/* Screen container styles */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 10;
}

.screen.active {
  opacity: 1;
  visibility: visible;
}

/* Buttons */
.btn {
  background: linear-gradient(135deg, var(--color-accent-violet) 0%, rgba(255, 42, 133, 0.8) 100%);
  border: none;
  color: white;
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 42, 133, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  font-family: var(--font-main);
  letter-spacing: 0.5px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 42, 133, 0.5);
  filter: brightness(1.1);
}

.btn:active {
  transform: translateY(1px);
}

/* Font adjustments */
h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 20px;
  background: linear-gradient(to right, #ffffff, #ffb3d1, #a3e5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(138, 43, 226, 0.4));
}

p {
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(245, 240, 255, 0.8);
  margin-bottom: 20px;
}

/* Specific Pause overlay UI */
.menu-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 25px;
}

.menu-options .btn {
  width: 100%;
}

/* Controls selector panel */
.controls-config {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-row label {
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(245, 240, 255, 0.9);
}

.btn-group {
  display: flex;
  gap: 5px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-option {
  background: transparent;
  border: none;
  color: rgba(245, 240, 255, 0.6);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-option.selected {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-accent-blue);
  box-shadow: 0 2px 8px rgba(0, 240, 255, 0.2);
}

/* Switch toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--color-accent-pink);
}

input:checked + .slider:before {
  transform: translateX(24px);
}
