:root {
  color-scheme: dark;
  --background: #100d20;
  --surface: #1a1630;
  --surface-raised: #211b3a;
  --border: rgba(190, 177, 255, .16);
  --text: #f5f2ff;
  --muted: #b9b2cc;
  --accent: #65dce8;
  --accent-strong: #a78bfa;
  --success: #7be0b0;
  --danger: #ff929c;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% -15%, rgba(105, 76, 180, .22), transparent 48%),
    var(--background);
  color: var(--text);
  line-height: 1.6;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px max(5%, calc((100% - 1180px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(16, 13, 32, .9);
}

.brand {
  color: var(--text);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-decoration: none;
}

.environment-label {
  color: var(--accent);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
}

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

.hero {
  padding: 72px 0 48px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(2.3rem, 6vw, 4.3rem);
  line-height: 1.12;
}

.hero > p:last-child {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--muted);
}

.panel {
  margin: 0 0 28px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(33, 27, 58, .96), rgba(23, 19, 42, .96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
}

.panel h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 750;
  transition: transform .18s ease, filter .18s ease;
}

.button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.button.primary {
  background: linear-gradient(110deg, #58d8e6, #a78bfa);
  color: #17132a;
}

.button.secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
}

.form-stack {
  display: grid;
  gap: 12px;
  max-width: 720px;
}

.form-stack label {
  margin-top: 7px;
  color: #e8e2fa;
  font-size: .9rem;
  font-weight: 700;
}

.form-stack input,
.form-stack textarea {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(9, 8, 20, .58);
  color: var(--text);
}

.form-stack textarea {
  min-height: 120px;
  resize: vertical;
}

.form-stack input[type="file"] {
  padding: 10px;
}

.form-stack input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-raised);
  color: var(--text);
  cursor: pointer;
}

.hint,
.status {
  color: var(--muted);
  font-size: .88rem;
}

.status {
  min-height: 1.5em;
}

.status:empty {
  display: none;
}

.spotlight-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
  gap: 22px;
  align-items: start;
}

.spotlight-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(10, 9, 22, .55);
}

.spotlight-card-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  overflow: hidden;
  background: #090816;
}

.spotlight-card-media.single {
  grid-template-columns: 1fr;
}

.spotlight-card-media img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.spotlight-card-media.triple img:first-child {
  grid-row: span 2;
  height: 100%;
  min-height: 190px;
}

.spotlight-card-content {
  padding: 18px;
}

.spotlight-card-content h3 {
  margin: 0 0 9px;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 1.3rem;
}

.spotlight-card-content p {
  margin: 0 0 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.admin-list,
.status-list {
  display: grid;
  gap: 12px;
}

.admin-item,
.status-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(8, 7, 19, .42);
}

.admin-item h4,
.status-item h4 {
  margin: 0 0 7px;
}

.admin-item p,
.status-item p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

.edit-dialog {
  width: min(650px, calc(100% - 28px));
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
}

.edit-dialog::backdrop {
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(5px);
}

.dialog-content {
  padding: 24px;
}

.site-footer {
  padding: 28px 5%;
  color: var(--muted);
  text-align: center;
  font-size: .82rem;
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding: 15px 5%;
  }

  .hero {
    padding: 48px 0 32px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading .button {
    width: 100%;
  }

  .panel {
    border-radius: 15px;
  }

  .spotlight-gallery {
    grid-template-columns: 1fr;
  }

  .admin-actions .button {
    flex: 1 1 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
