:root {
  --pm-red: #f21f4b;
  --pm-red-dark: #b70f32;
  --pm-pink: #ff4f8f;
  --pm-yellow: #fff24d;
  --pm-cyan: #41d9ff;
  --bg: #09070d;
  --panel: rgba(15, 14, 22, 0.82);
  --panel-solid: #15131d;
  --line: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: #bbb8c8;
  --danger: #ff4567;
  --success: #61ffa1;
  --event-primary: #f21f4b;
  --event-accent: #41d9ff;
  --event-bg: #09070d;
  --display-font-scale: 1;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
.outline-link {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  color: #130912;
  background: linear-gradient(135deg, var(--pm-yellow), #ffb347);
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.outline-link:hover {
  filter: brightness(1.05);
}

button:disabled {
  cursor: progress;
  opacity: 0.62;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

input[type="color"] {
  padding: 4px;
}

textarea {
  padding: 12px;
  resize: vertical;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--pm-yellow);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-text {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.status-text[data-type="success"] {
  color: var(--success);
}

.status-text[data-type="error"] {
  color: #ff92a5;
}

.audience-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 18% 18%, rgba(242, 31, 75, 0.48), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(65, 217, 255, 0.3), transparent 24%),
    radial-gradient(circle at 48% 84%, rgba(255, 242, 77, 0.14), transparent 28%),
    linear-gradient(135deg, #09070d, #17101f 45%, #08060b);
  overflow: hidden;
}

.audience-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 250ms ease;
}

.audience-background.has-image {
  opacity: 0.46;
}

.audience-page[data-theme="elegant-gold"] {
  --event-primary: #d7aa3f;
  --event-accent: #fff3bd;
  --event-bg: #080705;
  background:
    radial-gradient(circle at 18% 14%, rgba(215, 170, 63, 0.34), transparent 28%),
    radial-gradient(circle at 84% 78%, rgba(255, 243, 189, 0.14), transparent 30%),
    linear-gradient(135deg, #050403, #15100a 54%, #060504);
}

.audience-page[data-theme="clean-minimal"] {
  --event-primary: #f21f4b;
  --event-accent: #111827;
  --event-bg: #f6f7fb;
  color: #111827;
  background:
    radial-gradient(circle at 82% 12%, rgba(242, 31, 75, 0.12), transparent 30%),
    linear-gradient(135deg, #ffffff, #eef2f7);
}

.audience-page[data-theme="festival-pop"] {
  --event-primary: #ff3d7f;
  --event-accent: #23d18b;
  --event-bg: #171022;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 61, 127, 0.42), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(35, 209, 139, 0.36), transparent 28%),
    radial-gradient(circle at 48% 82%, rgba(255, 214, 66, 0.28), transparent 30%),
    linear-gradient(135deg, #120a1f, #261032);
}

.audience-page[data-theme="cyber-glass"] {
  --event-primary: #65f7ff;
  --event-accent: #a78bfa;
  --event-bg: #05080d;
  background:
    radial-gradient(circle at 16% 24%, rgba(101, 247, 255, 0.34), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(167, 139, 250, 0.28), transparent 30%),
    linear-gradient(135deg, #03060a, #09111f 48%, #04070c);
}

.audience-page::before {
  position: fixed;
  inset: 0;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, transparent, black 22%, black 78%, transparent);
  pointer-events: none;
}

.audience-shell {
  position: relative;
  width: min(100%, 430px);
}

.audience-card,
.admin-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.audience-card {
  padding: 26px;
}

.audience-hero {
  display: grid;
  gap: 16px;
}

.event-logo {
  width: min(230px, 72%);
  max-height: 96px;
  object-fit: contain;
  object-position: left center;
}

.brand-text {
  color: #fff;
  font-size: clamp(2.35rem, 11vw, 4.1rem);
  font-weight: 900;
  line-height: 0.92;
  text-transform: uppercase;
}

.brand-text::first-line {
  color: var(--event-primary);
}

.event-subtitle {
  max-width: 32ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.42;
}

.mode-pill {
  display: inline-flex;
  margin: 18px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--event-accent);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 900;
}

.audience-preview {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-left: 4px solid var(--event-primary);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.1);
}

.audience-preview strong {
  color: var(--event-accent);
  font-size: 0.9rem;
}

.audience-preview p {
  margin: 5px 0 0;
  color: var(--text);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.audience-page[data-bubble="solid"] .audience-preview {
  background: color-mix(in srgb, var(--event-primary), #101018 78%);
}

.audience-page[data-bubble="outline"] .audience-preview {
  background: transparent;
}

.audience-page[data-theme="clean-minimal"] .audience-card {
  background: rgba(255, 255, 255, 0.84);
}

.audience-page[data-theme="clean-minimal"] .brand-text,
.audience-page[data-theme="clean-minimal"] .audience-preview p {
  color: #111827;
}

.audience-page[data-theme="clean-minimal"] input,
.audience-page[data-theme="clean-minimal"] textarea,
.audience-page[data-theme="clean-minimal"] select {
  color: #111827;
  background: rgba(17, 24, 39, 0.06);
}

.message-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.reaction-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.reaction-row button {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-bottom span {
  color: var(--muted);
  font-weight: 900;
}

.admin-page {
  min-height: 100vh;
  padding: 24px;
  background: #0d0b12;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1240px, 100%);
  margin: 0 auto 20px;
}

.admin-header h1,
.admin-card h2 {
  margin: 0;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.outline-link,
.neutral-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.admin-main {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.login-card {
  max-width: 480px;
  padding: 22px;
}

.login-form,
.settings-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.dashboard {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
}

.settings-column {
  display: grid;
  align-self: start;
  gap: 18px;
}

.admin-card {
  padding: 18px;
}

.card-heading {
  margin-bottom: 14px;
}

.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.danger-zone {
  display: grid;
  gap: 10px;
}

.warning-button {
  color: #130912;
  background: linear-gradient(135deg, #ffd05a, #ff9f43);
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

.messages-column {
  min-height: 680px;
}

.messages-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.message-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.message-stats span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  font-weight: 900;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.filter-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.filter-tabs button.active {
  color: #120811;
  background: var(--pm-yellow);
}

.message-list {
  display: grid;
  gap: 12px;
}

.admin-message {
  border: 1px solid var(--line);
  border-left: 4px solid var(--pm-yellow);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.admin-message[data-status="approved"] {
  border-left-color: var(--success);
}

.admin-message[data-status="rejected"],
.admin-message[data-status="arsip"] {
  border-left-color: var(--danger);
}

.admin-message-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.admin-message-top span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-message p {
  margin: 10px 0 14px;
  font-size: 1.05rem;
  line-height: 1.45;
}

.admin-message footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-message footer button {
  min-height: 36px;
  padding: 0 12px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 26px;
  color: var(--muted);
  text-align: center;
}

.display-page {
  width: 100vw;
  min-height: 100vh;
  overflow: hidden;
  background: transparent;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: #ffffff;
  transition: opacity 350ms ease;
}

.splash-screen img {
  width: min(560px, 72vw);
  animation: splashPulse 1.8s ease-in-out infinite;
}

@keyframes splashPulse {
  50% {
    transform: scale(1.035);
    opacity: 0.86;
  }
}

.display-stage {
  position: relative;
  display: grid;
  width: 100vw;
  min-height: 100vh;
  padding: clamp(18px, 3vw, 48px);
}

.display-stage.background-dark {
  background:
    radial-gradient(circle at 18% 20%, rgba(242, 31, 75, 0.36), transparent 28%),
    radial-gradient(circle at 84% 16%, rgba(65, 217, 255, 0.2), transparent 24%),
    linear-gradient(135deg, #09070d, #17101f 48%, #08060b);
}

.display-stage.background-transparent {
  background: transparent;
}

.display-stage.background-solid {
  background: var(--event-bg);
}

.display-stage.background-gradient {
  background:
    radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--event-primary), transparent 58%), transparent 30%),
    radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--event-accent), transparent 68%), transparent 28%),
    linear-gradient(135deg, var(--event-bg), #0d0b12);
}

.display-stage.background-image {
  background-position: center;
  background-size: cover;
}

.display-stage.background-image::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0.48);
}

.display-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(11, 10, 16, 0.72);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.background-transparent .display-panel {
  background: rgba(11, 10, 16, 0.58);
}

.layout-sidebar.position-right {
  justify-items: end;
}

.layout-sidebar.position-left {
  justify-items: start;
}

.layout-sidebar .display-panel {
  width: min(460px, 38vw);
  height: calc(100vh - clamp(18px, 3vw, 48px) * 2);
}

.layout-wall {
  place-items: stretch;
}

.layout-wall .display-panel {
  width: 100%;
  height: calc(100vh - clamp(18px, 3vw, 48px) * 2);
}

.display-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.06);
}

.display-logo {
  width: auto;
  max-width: 138px;
  max-height: 42px;
  object-fit: contain;
  object-position: left center;
}

.display-title span {
  color: var(--event-accent);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.display-title strong {
  color: #fff;
  font-size: 1rem;
  text-transform: uppercase;
}

.display-feed {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
}

.layout-wall .display-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-content: end;
}

.display-message {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-left: 4px solid var(--event-primary);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.1);
  animation: messageIn var(--message-speed, 260ms) ease both;
}

.speed-slow {
  --message-speed: 520ms;
}

.speed-normal {
  --message-speed: 260ms;
}

.speed-fast {
  --message-speed: 140ms;
}

.bubble-solid .display-message {
  background: color-mix(in srgb, var(--event-primary), #0b0a10 78%);
}

.bubble-outline .display-message {
  background: rgba(0, 0, 0, 0.18);
}

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

.display-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.display-message strong {
  color: var(--event-accent);
  font-size: calc(clamp(0.95rem, 1.4vw, 1.25rem) * var(--display-font-scale));
}

.display-message span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.74rem;
  font-weight: 900;
}

.display-message p {
  margin: 6px 0 0;
  color: #fff;
  font-size: calc(clamp(1rem, 1.65vw, 1.55rem) * var(--display-font-scale));
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.layout-wall .display-message p {
  font-size: clamp(1.3rem, 2.7vw, 3rem);
}

.layout-lower-third {
  align-items: end;
  justify-items: center;
}

.layout-lower-third .display-panel {
  width: min(1180px, 92vw);
  max-height: 34vh;
}

.layout-lower-third .display-feed {
  flex-direction: row;
  align-items: end;
}

.layout-lower-third .display-message:not(:last-child) {
  display: none;
}

.layout-lower-third .display-message {
  width: 100%;
}

.layout-ticker {
  align-items: end;
}

.layout-ticker .display-panel {
  width: 100%;
  height: auto;
}

.layout-ticker .display-title {
  display: none;
}

.layout-ticker .display-feed {
  display: block;
  padding: 0;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 16px;
  padding: 14px;
  animation: tickerMove 26s linear infinite;
}

.speed-slow .ticker-track {
  animation-duration: 38s;
}

.speed-fast .ticker-track {
  animation-duration: 16s;
}

.layout-ticker .display-message {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.layout-ticker .display-message-meta {
  gap: 12px;
}

.layout-ticker .display-message p {
  margin: 0;
  white-space: nowrap;
}

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

.layout-spotlight {
  place-items: center;
}

.layout-spotlight .display-panel {
  width: min(980px, 86vw);
  min-height: 320px;
}

.layout-spotlight .display-feed {
  place-content: center;
}

.layout-spotlight .display-message:not(:last-child) {
  display: none;
}

.layout-spotlight .display-message {
  border-left-width: 0;
  text-align: center;
}

.layout-spotlight .display-message p {
  font-size: calc(clamp(2rem, 5vw, 5rem) * var(--display-font-scale));
}

.layout-bubbles .display-panel {
  width: 100%;
  height: calc(100vh - clamp(18px, 3vw, 48px) * 2);
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.layout-bubbles .display-title {
  display: none;
}

.layout-bubbles .display-feed {
  position: relative;
}

.layout-bubbles .display-message {
  width: min(420px, 34vw);
  animation: bubbleFloat 8s ease-in-out infinite alternate;
}

.layout-bubbles .display-message:nth-child(3n + 1) {
  align-self: flex-start;
}

.layout-bubbles .display-message:nth-child(3n + 2) {
  align-self: center;
}

.layout-bubbles .display-message:nth-child(3n) {
  align-self: flex-end;
}

@keyframes bubbleFloat {
  to {
    transform: translateY(-18px);
  }
}

.logo-corner .display-logo {
  position: fixed;
  right: 32px;
  top: 28px;
  z-index: 3;
  max-width: 180px;
  max-height: 72px;
}

.logo-header .display-title {
  grid-template-columns: auto 1fr auto;
}

.empty-display p {
  color: var(--muted);
}

@media (max-width: 820px) {
  .dashboard,
  .two-fields {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .messages-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .layout-sidebar .display-panel {
    width: min(100%, 460px);
  }

  .form-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .form-bottom button {
    width: 100%;
  }
}
