:root {
  --bg: #090909;
  --bg-soft: #121212;
  --surface: rgba(22, 22, 22, 0.92);
  --surface-alt: rgba(31, 31, 31, 0.92);
  --surface-strong: #1b1b1b;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f6f6f6;
  --muted: #a6a6a6;
  --accent: #ff3b30;
  --accent-strong: #ff5a52;
  --accent-soft: rgba(255, 59, 48, 0.16);
  --green: #1db954;
  --error: #ff6257;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 59, 48, 0.18), transparent 24%),
    radial-gradient(circle at right center, rgba(255, 255, 255, 0.06), transparent 22%),
    linear-gradient(145deg, #050505 0%, #101010 46%, #160808 100%);
}

a {
  color: inherit;
}

.shell,
.screen-layout {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.shell {
  display: grid;
  gap: 18px;
  padding: 28px 0 40px;
}

.shell-wide {
  width: min(1440px, calc(100% - 32px));
}

.shell-narrow {
  width: min(580px, calc(100% - 20px));
}

.hero {
  padding: 16px 2px 2px;
}

.hero-grid {
  display: grid;
  gap: 8px;
}

.hero-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.hero-actions {
  flex-shrink: 0;
}

.compact {
  padding-bottom: 0;
}

.eyebrow,
.track-kicker,
.message-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.7);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.94;
  margin-bottom: 10px;
}

h2 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  margin-bottom: 8px;
}

h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.intro,
.muted,
.detail,
li {
  color: var(--muted);
  line-height: 1.55;
}

.card,
.screen-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    var(--surface);
  box-shadow: var(--shadow);
}

.card {
  padding: 22px;
}

.panel-compact {
  padding: 18px;
}

.mobile-card {
  padding: 18px;
}

.request-form,
.queue-list,
.history-list,
.stats-grid,
.settings-form,
.up-next-list,
.manual-entry-grid {
  display: grid;
  gap: 14px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
}

input,
textarea,
button,
.secondary-button {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 11px 12px;
  font: inherit;
}

input,
textarea {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

textarea {
  resize: vertical;
}

button,
.secondary-button,
.ghost-button {
  cursor: pointer;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease, border-color 150ms ease;
}

button,
.secondary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.secondary-button {
  width: auto;
  background: rgba(255, 255, 255, 0.08);
}

.ghost-button {
  width: auto;
  padding: 11px 12px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

button:disabled,
.ghost-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.toggle-field {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.toggle-field input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.section-header,
.section-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-actions {
  flex-wrap: wrap;
}

.dashboard-card,
.settings-card,
.queue-card,
.history-card {
  overflow: hidden;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card,
.queue-item,
.history-item,
.up-next-item,
.hero-track,
.message-card,
.search-result-item {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    var(--surface-alt);
}

.stat-card {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.stat-card strong {
  font-size: 2rem;
  font-family: Georgia, "Times New Roman", serif;
}

.dj-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.4fr 0.9fr;
}

.dj-grid-main {
  align-items: start;
  grid-template-columns: 1.8fr 0.7fr;
}

.dj-grid-settings {
  grid-template-columns: 1.3fr 0.7fr;
}

.queue-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 18px 18px;
  position: relative;
}

.queue-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 22px 0 0 22px;
  background: rgba(255, 255, 255, 0.12);
}

.queue-item[data-status="pending"]::before {
  background: #ffb020;
}

.queue-item[data-status="accepted"]::before {
  background: var(--green);
}

.queue-item[data-status="playing"]::before {
  background: var(--accent);
}

.queue-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.queue-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 8px;
  max-width: 240px;
}

.selfie-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.selfie-preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.selfie-preview span {
  color: var(--muted);
  font-size: 0.86rem;
}

.history-list {
  max-height: 920px;
  overflow: auto;
}

.queue-card {
  min-height: 680px;
}

.history-item {
  padding: 14px;
}

.search-field,
.selected-song,
.search-results {
  display: grid;
  gap: 10px;
}

.selected-song {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(29, 185, 84, 0.1);
  border: 1px solid rgba(29, 185, 84, 0.22);
}

.inline-text-button {
  padding: 0;
  width: auto;
  background: transparent;
  border: 0;
  text-decoration: underline;
}

.search-result-item {
  text-align: left;
  padding: 14px;
}

.search-result-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.search-result-cover {
  width: 56px;
  height: 56px;
  margin-top: 10px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-empty,
.empty-state {
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.manual-entry {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.manual-entry summary {
  cursor: pointer;
  font-weight: 700;
}

.form-message[data-state="success"] {
  color: var(--green);
}

.form-message[data-state="error"] {
  color: var(--error);
}

.screen-page {
  position: relative;
  overflow: hidden;
  background: #050505;
}

.screen-color-wash {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 118, 87, 0.34), transparent 24%),
    radial-gradient(circle at 82% 24%, rgba(255, 208, 94, 0.2), transparent 22%),
    radial-gradient(circle at 48% 82%, rgba(255, 97, 156, 0.2), transparent 24%);
  mix-blend-mode: screen;
  animation: washMove 18s ease-in-out infinite;
}

.background-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  filter: saturate(1.15) contrast(1.02);
}

.screen-page::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 59, 48, 0.22), transparent 24%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.64));
  pointer-events: none;
}

