 :root {
  --bg-dark: #05030a;
  --bg-panel: rgba(16, 12, 32, 0.96);
  --bg-panel-alt: rgba(20, 16, 40, 0.96);
  --accent-red: #ff4b6e;
  --accent-gold: #ffd46b;
  --accent-green: #25c974;
  --text-main: #f8f5ff;
  --text-muted: #b6aeda;
  --border-glow: rgba(255, 212, 107, 0.6);
  --shadow-soft: 0 0 18px rgba(0, 0, 0, 0.6);
  --radius: 18px;
}

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

body {
  font-family: "JetBrains Mono", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.17), transparent 55%),
    radial-gradient(circle at bottom, rgba(255, 77, 112, 0.4), transparent 60%),
    radial-gradient(circle at top right, rgba(40, 255, 185, 0.35), transparent 55%),
    #020008;
  min-height: 100vh;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  cursor: url("cursor-d20.png") 16 16, auto;
}

.page {
  width: 100%;
  max-width: 1024px;
  background: linear-gradient(145deg, #0b0618, #140824);
  border-radius: 24px;
  border: 1px solid rgba(255, 241, 225, 0.18);
  box-shadow:
    0 0 22px rgba(0, 0, 0, 0.75),
    0 0 45px rgba(255, 255, 255, 0.05);
  padding: 24px 18px 28px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .page {
    padding: 32px 32px 36px;
  }
}

/* Snow effect */
.snow-layer {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.snowflake {
  position: absolute;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  animation: snow-fall linear infinite;
  opacity: 0.8;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.6));
}

@keyframes snow-fall {
  0% {
    transform: translate3d(var(--x-start), -10%, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  100% {
    transform: translate3d(var(--x-end), 110%, 0) rotate(360deg);
    opacity: 0;
  }
}

/* Header */
header {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 24px;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #121212;
  background: linear-gradient(135deg, #ffd46b, #ff7a7a);
  box-shadow: 0 0 12px rgba(255, 166, 44, 0.7);
  margin-bottom: 10px;
}

.event-badge span.icon {
  font-size: 1rem;
}

h1 {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 6px;
  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.9),
    0 0 18px rgba(235, 52, 127, 0.8);
  user-select: none;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.75rem;
}

.tag {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 8, 24, 0.6);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Intro panel */
.intro-panel {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
  padding: 16px 14px;
  border-radius: var(--radius);
  background: radial-gradient(circle at left top, rgba(255, 212, 107, 0.15), transparent),
    radial-gradient(circle at right bottom, rgba(138, 255, 197, 0.16), transparent),
    var(--bg-panel);
  border: 1px solid rgba(255, 236, 209, 0.35);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 768px) {
  .intro-panel {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 18px;
  }
}

.intro-text h2 {
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: var(--accent-gold);
}

.intro-text p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.intro-meta {
  margin-top: 10px;
  font-size: 0.8rem;
  display: grid;
  gap: 4px;
}

.intro-meta strong {
  color: var(--accent-gold);
}

.d20-badge {
  display: none;
}

@media (min-width: 768px) {
  .d20-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    width: 120px;
    height: 120px;
    border: 1px solid var(--border-glow);
    background: radial-gradient(circle, rgba(255, 241, 220, 0.15), transparent),
      rgba(10, 8, 24, 0.85);
    box-shadow:
      0 0 18px rgba(255, 212, 107, 0.4),
      0 0 28px rgba(235, 52, 127, 0.4);
    font-family: "Cinzel", serif;
    text-align: center;
  }

  .d20-badge span.icon {
    font-size: 2.1rem;
    margin-bottom: 6px;
  }

  .d20-badge span.text-top,
  .d20-badge span.text-bottom {
    display: block;
    text-align: center;
    line-height: 1.2;
  }

  .d20-badge span.text-top {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-gold);
  }

  .d20-badge span.text-bottom {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 90px;
  }
}

/* Schedule */
.schedule {
  position: relative;
  z-index: 1;
  margin-top: 4px;
}

.schedule-title {
  font-family: "Cinzel", serif;
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-title .divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(255, 212, 107, 0.7),
    transparent
  );
}

.timeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 768px) {
  .timeline {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.slot {
  background: linear-gradient(145deg, var(--bg-panel), var(--bg-panel-alt));
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 10px 11px 11px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.slot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top left,
    rgba(255, 212, 107, 0.16),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.25s ease-out;
  pointer-events: none;
}

.slot:hover::before {
  opacity: 1;
}

.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.slot-title {
  font-size: 0.92rem;
}

.slot-title span.icon {
  margin-right: 5px;
}

.slot-time {
  font-size: 0.78rem;
  color: var(--accent-green);
  white-space: nowrap;
}

.slot-body {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.slot-body ul {
  list-style: none;
  margin-top: 4px;
  padding-left: 0;
}

.slot-body li {
  margin-bottom: 3px;
  position: relative;
  padding-left: 14px;
}

.slot-body li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.7rem;
  color: var(--accent-red);
}

.hint {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-left: 2px solid rgba(255, 255, 255, 0.18);
  padding-left: 8px;
  font-style: italic;
}

.slot-full {
  grid-column: 1 / -1;
}

/* Footer */
footer {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-note strong {
  color: var(--accent-gold);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.cta span {
  opacity: 0.8;
}

.cta-button {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: radial-gradient(circle at top, #ff4b6e, #b32044);
  color: #fff;
  text-decoration: none;
  box-shadow:
    0 0 8px rgba(255, 75, 110, 0.7),
    0 0 18px rgba(255, 255, 255, 0.12);
}



/* =========================
   Portal-specific components
   ========================= */

.messages {
  margin-bottom: 10px;
}

.message {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.message-error {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.7);
}

.message-success {
  background: rgba(40, 167, 69, 0.15);
  border: 1px solid rgba(40, 167, 69, 0.7);
}

.form-grid {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label {
  font-size: 0.8rem;
  color: var(--accent-gold);
}

.field input,
.field select {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(10, 8, 24, 0.85);
  padding: 8px 10px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 1px rgba(255, 212, 107, 0.4);
}

.actions-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.big-name {
  font-family: "Cinzel", serif;
  font-size: 1.4rem;
  margin: 8px 0;
  color: var(--accent-gold);
}

.secret-code {
  font-family: "JetBrains Mono", monospace;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.3);
}

button.cta-button {
  cursor: pointer;
}
