:root {
  --slot-line: rgba(112, 188, 255, 0.22);
  --slot-fill: rgba(10, 18, 36, 0.16);
  --slot-glow: rgba(102, 182, 255, 0.15);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body.cursor-hidden,
body.cursor-hidden * {
  cursor: none !important;
}

html,
body {
  margin: 0;
  inline-size: 100%;
  block-size: 100%;
  overflow: hidden;
  background: #020307;
  font-family: Inter, system-ui, sans-serif;
}

body {
  position: relative;
}

#screen-stage {
  position: fixed;
  inset: 0;
  z-index: 10;
}

.screen {
  position: absolute;
  inset: 0;
}

.screen-scroll {
  position: absolute;
  inset: 0;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.screen-scroll::-webkit-scrollbar {
  display: none;
}

.layout-canvas {
  position: relative;
  inline-size: 100%;
  min-block-size: 100svh;
  block-size: 100svh;
}

.asset-slot {
  position: absolute;
  background:
    linear-gradient(180deg, rgba(104, 172, 255, 0.08), rgba(16, 28, 54, 0.08)),
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.08), rgba(255,255,255,0) 42%);
  border: 1px solid var(--slot-line);
  box-shadow:
    inset 0 0 18px rgba(176, 220, 255, 0.03),
    0 0 24px rgba(65, 128, 255, 0.04);
  border-radius: 24px;
  opacity: 0.58;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.asset-slot.shape-rect {
  border-radius: 0;
}

.asset-slot.theme-gold {
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 248, 196, 0.12), rgba(255,255,255,0) 38%),
    linear-gradient(180deg, rgba(255, 210, 92, 0.09), rgba(67, 36, 6, 0.08));
  border-color: rgba(255, 221, 143, 0.24);
  box-shadow: inset 0 0 18px rgba(255, 215, 110, 0.03), 0 0 24px rgba(255, 195, 57, 0.05);
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#filters-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 80;
  inline-size: 30px;
  block-size: 30px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(7, 12, 22, 0.55);
  color: rgba(232, 244, 255, 0.7);
  cursor: pointer;
  opacity: 0.28;
  transition: opacity 220ms ease, background 220ms ease, transform 220ms ease, border-color 220ms ease;
  display: grid;
  place-items: center;
}

#filters-toggle:hover,
#filters-toggle:focus-visible,
#filters-toggle[aria-expanded="true"] {
  opacity: 1;
  background: rgba(7, 12, 22, 0.88);
  border-color: rgba(255, 221, 143, 0.32);
  outline: none;
  transform: scale(1.04);
}

#filters-toggle svg {
  inline-size: 100%;
  block-size: 100%;
  display: block;
}

#filters-toggle[data-has-active="true"]::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background: #ffd76e;
  box-shadow: 0 0 6px rgba(255, 215, 110, 0.8);
}

#filters-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 79;
  inline-size: min(360px, 92vw);
  background: rgba(6, 10, 18, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-right: 1px solid rgba(255, 221, 143, 0.18);
  color: rgba(235, 245, 255, 0.92);
  font-family: Inter, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
}

#filters-panel[aria-hidden="false"] {
  transform: translateX(0);
}

.filters-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px 56px;
  border-block-end: 1px solid rgba(255, 255, 255, 0.08);
}

.filters-panel__header h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(235, 245, 255, 0.86);
  font-weight: 500;
}

.filters-panel__close {
  inline-size: 28px;
  block-size: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: transparent;
  color: rgba(232, 244, 255, 0.8);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.filters-panel__close:hover {
  background: rgba(255, 255, 255, 0.06);
}

.filters-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.filters-panel__search input {
  inline-size: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.32);
  color: #f6fbff;
  font-size: 13px;
  letter-spacing: 0.02em;
  font-family: inherit;
}

.filters-panel__search input::placeholder {
  color: rgba(232, 244, 255, 0.4);
}

.filters-panel__search input:focus {
  outline: none;
  border-color: rgba(255, 221, 143, 0.45);
  background: rgba(0, 0, 0, 0.55);
}

.filters-panel__group h3 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 244, 255, 0.55);
  font-weight: 500;
}

.filters-panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  --chip-color: 232, 244, 255;
  padding: 5px 10px;
  border: 1px solid rgba(var(--chip-color), 0.22);
  border-radius: 999px;
  background: transparent;
  color: rgba(var(--chip-color), 0.85);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 180ms, border-color 180ms, color 180ms;
}

.filter-chip::before {
  content: "";
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: rgba(var(--chip-color), 0.6);
  display: none;
}

.filter-chip.has-dot::before {
  display: inline-block;
}

.filter-chip:hover {
  background: rgba(var(--chip-color), 0.08);
  border-color: rgba(var(--chip-color), 0.45);
}

.filter-chip[aria-pressed="true"] {
  background: rgba(var(--chip-color), 0.22);
  border-color: rgba(var(--chip-color), 0.7);
  color: rgba(255, 255, 255, 0.98);
}