.screen-rotator {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.screen-slide {
  display: none;
  min-height: 100vh;
  position: relative;
}

.screen-slide-active {
  display: block;
}

.screen-slide-underlay {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
}

.screen-slide[data-slide="promo"] {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.screen-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 100vh;
  padding: 18px;
}

.screen-panel {
  position: relative;
  padding: 26px;
  background: rgba(11, 11, 11, 0.66);
  backdrop-filter: blur(10px);
}

.now-playing-panel-full {
  min-height: calc(100vh - 36px);
  display: grid;
  align-content: space-between;
}

.screen-topbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.screen-event-title,
.screen-video-title {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.74);
}

.screen-video-title {
  align-self: center;
  justify-self: end;
}

.screen-fullscreen-button {
  width: auto;
  background: rgba(255, 255, 255, 0.08);
}

.hero-track {
  padding: 36px 42px;
  max-width: 1080px;
  align-self: center;
  position: relative;
  overflow: hidden;
}

.hero-track h1 {
  margin-bottom: 14px;
  font-size: clamp(3.1rem, 6vw, 6.2rem);
}

.hero-track::before {
  content: "";
  position: absolute;
  inset: -20% auto auto -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 59, 48, 0.18), transparent 70%);
  filter: blur(10px);
  animation: driftGlow 9s ease-in-out infinite;
}

.hero-track-live {
  animation: liftIn 700ms ease;
}

.hero-track-idle {
  opacity: 0.9;
}

.animated-title {
  animation: softRise 900ms ease, titleGlow 4.5s ease-in-out infinite;
}

.animated-row {
  animation: softRise 1.2s ease;
}

.live-pulse {
  width: 14px;
  height: 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
  animation: pulseDot 1.8s ease infinite;
}

.track-meta {
  font-size: 1.28rem;
  color: rgba(255, 255, 255, 0.86);
}

.track-note {
  margin-top: 20px;
  max-width: 30ch;
  font-size: 1.2rem;
}

.now-playing-selfie {
  width: 336px;
  height: 336px;
  object-fit: cover;
  animation: softRise 1s ease;
}

.photo-frame {
  display: inline-grid;
  gap: 10px;
  margin-top: 24px;
}

.photo-frame-large {
  margin-top: 0;
}

  .photo-frame-inner {
  padding: 16px 16px 42px;
  background: linear-gradient(180deg, #faf4eb 0%, #fff 100%);
  border-radius: 30px;
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}

.photo-frame img {
  display: block;
  border-radius: 20px;
}

.photo-frame figcaption {
  justify-self: end;
  margin-right: 10px;
  color: #fff0ec;
  font-family: "Brush Script MT", "Lucida Handwriting", cursive;
  font-size: clamp(1.3rem, 2vw, 2rem);
  letter-spacing: 0.03em;
}

.up-next-list {
  align-content: start;
}

.up-next-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 16px;
}

.badge {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 700;
}

.message-overlay {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  max-width: 720px;
}

