/* Minimal, projector-friendly styles. No external deps. */
:root {
  --bg: #0b1220;
  --panel: #0f172a;
  --text: #e5e7eb;
  --muted: #a1a1aa;
  --accent: #60a5fa;
  --danger: #dc2626;
  --warn: #d97706;
  --ok: #059669;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(1000px 600px at 50% 30%, #111827 0%, var(--bg) 60%);
  color: var(--text);
  overflow: hidden;
}

.controls {
  position: fixed;
  inset: 0 0 auto 0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 23, 42, .85);
  backdrop-filter: blur(12px);
  transform: translateY(-100%);
  /* Completely hidden */
  transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.controls:hover,
.controls:focus-within,
.controls-trigger:hover+.controls,
.controls:has(+ .controls-trigger:hover) {
  transform: translateY(0);
}

.logo {
  height: auto;
  object-fit: contain;
}

.logo--header {
  width: 44px;
}

.logo--modal {
  width: 120px;
  margin-bottom: 20px;
}

.controls__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 800;
  letter-spacing: .08em;
  font-size: 14px;
  opacity: .9;
}

.sep {
  opacity: .4
}

.status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.controls__right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .07);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .2);
}

.btn:active {
  transform: scale(0.97)
}

.btn.primary {
  background: var(--accent);
  color: #000;
  border: none;
  font-weight: 700;
}

.btn.primary:hover {
  background: #93c5fd;
}

.btn.danger {
  background: rgba(248, 113, 113, .15);
  border-color: rgba(248, 113, 113, .3);
  color: #fca5a5;
}

.btn.danger:hover {
  background: rgba(248, 113, 113, .25);
}

.iconbtn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background 0.2s;
}

.iconbtn:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--text);
}

.screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 84px 24px 64px;
  gap: 32px;
  position: relative;
  z-index: 5;
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

.clock {
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(229, 231, 235, .7);
}

.countdown {
  font-size: clamp(80px, 14vw, 220px);
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.4);
  text-stroke: 1.5px rgba(0, 0, 0, 0.4);
  color: var(--text);
}

.countdown.warn {
  color: var(--warn);
  text-shadow: 0 0 40px rgba(251, 191, 36, 0.3);
}

.countdown.danger {
  color: var(--danger);
  text-shadow: 0 0 40px rgba(248, 113, 113, 0.3);
}

.countdown.ok {
  color: var(--ok);
  text-shadow: 0 0 40px rgba(52, 211, 153, 0.2);
}

.subline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 500;
}

.info {
  width: min(1000px, 92vw);
  background: rgba(15, 23, 42, .4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.info.hidden {
  display: none
}

.info__title {
  font-size: clamp(20px, 2.6vw, 40px);
  font-weight: 800;
  margin-bottom: 8px;
}

.info__meta {
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 24px);
  font-weight: 600;
}

.info__notes {
  margin-top: 16px;
  font-size: clamp(14px, 1.6vw, 24px);
  opacity: .85;
  white-space: pre-wrap;
  background: rgba(255, 255, 255, .03);
  padding: 12px;
  border-radius: 12px;
}

.hint {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.6;
  pointer-events: none;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hint b {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  margin: 0 2px;
}

.contact-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.8;
  letter-spacing: 0.02em;
}

.contact-header span {
  color: var(--accent);
  margin-left: 4px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, .85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.visible {
  opacity: 1;
  visibility: visible;
}

.modal.hidden {
  display: none;
}

.modal__card {
  width: min(600px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 24px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  padding: 0;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.visible .modal__card {
  transform: scale(1);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  position: sticky;
  top: 0;
  background: #0f172a;
  z-index: 10;
}

.modal__head h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0;
  opacity: 0.8;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.field.full {
  grid-column: 1 / -1
}

.field__label {
  color: rgba(229, 231, 235, .6);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  background: rgba(2, 6, 23, .6);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(2, 6, 23, .8);
}

.row {
  display: flex;
  gap: 12px;
  align-items: center
}

.warning-row {
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: 12px;
}

.tiny-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.tiny-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.preset-actions {
  margin-top: 4px;
}

.preset-actions input {
  flex: 1;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.btn-large {
  padding: 14px;
  font-size: 16px;
}

.footerHelp {
  padding: 16px 24px 24px;
  color: rgba(161, 161, 170, .6);
  font-size: 12px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.toggleRow {
  display: flex;
  gap: 12px;
}

.toggle {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03);
  color: rgba(229, 231, 235, .8);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle:has(input:checked) {
  background: rgba(96, 165, 250, .1);
  border-color: rgba(96, 165, 250, .3);
  color: var(--accent);
}

.toggle input {
  display: none;
}

.mutedBlock {
  opacity: 0.3;
  pointer-events: none;
  filter: grayscale(1);
}

/* Background wave animation */
.bgLayer {
  position: fixed;
  inset: 0;
  background-image: url("assets/calm-waves.gif");
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 0;
  pointer-events: none;
}

.bgLayer.on {
  opacity: 0.35;
  filter: contrast(1.1) saturate(1.2);
}

.bgLayer.logo-mode {
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.45;
}

/* Background Navigation */
.nav-trigger {
  position: fixed;
  top: 60px;
  bottom: 0;
  width: 100px;
  z-index: 98;
}

.nav-trigger--left {
  left: 0;
}

.nav-trigger--right {
  right: 0;
}

.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%) translateX(20px);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn svg {
  width: 28px;
  height: 28px;
}

.nav-btn--left {
  left: 20px;
  transform: translateY(-50%) translateX(-20px);
}

.nav-btn--right {
  right: 20px;
  transform: translateY(-50%) translateX(20px);
}

.nav-trigger:hover+.nav-btn,
.nav-btn:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.nav-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--accent);
  scale: 1.1;
}

.nav-btn:active {
  scale: 0.95;
}

/* Text Readability Outline */
.clock,
.countdown,
.subline,
.info__title,
.info__meta,
.info__notes {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
}

.logo-wm {
  position: fixed;
  bottom: 30px;
  width: 140px;
  height: 140px;
  opacity: 0.05;
  z-index: 1;
  pointer-events: none;
}

.wm-left {
  left: 30px;
}

.wm-right {
  right: 30px;
  transform: scaleX(-1);
}

/* Progress Bar */
.progress-container {
  width: min(800px, 80vw);
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  margin: 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  display: none; /* Hidden until timer starts */
}

.progress-container.visible {
  display: block;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
  transition: width 0.3s linear, background-color 0.3s ease;
  border-radius: 10px;
}

/* Scrollbar styles */
.modal__card::-webkit-scrollbar {
  width: 8px;
}

.modal__card::-webkit-scrollbar-track {
  background: rgba(2, 6, 23, 0.3);
}

.modal__card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.modal__card::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.color-swatches {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 50px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  appearance: none;
  padding: 0;
}

.color-swatch:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.color-swatch.selected {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr
  }

  .controls {
    transform: translateY(0);
    padding: 8px 12px;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .modal__card {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}