:root {
  --bg: #1d1e2c;
  --bg-2: #262838;
  --card: #2d3043;
  --card-2: #363a52;
  --brand: #f84464;
  --brand-2: #ff2e63;
  --accent: #2ebd85;
  --text: #f2f3f7;
  --muted: #9ba0b3;
  --gold: #ffc13b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #161722 0%, var(--bg) 40%);
  color: var(--text);
  min-height: 100vh;
}

.container {
  width: min(1080px, 94%);
  margin: 0 auto;
}

.topbar {
  background: #1b1c2a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  width: min(1080px, 94%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
}

.logo {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -1px;
}

.logo-dot {
  color: var(--brand);
}

.brand-tag {
  color: var(--muted);
  font-size: 13px;
}

.prompt-area {
  padding: 34px 0 10px;
  background:
    radial-gradient(900px 300px at 15% -40%, rgba(248, 68, 100, 0.35), transparent 60%),
    radial-gradient(700px 260px at 90% -30%, rgba(46, 189, 133, 0.25), transparent 60%);
}

.prompt-area h1 {
  font-size: 30px;
  margin-bottom: 6px;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 20px;
}

#prompt-form {
  display: flex;
  gap: 10px;
  max-width: 720px;
}

#prompt-input {
  flex: 1;
  padding: 14px 16px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #4a4e6b;
  background: #23253a;
  color: var(--text);
  outline: none;
  transition: border 0.15s;
}

#prompt-input:focus {
  border-color: var(--brand);
}

#prompt-form button {
  padding: 0 26px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

#prompt-form button:hover {
  filter: brightness(1.1);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #4a4e6b;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}

.chip:hover {
  border-color: var(--brand);
  color: #ffd6de;
}

.hint {
  margin-top: 12px;
  min-height: 20px;
  color: var(--accent);
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.city-banner {
  margin-top: 26px;
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #33224a, #1f2132);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.city-banner h3 {
  font-size: 22px;
}

.city-banner .mux {
  color: var(--muted);
}

.view {
  margin-top: 24px;
}

.view-title {
  font-size: 20px;
  margin-bottom: 16px;
  color: #fff;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.movie-card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: transform 0.15s, border 0.15s;
  display: flex;
  flex-direction: column;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
}

.poster {
  height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  position: relative;
  background-size: cover;
  background-position: center;
}

.poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.75));
}

.poster .badge {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.poster .poster-title {
  position: relative;
  z-index: 2;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-meta {
  color: var(--muted);
  font-size: 12.5px;
}

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

.showtime {
  border: 1px solid #565b7d;
  color: var(--text);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.avail-pill {
  background: rgba(46, 189, 133, 0.16);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}

.cta {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.seats-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 16px;
}

.seats-header h2 {
  font-size: 20px;
}

.seats-header .sub {
  color: var(--muted);
  font-size: 13.5px;
}

.screen-strip {
  background: linear-gradient(180deg, #e8eaf6, #b9bdd6);
  color: #1d1e2c;
  text-align: center;
  padding: 10px 0 16px;
  border-radius: 12px 12px 60% 60% / 12px 12px 20px 20px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.seat-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(34px, 1fr));
  gap: 10px;
  max-width: 620px;
  margin: 0 auto;
  padding: 20px;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.seat {
  aspect-ratio: 1;
  border-radius: 6px 6px 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  color: #fff;
}

.seat.available {
  background: #3f9d78;
}

.seat.booked {
  background: #565b6e;
  color: #9aa0b0;
  cursor: not-allowed;
}

.seat.selected {
  background: var(--gold);
  color: #1d1e2c;
}

.seat:hover.available {
  filter: brightness(1.15);
}

.legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.swatch.available {
  background: #3f9d78;
}

.swatch.booked {
  background: #565b6e;
}

.swatch.selected {
  background: var(--gold);
}

.booking-bar {
  max-width: 620px;
  margin: 0 auto 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--card-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

#selected-info {
  font-size: 14px;
}

#book-btn {
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

#book-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13.5px;
  margin: 0 auto 40px;
  display: block;
}

.link-btn:hover {
  color: var(--brand);
}

.status-panel {
  background: var(--card);
  border-radius: 16px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 40px;
}

.status-panel h3 {
  margin-bottom: 10px;
  color: var(--brand);
}

.status-panel .code {
  font-family: Consolas, monospace;
  white-space: pre-wrap;
  color: #c9cddc;
  font-size: 13px;
  line-height: 1.6;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 18, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  background: #fff;
  color: #1d1e2c;
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  max-height: 92vh;
  overflow: auto;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 26px;
  cursor: pointer;
  color: #888;
}

.modal-close:hover {
  color: #000;
}

.ticket-head {
  text-align: center;
}

.ticket-brand {
  color: var(--brand);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -1px;
}

.ticket-movie {
  font-size: 19px;
  font-weight: 800;
  margin-top: 6px;
}

.ticket-qr {
  display: flex;
  justify-content: center;
  margin: 18px 0;
}

.ticket-qr img {
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
  border: 1px dashed #ddd;
  border-radius: 10px;
  padding: 6px;
}

.ticket-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.ticket-table td {
  padding: 7px 4px;
  border-bottom: 1px solid #eee;
}

.ticket-table td:first-child {
  color: #777;
}

.ticket-table td:last-child {
  text-align: right;
  font-weight: 700;
}

.ticket-id {
  text-align: center;
  margin-top: 14px;
  color: #555;
  font-size: 13px;
  font-family: Consolas, monospace;
}

.secondary-btn {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.secondary-btn:hover {
  filter: brightness(1.1);
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 40px;
  padding: 22px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.footer .muted {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.75;
}

@media print {
  body * {
    visibility: hidden;
  }
  #ticket-modal,
  #ticket-modal * {
    visibility: visible;
  }
  #ticket-modal {
    position: absolute;
    inset: 0;
    background: #fff;
    padding: 0;
  }
  .modal-card {
    box-shadow: none;
    width: 100%;
    max-height: none;
  }
  .modal-close,
  .secondary-btn {
    display: none;
  }
}