.message-card {
  padding: 20px 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(28, 16, 16, 0.92);
  border: 1px solid rgba(255, 90, 82, 0.28);
  display: grid;
  gap: 14px;
  animation: softRise 500ms ease, messageGlow 5s ease-in-out infinite;
}

.message-body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.3rem, 2.8vw, 2.3rem);
  line-height: 1.18;
}

.message-selfie {
  width: 120px;
  height: 120px;
  object-fit: cover;
}

  .message-photo-frame {
  margin-top: 6px;
}

.corner-qr {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 4;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 12px;
  border-radius: 22px;
  background: rgba(14, 14, 14, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.corner-qr img {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.corner-qr span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
}

.promo-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  gap: 24px;
  padding: 50px;
  background: rgba(5, 5, 5, 0.76);
  backdrop-filter: blur(16px);
  text-align: center;
}

.promo-copy {
  display: grid;
  justify-items: center;
  text-align: center;
}

.promo-copy h1 {
  max-width: none;
}

.promo-message {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
  margin-bottom: 16px;
  animation: softRise 700ms ease, promoBounce 7s ease-in-out infinite;
}

.promo-url {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.promo-ticker-wrap {
  overflow: hidden;
  margin: 20px 0 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 0;
}

.promo-ticker {
  white-space: nowrap;
  display: inline-block;
  min-width: 100%;
  color: rgba(255, 255, 255, 0.74);
  animation: tickerMove 16s linear infinite;
}

.bottom-ticker-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  overflow: hidden;
  padding: 10px 0;
  background: linear-gradient(90deg, rgba(255, 82, 82, 0.8), rgba(255, 176, 64, 0.78), rgba(255, 82, 82, 0.8));
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.bottom-ticker-bar .promo-ticker {
  color: #fff;
  font-weight: 700;
}

.thank-you-card {
  background:
    radial-gradient(circle at top right, rgba(255, 176, 64, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    var(--surface);
}

.latest-requests-list {
  display: grid;
  gap: 10px;
}

.latest-request-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.latest-request-item span {
  color: var(--muted);
}

.promo-qr-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.promo-qr {
  width: min(440px, 38vw);
  aspect-ratio: 1;
  border-radius: 28px;
  background: #fff;
  padding: 20px;
  animation: qrFloat 4s ease-in-out infinite;
}

.montage-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 28px;
  align-items: center;
  padding: 42px;
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(14px);
}

.montage-photo {
  min-height: 70vh;
  display: grid;
  place-items: center;
}

.montage-photo img {
  width: min(72vh, 100%);
  max-height: 76vh;
  object-fit: cover;
  animation: montageZoom 8s ease-in-out forwards;
}

.montage-caption {
  align-self: end;
}

.montage-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1.08;
}

@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(255, 59, 48, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
  }
}

@keyframes softRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes driftGlow {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(36px, 20px) scale(1.08);
  }
}

@keyframes qrFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes tickerMove {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes liftIn {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes montageZoom {
  from {
    opacity: 0.7;
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes titleGlow {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    text-shadow: 0 0 26px rgba(255, 214, 120, 0.28);
  }
}

@keyframes promoBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes messageGlow {
  0%,
  100% {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  }
  50% {
    box-shadow: 0 24px 70px rgba(255, 104, 144, 0.18);
  }
}

@keyframes washMove {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -16px, 0) scale(1.05);
  }
}

@media (max-width: 1100px) {
  .dj-grid,
  .dj-grid-main,
  .dj-grid-settings,
  .screen-layout,
  .field-grid,
  .field-grid-3,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-topbar {
    flex-direction: column;
  }

  .queue-item {
    grid-template-columns: 1fr;
  }

  .queue-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .screen-topbar {
    grid-template-columns: 1fr;
  }

  .promo-layout {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .montage-layout {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}

@media (max-width: 720px) {
  .shell,
  .screen-layout {
    width: min(100% - 18px, 1240px);
  }

  .card,
  .screen-panel {
    padding: 18px;
  }

  .hero-track h1 {
    font-size: clamp(2.4rem, 10vw, 3.7rem);
  }

  .message-overlay {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .corner-qr {
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
  }

  .corner-qr img {
    width: 72px;
    height: 72px;
  }
}