:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: rgba(8, 10, 16, 0.72);
  --panel-strong: rgba(13, 16, 24, 0.92);
  --text: #f8fafc;
  --muted: #aeb7c7;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #48b8ff;
  --accent-2: #8b5cf6;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

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

button,
select {
  font: inherit;
}

.gallery-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
  isolation: isolate;
}

.screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
}

.gallery-image {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  object-position: center;
  opacity: 1;
  transition: opacity 240ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-image.is-fading {
  opacity: 0;
}

.image-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.62), transparent 18%, transparent 72%, rgba(0, 0, 0, 0.72)),
    radial-gradient(circle at center, transparent 52%, rgba(0, 0, 0, 0.42));
  opacity: 0.8;
}

.empty-state {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100vw - 64px));
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  text-align: center;
  font-size: clamp(20px, 2vw, 34px);
  line-height: 1.45;
}

.empty-state strong {
  color: var(--accent);
}

.controls {
  position: absolute;
  z-index: 5;
  transition: opacity 220ms ease, transform 220ms ease;
}

.gallery-shell.controls-hidden .controls {
  opacity: 0;
  pointer-events: none;
}

.top-bar {
  top: clamp(20px, 3.5vh, 72px);
  left: clamp(24px, 4vw, 96px);
  right: clamp(24px, 4vw, 96px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: clamp(13px, 0.9vw, 18px);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 88px);
  line-height: 0.95;
  text-shadow: 0 8px 36px rgba(0, 0, 0, 0.6);
}

.meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meta span,
.hint span,
.delay-select,
button {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.meta span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: clamp(14px, 1vw, 20px);
  font-weight: 700;
}

.control-bar {
  left: 50%;
  bottom: clamp(24px, 5vh, 88px);
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(1040px, calc(100vw - 48px));
  transform: translateX(-50%);
  justify-content: center;
}

button {
  min-height: 58px;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
}

button:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.icon-button {
  width: 74px;
  min-width: 74px;
  font-size: 54px;
  line-height: 1;
}

.primary-button,
.secondary-button {
  padding: 0 28px;
  font-size: clamp(16px, 1.1vw, 22px);
  font-weight: 900;
}

.primary-button {
  border-color: rgba(72, 184, 255, 0.5);
  background: linear-gradient(135deg, rgba(72, 184, 255, 0.88), rgba(139, 92, 246, 0.86));
}

.secondary-button {
  color: #dbeafe;
}

.delay-select {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
}

.delay-select select {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  outline: none;
}

.delay-select option {
  background: #111827;
  color: #f8fafc;
}

.hint {
  left: 50%;
  bottom: 12px;
  display: flex;
  gap: 10px;
  width: min(1040px, calc(100vw - 48px));
  transform: translateX(-50%);
  justify-content: center;
  flex-wrap: wrap;
}

.hint span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .top-bar {
    flex-direction: column;
  }

  .control-bar {
    display: grid;
    grid-template-columns: 64px 1fr 64px;
  }

  .delay-select,
  .secondary-button {
    grid-column: span 3;
    justify-content: center;
  }

  .hint {
    display: none;
  }
}

@media (min-width: 3000px) {
  .primary-button,
  .secondary-button,
  .delay-select {
    min-height: 76px;
    padding-inline: 36px;
    font-size: 28px;
  }

  .icon-button {
    width: 96px;
    min-width: 96px;
    min-height: 76px;
  }

  .hint span {
    font-size: 18px;
    min-height: 36px;
    padding-inline: 14px;
  }
}
