html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #000000;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.cursor-hidden {
  cursor: none;
}

#clock {
  display: block;
  width: 100vw;
  height: 100vh;
}

#settings-toggle {
  position: fixed;
  bottom: 12px;
  left: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 20, 20, 0.9);
  color: #f5f5f5;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 20;
}

#slideshow-toggle {
  position: fixed;
  bottom: 12px;
  left: 76px; /* 44px button width + 20px padding from settings button */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 20, 20, 0.9);
  padding: 4px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 20;
}

#slideshow-toggle:active {
  transform: scale(0.96);
}

#handstyle-toggle {
  position: fixed;
  bottom: 12px;
  left: 140px; /* 44px slideshow button width + 20px padding */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 20, 20, 0.9);
  color: #f5f5f5;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 20;
}

#handstyle-toggle:active {
  transform: scale(0.96);
}

#bgcolor-toggle {
  position: fixed;
  bottom: 12px;
  left: 204px; /* 44px handstyle button width + 20px padding */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 20, 20, 0.9);
  color: #f5f5f5;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 20;
}

#bgcolor-toggle:active {
  transform: scale(0.96);
}

#seconds-toggle {
  position: fixed;
  bottom: 12px;
  left: 268px; /* 44px bgcolor button width + 20px padding */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 20, 20, 0.9);
  color: #f5f5f5;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 20;
}

#seconds-toggle:active {
  transform: scale(0.96);
}

#seconds-toggle.active {
  background: #f5f5f5;
  color: #111111;
}

#fullscreen-toggle {
  position: fixed;
  bottom: 12px;
  left: 332px; /* 44px seconds button width + 20px padding */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 20, 20, 0.9);
  color: #f5f5f5;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 20;
}

#fullscreen-toggle:active {
  transform: scale(0.96);
}

#fullscreen-toggle.active {
  background: #f5f5f5;
  color: #111111;
}

#face-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

#settings-toggle:active {
  transform: scale(0.96);
}

#settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 30;
}

#settings-overlay.hidden {
  display: none;
}

#settings-panel {
  width: 100%;
  max-width: 480px;
  background: rgba(18, 18, 18, 0.7);
  color: #f5f5f5;
  border-radius: 16px 16px 0 0;
  padding: 12px 16px 16px;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.7);
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 8px;
  cursor: grab;
}

.settings-header:active {
  cursor: grabbing;
}

#settings-close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 18px;
  padding: 4px;
  cursor: pointer;
}

.settings-section {
  margin-top: 8px;
}

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
  margin-bottom: 6px;
}

.button-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.face-btn,
.hand-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #1d1d1d;
  color: #f5f5f5;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
}

.face-btn.selected,
.hand-btn.selected {
  background: #f5f5f5;
  color: #111111;
  border-color: #f5f5f5;
}

.opacity-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #1d1d1d;
  color: #f5f5f5;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
}

.opacity-btn.selected {
  background: #f5f5f5;
  color: #111111;
  border-color: #f5f5f5;
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}

.swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0;
  cursor: pointer;
}

.swatch.selected {
  outline: 2px solid #ffffff;
  outline-offset: 1px;
}

.toggle-row {
  display: flex;
  align-items: center;
  margin-top: 10px;
  font-size: 13px;
}

.toggle-row input {
  margin-right: 6px;
}

@media (min-width: 600px) {
  #settings-panel {
    border-radius: 16px;
    margin-bottom: 24px;
  }
}

