:root {
  color-scheme: dark;
  --panel-bg: rgba(20, 14, 12, 0.88);
  --panel-border: rgba(255, 150, 80, 0.25);
  --text: #f4e9df;
  --text-dim: #cbb7a8;
  --accent: #ff8a3d;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05070a;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
}

#fire-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 120, 40, 0.12), transparent 60%),
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

.icon-button {
  position: fixed;
  top: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.icon-button:hover {
  background: rgba(40, 26, 20, 0.92);
  transform: scale(1.05);
}

#settings-toggle {
  right: 20px;
}

#sound-toggle {
  right: 76px;
}

#sound-toggle .icon-sound-off {
  display: none;
}

#sound-toggle.muted .icon-sound-on {
  display: none;
}

#sound-toggle.muted .icon-sound-off {
  display: block;
}

.settings-panel {
  position: fixed;
  top: 74px;
  right: 20px;
  width: 260px;
  padding: 18px 20px 20px;
  border-radius: 14px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.settings-panel h2 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-dim);
}

.setting-row input[type="range"] {
  width: 130px;
  accent-color: var(--accent);
}

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  transition: background 0.2s ease;
}

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

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

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

.close-button {
  width: 100%;
  padding: 8px 0;
  margin-top: 4px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #1a0e08;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.close-button:hover {
  filter: brightness(1.08);
}

.hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--text-dim);
  background: rgba(20, 14, 12, 0.6);
  padding: 8px 16px;
  border-radius: 999px;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 5;
}

.hint.hidden {
  opacity: 0;
}
