:root {
  --bg: #213866;
  --bg-deep: #1d315a;
  --panel: #2b416e;
  --panel-soft: #314872;
  --border: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f6fb;
  --muted: #adb9da;
  --muted-strong: #c4d0ec;
  --badge: #7689e6;
  --button: #ffffff;
  --button-text: #243862;
  --shadow: 0 24px 64px rgba(9, 15, 31, 0.25);
  --admin-bg: rgba(10, 16, 29, 0.72);
  --admin-panel: #15233f;
  --admin-input: #1c2f56;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1420px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 40px;
}

.luma-mark {
  position: fixed;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  z-index: 50;
}

.luma-mark__spark {
  width: 14px;
  height: 14px;
  background: linear-gradient(180deg, #edf4ff, #aabfe9);
  clip-path: polygon(50% 0, 66% 34%, 100% 50%, 66% 66%, 50% 100%, 34% 66%, 0 50%, 34% 34%);
  opacity: 0.95;
}

.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  align-items: start;
}

.sidebar,
.content {
  min-width: 0;
}

.poster {
  position: relative;
  min-height: 392px;
  padding: 18px;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4, 10, 22, 0.15), rgba(4, 10, 22, 0.84)),
    radial-gradient(circle at 74% 40%, rgba(255, 177, 84, 0.85), transparent 18%),
    linear-gradient(180deg, #091428 0%, #0d234b 48%, #0b1328 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.poster--with-image {
  background: #0b162d;
}

.poster__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.poster--with-image .poster__image {
  display: block;
}

.poster--with-image .poster__header,
.poster--with-image .poster__title,
.poster--with-image .poster__subtitle,
.poster--with-image .poster__meta,
.poster--with-image .poster__footer,
.poster--with-image .poster__overlay {
  display: none;
}

.poster__overlay {
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background:
    linear-gradient(180deg, transparent 0%, rgba(14, 24, 46, 0.2) 20%, rgba(10, 16, 32, 0.92) 100%),
    linear-gradient(90deg, rgba(93, 145, 255, 0.3) 0, transparent 20%, rgba(255, 163, 62, 0.2) 70%, transparent 100%);
}

.poster__header,
.poster__subtitle,
.poster__meta,
.poster__footer,
.poster__title {
  position: relative;
  z-index: 1;
}

.poster__header {
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0.95;
}

.poster__title {
  margin-top: 6px;
  font-family: "IBM Plex Mono", monospace;
  line-height: 0.95;
}

.poster__title span {
  display: block;
  font-size: 0.96rem;
  font-family: "Inter", sans-serif;
  font-weight: 700;
}

.poster__title strong {
  display: block;
  font-size: 3.1rem;
  color: #ffc94f;
}

.poster__subtitle {
  max-width: 210px;
  margin-top: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #d7e7ff;
  font-weight: 600;
}

.poster__meta {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  font-size: 0.78rem;
  color: #bfd0f1;
}

.poster__rocket {
  position: absolute;
  right: 48px;
  top: 42px;
  width: 44px;
  height: 142px;
  border-radius: 50% 50% 34% 34%;
  transform: rotate(18deg);
  background:
    linear-gradient(180deg, #dce7fb 0%, #7590bf 34%, #3e547e 58%, #ffb250 72%, rgba(255, 178, 80, 0) 100%);
  box-shadow: 0 26px 38px rgba(255, 170, 65, 0.32);
}

.poster__rocket::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: -120px;
  width: 15px;
  height: 130px;
  background: linear-gradient(180deg, rgba(255, 219, 140, 0.92), rgba(255, 137, 63, 0));
  filter: blur(5px);
}

