:root {
  --bg-deep: #0d1f2d;
  --bg-mid: #12324a;
  --bg-soft: #f0ede6;
  --ink: #132028;
  --ink-soft: #304754;
  --accent: #fca311;
  --accent-2: #2a9d8f;
  --panel: rgba(255, 255, 255, 0.88);
  --border: rgba(19, 32, 40, 0.12);
  --shadow: 0 24px 70px rgba(8, 25, 39, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 20%, #12222e, transparent 40%),
    radial-gradient(circle at 80% 10%, #504c27, transparent 35%),
    linear-gradient(130deg, #000, var(--bg-mid));
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

img {
  max-width: 100%;
  height: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
  position: relative;
  z-index: 2;
}

.topbar-brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar-brand-image {
  width: auto;
  height: 46px;
  max-width: 180px;
  border-radius: 6px;
  display: block;
}

.brand {
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-sub {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  line-height: 1.35;
  word-break: break-word;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 0.65rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  margin-left: 0;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-link.active,
.nav-link:hover {
  color: #fff;
}

.hero,
.admin-header,
.grid-section,
.form-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(3px);
}

.hero {
  margin: 1rem 0 1.5rem;
  padding: 2rem;
  background: rgba(255, 244, 204, 0.9);
}

.hero-now-playing {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  overflow: hidden;
}

.hero-now-playing > h2 {
  flex: 0 0 100%;
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.hero-now-playing-content {
  min-width: 0;
  flex: 1;
}

.now-playing-main {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.now-playing-left {
  flex: 1;
  min-width: 0;
}

.now-playing-right {
  min-width: 220px;
  max-width: 260px;
  text-align: right;
}

.now-playing-right .chips {
  justify-content: flex-end;
}

.now-playing-right .meta {
  margin-top: 0.6rem;
}

.hero-poster {
  width: auto;
  height: auto;
  max-height: 200px;
  max-width: 100%;
  flex: 0 0 auto;
  align-self: flex-start;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin: 0;
  object-fit: contain;
}

.hero-poster.js-poster-popout,
.poster-image.js-poster-popout {
  cursor: zoom-in;
}

.eyebrow {
  margin: 0;
  color: var(--accent-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.85rem;
}

h1,
h2,
h3 {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.03em;
  margin: 0.35rem 0 0.75rem;
  font-weight: 400;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
}

#now-playing-title {
  font-size: clamp(1.25rem, 9vw, 2.8rem);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.1;
  max-width: 100%;
}

#now-playing-meta,
#now-playing-description,
#now-playing-times,
#now-playing-prices,
#now-playing-buy {
  overflow-wrap: anywhere;
  word-break: break-word;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.meta,
.description {
  color: var(--ink-soft);
  max-width: 72ch;
}

.description {
  margin-bottom: 1.2rem;
}

.hero-chips {
  margin-bottom: 0.8rem;
}

.section-label {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.showtime-label-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.format-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.25rem 0 0.55rem;
}

.format-toolbar .btn-small {
  min-width: 2.2rem;
  padding: 0.25rem 0.65rem;
}

.field-label {
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.title-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.btn-small {
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn-buy-tickets {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  border-radius: 10px;
  text-decoration: none;
}

.now-playing-text-block {
  margin: 0.4rem 0 0;
}

.grid-section {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  padding: 1.4rem;
  margin-bottom: 2rem;
}

.info-section {
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.info-line {
  margin: 0.25rem 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.info-link {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
}

.info-link:hover,
.info-link:focus-visible {
  text-decoration: underline;
}

.about-grid {
  gap: 1rem;
}

.about-card {
  padding: 1.2rem;
}

.about-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.about-row-reverse {
  flex-direction: row-reverse;
}

.about-image {
  width: min(320px, 42%);
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 0.2rem 0 0;
  display: block;
  flex: 0 0 auto;
}

.about-row .description {
  margin: 0.15rem 0 0;
}

.card-list {
  display: grid;
  gap: 0.8rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.8);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card-layout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.card-main {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
}

.card-left {
  flex: 1;
  min-width: 0;
}

.card-right {
  min-width: 220px;
  max-width: 260px;
  text-align: right;
}

.card-info-block + .card-info-block {
  margin-top: 0.7rem;
}

.poster-image {
  width: 220px;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 0;
  display: block;
  object-fit: cover;
}

.card h3 {
  margin: 0;
  font-size: 1.7rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card .small {
  margin-top: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card .chips {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.card-right .chips {
  justify-content: flex-end;
}

.card-times {
  white-space: normal;
  margin-bottom: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chip {
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  background: rgba(42, 157, 143, 0.14);
  color: #0e665c;
}

.admin-header {
  margin: 1rem 0 1rem;
  padding: 1.3rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-list {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.admin-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.admin-item.is-expired {
  background: rgba(214, 214, 214, 0.82);
  border-color: rgba(19, 32, 40, 0.22);
  box-shadow: inset 0 0 0 1px rgba(19, 32, 40, 0.05);
}

.admin-item.is-expired > div:first-child {
  opacity: 0.72;
}

.admin-item-actions {
  display: flex;
  gap: 0.5rem;
}

.form-wrap {
  margin-bottom: 2rem;
  padding: 1.2rem;
}

.admin-header.is-expired,
.form-wrap.is-expired {
  background: rgba(214, 214, 214, 0.82);
  border-color: rgba(19, 32, 40, 0.22);
}

.form-wrap.is-expired {
  box-shadow: 0 24px 70px rgba(8, 25, 39, 0.14);
}

.form-wrap.is-expired .editor-form {
  opacity: 0.78;
}

.editor-form {
  display: grid;
  gap: 1rem;
}

.auth-form {
  max-width: 720px;
}

.auth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 0.4rem;
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

input,
textarea,
select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.65rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

.full-row {
  grid-column: 1 / -1;
}

.btn,
button.btn {
  border: none;
  border-radius: 12px;
  padding: 0.64rem 1rem;
  background: var(--accent);
  color: #1f1f1f;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-secondary {
  background: #e2ebef;
  color: #183445;
}

.btn-danger {
  background: #d94949;
  color: #fff;
}

.btn.btn-danger-strong,
button.btn.btn-danger-strong {
  background: #c1121f;
  color: #fff;
  border: 1px solid rgba(105, 12, 18, 0.35);
  box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.22);
}

.btn.btn-danger-strong:hover,
.btn.btn-danger-strong:focus-visible,
button.btn.btn-danger-strong:hover,
button.btn.btn-danger-strong:focus-visible {
  background: #9b0e19;
}

.actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.placeholder {
  color: var(--ink-soft);
  font-style: italic;
}

.site-footer {
  margin: 0 auto 1.2rem;
  padding: 0.5rem 0 1rem;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.form-error {
  margin: 0;
  color: #a22727;
  font-weight: 700;
}

.small-label {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.editor-poster-preview {
  width: auto;
  height: auto;
  max-height: 200px;
  max-width: 100%;
  flex: 0 0 auto;
  align-self: flex-start;
  border: 1px solid var(--border);
  border-radius: 10px;
  object-fit: contain;
}

.poster-editor-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.poster-editor-controls {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.6rem;
}

.poster-popout {
  position: fixed;
  inset: 0;
  background: rgba(8, 16, 25, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.poster-popout[hidden] {
  display: none;
}

.poster-popout-image {
  max-width: min(96vw, 1400px);
  max-height: 94vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.28);
  object-fit: contain;
  cursor: zoom-out;
}

.bg-orb {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(30px);
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
  animation: drift 9s ease-in-out infinite;
}

.orb-a {
  background: #ffd166;
  top: -40px;
  left: -70px;
}

.orb-b {
  background: #65c3ba;
  right: -50px;
  bottom: 10%;
  animation-delay: 1.4s;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal-up 0.55s ease-out forwards;
}

.stagger {
  animation-delay: 0.14s;
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(12px, -16px);
  }
}

@media (max-width: 900px) {
  .container {
    width: min(1100px, calc(100% - 1.4rem));
  }

  .topbar {
    align-items: flex-start;
    gap: 0.8rem;
  }

  .topbar-brand-wrap {
    flex: 1;
    width: 100%;
  }

  .topbar nav {
    width: 100%;
    justify-content: flex-start;
  }

  .grid-section {
    grid-template-columns: 1fr;
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-image {
    width: min(280px, 45%);
    max-height: 200px;
  }
}

@media (max-width: 650px) {
  body {
    font-size: 15px;
  }

  .topbar,
  .admin-header,
  .admin-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar {
    padding: 0.9rem 0;
  }

  .topbar-brand-wrap {
    width: 100%;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .topbar nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.45rem 0.7rem;
  }

  .brand {
    font-size: 1.1rem;
  }

  .brand-sub {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .topbar-brand-image {
    height: 40px;
    max-width: 150px;
  }

  .hero-now-playing,
  .poster-editor-row,
  .card-layout,
  .card-main,
  .about-row,
  .about-row-reverse {
    flex-direction: column;
  }

  .about-image {
    width: 100%;
    max-height: 230px;
    margin-bottom: 0.6rem;
  }

  .now-playing-main {
    flex-direction: column;
  }

  #now-playing-title {
    font-size: clamp(1.2rem, 8.5vw, 2.2rem);
    line-height: 1.05;
  }

  .now-playing-right {
    min-width: 0;
    max-width: none;
    text-align: left;
  }

  .now-playing-right .chips {
    justify-content: flex-start;
  }

  .card-right {
    min-width: 0;
    max-width: none;
    text-align: left;
  }

  .card-right .chips {
    justify-content: flex-start;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .grid-section,
  .form-wrap,
  .admin-header {
    padding: 1rem;
  }

  .actions {
    width: 100%;
  }

  .actions .btn,
  .actions button.btn {
    width: 100%;
  }
}
