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

:root {
  --dock-bg: rgba(20, 20, 22, 0.72);
  --dock-border: rgba(255, 255, 255, 0.12);
  --text: #f4f4f5;
  --text-dim: rgba(244, 244, 245, 0.6);
  --accent: #ffffff;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow: hidden;
  background: #000;
}

/* ---------- The light ---------- */
.light {
  position: fixed;
  inset: 0;
  background: #ffffff;
  transition: background 0.25s ease;
  z-index: 0;
}

/* ---------- Chrome (logo + dock) ---------- */
.chrome {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;              /* clicks pass through empty areas */
  transition: opacity 0.5s var(--ease);
}
.chrome > * { pointer-events: auto; } /* but not the actual controls */

.chrome.hidden {
  opacity: 0;
  pointer-events: none;
}
.chrome.hidden > * { pointer-events: none; }

/* ---------- Logo ---------- */
.logo {
  position: fixed;
  top: 22px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--dock-bg);
  border: 1px solid var(--dock-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.2s var(--ease), background 0.2s ease;
}
.logo:hover { transform: translateY(-1px); background: rgba(30, 30, 34, 0.8); }

.logo-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff 0 34%, transparent 36% 60%, #fff 62% 100%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.logo-name {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.3px;
}

/* ---------- Dock ---------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 22px;
  max-width: calc(100vw - 40px);
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--dock-bg);
  border: 1px solid var(--dock-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  color: var(--text);
}

.control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.control-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  font-weight: 600;
}

/* Color control */
.color-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
}
input[type="color"] {
  width: 40px;
  height: 40px;
  border: 1px solid var(--dock-border);
  border-radius: 10px;
  background: none;
  cursor: pointer;
  padding: 0;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 7px; }
input[type="color"]::-moz-color-swatch { border: none; border-radius: 7px; }

.hex-input {
  width: 82px;
  height: 40px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--dock-border);
  border-radius: 10px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  text-align: center;
  text-transform: uppercase;
}
.hex-input:focus { outline: none; border-color: rgba(255, 255, 255, 0.4); }

/* Brightness control */
.brightness-control { min-width: 150px; justify-content: space-between; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 40px;                 /* keeps baseline aligned with other controls */
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.85));
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.85));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Preset carousel */
.carousel { display: flex; align-items: center; gap: 6px; }
.presets {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  max-width: 220px;
  padding: 2px;
  scrollbar-width: none;
}
.presets::-webkit-scrollbar { display: none; }

.preset {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--dock-border);
  cursor: pointer;
  position: relative;
  transition: transform 0.15s var(--ease), box-shadow 0.15s ease;
  overflow: hidden;
}
.preset:hover { transform: translateY(-2px); }
.preset.active {
  box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(255, 255, 255, 0.4);
}
.preset .preset-name {
  position: absolute;
  bottom: -26px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.preset:hover .preset-name { opacity: 1; }

.car-arrow {
  flex: 0 0 auto;
  width: 26px;
  height: 40px;
  border: 1px solid var(--dock-border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.car-arrow:hover { background: rgba(255, 255, 255, 0.12); }

/* Expand button */
.expand-btn {
  width: 48px;
  height: 48px;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--dock-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s var(--ease);
}
.expand-btn:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }

/* Hide cursor when chrome is hidden in fullscreen */
body.immersive.chrome-hidden { cursor: none; }

/* ---------- Responsive dock ---------- */
@media (max-width: 720px) {
  .dock {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 20px;
    bottom: 16px;
  }
  .brightness-control { min-width: 130px; }
  .presets { max-width: 160px; }
}

/* ---------- About page ---------- */
.about-body {
  overflow: auto;
  color: #e9e9ec;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(120, 130, 160, 0.18), transparent 60%),
    #0f0f11;
  min-height: 100%;
}

.about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  max-width: 760px;
  margin: 0 auto;
}
.about-header .logo { position: static; }

.back-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}
.back-link:hover { color: #fff; }

.about {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 40px;
}
.about h1 {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.about .lede {
  font-size: 18px;
  line-height: 1.6;
  color: #c8c8d0;
  margin-bottom: 12px;
}
.about-section { margin-top: 34px; }
.about-section h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.about-section p { font-size: 16px; line-height: 1.7; color: #d0d0d8; }
.about-section ol, .about-section ul {
  padding-left: 20px;
  line-height: 1.8;
  color: #d0d0d8;
}
.about-section li { margin-bottom: 4px; }

.about-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 24px 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.about-footer p { color: var(--text-dim); margin-bottom: 18px; font-size: 14px; }

.donate-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8a5b, #ff5b7f);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(255, 91, 127, 0.3);
  transition: transform 0.15s var(--ease), box-shadow 0.15s ease;
}
.donate-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 91, 127, 0.4);
}