.filters-panel__gallery {
  padding-block-start: 14px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filters-panel__gallery h3 {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(102, 235, 255, 0.75);
  font-weight: 500;
}

.filters-panel__gallery-btn {
  padding: 9px 12px;
  border: 1px solid rgba(102, 235, 255, 0.35);
  border-radius: 6px;
  background: rgba(102, 235, 255, 0.06);
  color: rgba(186, 240, 255, 0.95);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: background 180ms, border-color 180ms, color 180ms;
}

.filters-panel__gallery-btn:hover {
  background: rgba(102, 235, 255, 0.18);
  border-color: rgba(102, 235, 255, 0.6);
}

.filters-panel__gallery-btn.is-active {
  background: rgba(255, 100, 100, 0.18);
  border-color: rgba(255, 130, 130, 0.6);
  color: #ffe0e0;
}

.filters-panel__gallery-controls {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid rgba(102, 235, 255, 0.18);
  border-radius: 6px;
  background: rgba(102, 235, 255, 0.04);
}

.filters-panel__gallery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: rgba(232, 244, 255, 0.78);
  letter-spacing: 0.04em;
}

.filters-panel__gallery-row span {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(186, 240, 255, 0.7);
}

.filters-panel__gallery-row select {
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.32);
  color: #f6fbff;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  min-inline-size: 110px;
}

.filters-panel__gallery-row select:focus {
  outline: none;
  border-color: rgba(102, 235, 255, 0.6);
}

.filters-panel__gallery-hint {
  margin: 4px 0 0;
  font-size: 10.5px;
  line-height: 1.4;
  color: rgba(232, 244, 255, 0.5);
  letter-spacing: 0.02em;
}

#autoplay-stop-indicator[hidden] {
  display: none !important;
}

#autoplay-stop-indicator {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 130, 130, 0.55);
  border-radius: 999px;
  background: rgba(20, 4, 4, 0.85);
  color: #ffd6d6;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 24px rgba(255, 60, 60, 0.25);
  opacity: 1;
  transition: opacity 350ms ease;
}

/* During autoplay, hide the stop button alongside the cursor when idle */
body.cursor-hidden #autoplay-stop-indicator {
  opacity: 0;
  pointer-events: none;
}

#autoplay-stop-indicator:hover {
  background: rgba(40, 6, 6, 0.92);
  color: #ffffff;
}

#autoplay-stop-indicator .autoplay-dot {
  inline-size: 10px;
  block-size: 10px;
  border-radius: 50%;
  background: #ff6b6b;
  box-shadow: 0 0 12px rgba(255, 90, 90, 0.85);
  animation: autoplay-pulse 1.4s ease-in-out infinite;
}

@keyframes autoplay-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.78); }
}

.filters-panel__print {
  padding-block-start: 14px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filters-panel__print h3 {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 221, 143, 0.7);
  font-weight: 500;
}

.filters-panel__print-btn {
  padding: 9px 12px;
  border: 1px solid rgba(255, 221, 143, 0.4);
  border-radius: 6px;
  background: rgba(255, 221, 143, 0.08);
  color: #ffe18a;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: background 180ms, border-color 180ms, color 180ms;
}

.filters-panel__print-btn:hover:not(:disabled) {
  background: rgba(255, 221, 143, 0.2);
  border-color: rgba(255, 221, 143, 0.65);
}

.filters-panel__print-btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.filters-panel__print-modes {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filters-panel__print-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: rgba(232, 244, 255, 0.78);
  letter-spacing: 0.03em;
  user-select: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}

.filters-panel__print-mode:hover {
  background: rgba(255, 255, 255, 0.04);
}

.filters-panel__print-mode input[type="radio"] {
  accent-color: #ffd76e;
  inline-size: 14px;
  block-size: 14px;
  cursor: pointer;
  margin: 0;
}

.filters-panel__print-mode select {
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.32);
  color: #f6fbff;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
}

.filters-panel__print-mode select:focus {
  outline: none;
  border-color: rgba(255, 221, 143, 0.55);
}

.filters-panel__print-progress {
  margin-block-start: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 221, 143, 0.22);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
  font-size: 11px;
  color: rgba(232, 244, 255, 0.85);
  letter-spacing: 0.04em;
}

.filters-panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.24);
}

.filters-panel__count {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(232, 244, 255, 0.62);
  text-transform: uppercase;
}

.filters-panel__clear {
  padding: 6px 12px;
  border: 1px solid rgba(255, 221, 143, 0.32);
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 221, 143, 0.85);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
}

.filters-panel__clear:hover {
  background: rgba(255, 221, 143, 0.12);
  color: #ffe18a;
}

@media (max-width: 480px) {
  #filters-toggle {
    top: 10px;
    left: 10px;
    inline-size: 28px;
    block-size: 28px;
  }
}