.poster__coins {
  position: absolute;
  right: 22px;
  bottom: 28px;
  width: 108px;
  height: 70px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 25% 45%, #c4882f 0 16px, transparent 17px),
    radial-gradient(circle at 55% 42%, #d6a94d 0 17px, transparent 18px),
    radial-gradient(circle at 76% 52%, #a96d20 0 20px, transparent 21px);
  opacity: 0.94;
}

.poster--with-image .poster__rocket,
.poster--with-image .poster__coins {
  display: none;
}

.poster__footer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.68rem;
  color: #d7e7ff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.registration,
.event-date {
  background: rgba(255, 255, 255, 0.05);
}

.side-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.side-section h3,
.about h2 {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.host {
  display: flex;
  align-items: center;
  gap: 12px;
}

.host__avatar,
.host__avatar-image {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.host__avatar {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #dfe8ff, #aec0e7);
  color: #243860;
  font-size: 0.75rem;
  font-weight: 700;
}

.host__avatar-image {
  object-fit: cover;
  display: none;
}

.host--with-image .host__avatar {
  display: none;
}

.host--with-image .host__avatar-image {
  display: block;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--badge);
  color: #f3f4ff;
  font-weight: 700;
  font-size: 0.88rem;
}

.content h1 {
  max-width: 900px;
  margin: 12px 0 18px;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(2.8rem, 4.2vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.event-date {
  width: 46px;
  min-width: 46px;
  border-radius: 10px;
  padding: 6px 0;
  text-align: center;
  box-shadow: inset 0 0 0 1px var(--border);
}

.event-date__month {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 800;
}

.event-date strong {
  display: block;
  font-size: 1.5rem;
}

.event-meta__text {
  display: grid;
  gap: 4px;
}

.event-meta__text strong {
  font-size: 1.05rem;
}

.event-meta__text span,
.about p,
.about li {
  color: var(--muted-strong);
}

.registration {
  margin-top: 26px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.registration__top {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.06);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  font-weight: 700;
}

.registration__body {
  padding: 18px;
}

.cta {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  background: var(--button);
  color: var(--button-text);
  font-size: 1rem;
  font-weight: 700;
}

.about {
  margin-top: 28px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.about h3 {
  margin: 16px 0 14px;
  font-size: 1.05rem;
}

.about h4 {
  margin: 18px 0 12px;
  font-size: 0.98rem;
}

.about p,
.about li {
  font-size: 1rem;
  line-height: 1.62;
}

.about ul {
  margin: 0;
  padding-left: 24px;
}

.about li + li {
  margin-top: 8px;
}

.admin-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: var(--admin-bg);
  z-index: 100;
}

.admin-panel {
  width: min(560px, 100%);
  height: 100%;
  overflow: auto;
  background: var(--admin-panel);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.3);
}

.admin-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 22px 12px;
}

.admin-panel__header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.admin-panel__header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
}

.admin-login,
.admin-editor {
  padding: 0 22px 24px;
}

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

.admin-field {
  display: grid;
  gap: 8px;
}

.admin-field--full {
  grid-column: 1 / -1;
}

.admin-field span,
.admin-hint,
.admin-error,
code {
  font-size: 0.92rem;
}

.admin-field input,
.admin-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--admin-input);
  color: white;
  padding: 12px 14px;
  resize: vertical;
}

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

.admin-mail {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-mail__head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.admin-mail__head p {
  margin: 6px 0 16px;
  color: var(--muted);
}

.admin-mail__head--logs {
  margin-top: 24px;
}

.admin-mail__status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted-strong);
}

.admin-log {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.admin-preview {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #f4f4f2;
}

.admin-preview__frame {
  width: 100%;
  height: 720px;
  border: 0;
  background: #f4f4f2;
}

.admin-log__empty {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.admin-log__item {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-log__top,
.admin-log__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.admin-log__top {
  margin-bottom: 10px;
}

.admin-log__status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-log__status--success {
  background: rgba(88, 214, 141, 0.16);
  color: #a7f3c4;
}

.admin-log__status--error {
  background: rgba(255, 107, 107, 0.16);
  color: #ffc0c0;
}

.admin-log__subject {
  font-weight: 700;
}

.admin-log__meta,
.admin-log__detail {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-log__detail + .admin-log__detail {
  margin-top: 6px;
}

.admin-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
}

.admin-button--primary {
  background: white;
  color: #122140;
  font-weight: 700;
}

.admin-button--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.admin-hint {
  color: var(--muted);
}

.admin-error {
  min-height: 18px;
  color: #ffb2b2;
}

[hidden] {
  display: none !important;
}

body.admin-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    max-width: 420px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 24px, 1420px);
    padding-top: 14px;
  }

  .luma-mark {
    top: 8px;
    left: 8px;
  }

  .content h1 {
    font-size: 2.2rem;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}
