:root {
  --accent: #f59e0b;
  --accent-2: #ef4444;
  --bg-deep: #020617;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --text-soft: rgba(255, 255, 255, 0.75);
  --ok: #22c55e;
  --warn: #f59e0b;
  --error: #ef4444;
}

body {
  margin: 0;
  background: var(--bg-deep);
  color: white;
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

.hero-slide,
.content-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: min(700px, 78vh);
  padding: 1.5rem;
  box-sizing: border-box;
  background-size: cover;
  background-position: center center;
  border-radius: 24px;
}

.hero-title,
.content-panel {
  display: inline-block;
  max-width: min(92vw, 900px);
  padding: 1.25rem 1.75rem;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.58);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.hero-title h1,
.content-panel h2 {
  margin: 0;
  color: #ffffff;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.hero-title h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: normal;
}

.content-panel {
  text-align: left;
}

.content-panel h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.6rem, 4vw, 3rem);
}

.content-panel ul {
  margin: 0;
  padding-left: 1.2em;
}

.content-panel li {
  margin: 0.7rem 0;
  line-height: 1.35;
}

.table-panel {
  max-width: min(96vw, 1100px);
}

.info-panel {
  max-width: min(92vw, 980px);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.info-card {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
}

.info-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.info-card h3 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.05rem, 2vw, 1.55rem);
}

.info-card p {
  margin: 0;
  line-height: 1.35;
}

.medal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: clamp(0.9rem, 1.7vw, 1.35rem);
  background: rgba(2, 6, 23, 0.28);
  border-radius: 16px;
  overflow: hidden;
}

.medal-table th,
.medal-table td {
  padding: 0.7rem 0.8rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.medal-table th:nth-child(2),
.medal-table td:nth-child(2) {
  text-align: left;
}

.country-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.country-cell span {
  display: inline-block;
  line-height: 1.1;
}

.flag-icon {
  width: 1em;
  min-width: 1em;
  height: auto;
  vertical-align: middle;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
}

.medal-table thead th {
  background: rgba(255, 255, 255, 0.08);
}

.medal-table tbody tr:last-child td {
  border-bottom: 0;
}

.reveal h1,
.reveal h2 {
  text-transform: none;
}

.reveal small,
small {
  opacity: 0.8;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
}

.remote-overlay {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.remote-toggle,
.remote-close {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: white;
  cursor: pointer;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.remote-toggle {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  font-size: 1.35rem;
}

.remote-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1rem;
}

.remote-overlay.is-collapsed .remote-card {
  display: none;
}

.remote-card,
.remote-panel {
  width: min(360px, calc(100vw - 2rem));
  max-width: 100%;
  padding: 1rem 1.1rem;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.remote-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.remote-card h2,
.remote-panel h1 {
  margin-top: 0;
}

.qr-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  margin: 1rem 0;
  padding: 0.75rem;
  border-radius: 16px;
  background: white;
}

.qr-shell canvas {
  max-width: 100%;
  height: auto;
}

.session-line,
.link-line,
.status-line,
.remote-feedback {
  margin: 0.6rem 0;
  color: var(--text-soft);
  word-break: break-word;
}

.status-line span[data-state='ok'] {
  color: var(--ok);
}

.status-line span[data-state='warn'] {
  color: var(--warn);
}

.status-line span[data-state='error'] {
  color: var(--error);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  pointer-events: none;
  z-index: 25;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94);
  color: white;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  transition: opacity 180ms ease, transform 180ms ease;
}

.fireworks-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 24;
  opacity: 0;
  transition: opacity 180ms ease;
}

.fireworks-canvas.is-active {
  opacity: 1;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.demo-stage {
  position: relative;
  width: 720px;
  height: 320px;
  margin: 2rem auto;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.35), transparent 30%),
    linear-gradient(180deg, #0f172a, #111827 70%, #020617);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.demo-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24%;
  background: linear-gradient(90deg, #020617 0 8%, #111827 8% 15%, #1f2937 15% 22%, #111827 22% 29%, #0f172a 29% 37%, #1e293b 37% 44%, #111827 44% 52%, #0f172a 52% 61%, #1f2937 61% 68%, #111827 68% 76%, #0f172a 76% 84%, #1e293b 84% 100%);
}

.burst {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 999px;
}

.burst::before,
.burst::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 4px;
  height: 110px;
  transform-origin: center top;
}

.burst::before {
  background: linear-gradient(var(--accent), transparent 70%);
  transform: rotate(0deg);
}

.burst::after {
  background: linear-gradient(var(--accent-2), transparent 70%);
  transform: rotate(90deg);
}

.burst-a {
  top: 18%;
  left: 18%;
}

.burst-b {
  top: 10%;
  left: 46%;
}

.burst-c {
  top: 22%;
  left: 70%;
}

.remote-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.25), transparent 30%),
    linear-gradient(180deg, #0f172a, #020617);
}

.remote-actions,
.goto-panel-simple {
  display: grid;
  gap: 0.75rem;
}

.remote-actions-stacked {
  grid-template-columns: 1fr;
  margin: 1rem 0;
}

.goto-panel-simple {
  margin-top: 0.75rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 1rem;
}

.remote-button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.remote-button.primary {
  background: linear-gradient(135deg, var(--accent), #fb923c);
  color: #111827;
}

.remote-button.secondary,
.remote-button.tertiary {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.remote-button.fireworks {
  background: linear-gradient(135deg, #ec4899, #f59e0b);
  color: white;
}

.remote-button-next {
  min-height: 84px;
  font-size: 1.15rem;
}

@media (max-width: 900px) {
  .remote-overlay {
    top: 0.75rem;
    right: 0.75rem;
  }

  .remote-card {
    width: min(340px, calc(100vw - 5rem));
  }

  .demo-stage {
    width: min(100%, 640px);
    height: 280px;
  }
}

.thank-you-slide {
  position: relative;
  width: 100%;
  min-height: min(700px, 78vh);
  border-radius: 24px;
  background-size: cover;
  background-position: center center;
  overflow: hidden;
}

.thank-you-note {
  position: absolute;
  right: 2rem;
  bottom: 1.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.45);
  color: white;
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
}

.map-slide-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.map-frame {
  position: relative;
  width: min(96vw, 1200px);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.map-image {
  display: block;
  width: 100%;
  height: auto;
}

.map-pin {
  position: absolute;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease, filter 180ms ease;
}

.map-pin.is-overview {
  background: #ef4444;
  border: 3px solid white;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.22);
  opacity: 1;
}

.map-pin.is-active {
  background: #ef4444;
  border: 3px solid white;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.22), 0 0 24px rgba(239, 68, 68, 0.55);
  opacity: 1;
  filter: none;
}

.map-pin.is-muted {
  background: #9ca3af;
  border: 3px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 6px rgba(148, 163, 184, 0.16);
  opacity: 0.78;
  filter: grayscale(1);
}

.pin-1 { left: 46.5%; top: 38.1%; }
.pin-2 { left: 31.2%; top: 31.8%; }
.pin-3 { left: 33.4%; top: 42.2%; }
.pin-4 { left: 23.8%; top: 72.1%; }
.pin-5 { left: 63.6%; top: 33.2%; }
.pin-6 { left: 39.6%; top: 23.8%; }

.map-callout {
  position: absolute;
  max-width: 27%;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  text-align: left;
  transform: translateX(-50%);
}

.map-callout h3 {
  margin: 0 0 0.35rem;
  font-size: clamp(1rem, 1.4vw, 1.4rem);
}

.map-callout p {
  margin: 0;
  font-size: clamp(0.8rem, 1.05vw, 1.05rem);
  line-height: 1.35;
}

.callout-1 { left: 46.5%; top: 23.5%; }
.callout-2 { left: 31.2%; top: 16.2%; }
.callout-3 { left: 33.4%; top: 27.3%; }
.callout-4 { left: 23.8%; top: 58.2%; }
.callout-5 { left: 63.6%; top: 18.7%; }
.callout-6 { left: 39.6%; top: 10.2%; }

@media (max-width: 640px) {
  .hero-slide,
  .content-slide {
    min-height: min(70vh, 560px);
    padding: 1rem;
  }

  .hero-title,
  .content-panel {
    max-width: calc(100vw - 3rem);
    padding: 1rem 1.1rem;
  }

  .hero-title h1 {
    font-size: clamp(1.7rem, 8vw, 3rem);
    line-height: 1.12;
  }

  .remote-panel {
    width: min(100%, 420px);
    padding: 0.9rem;
  }

  .remote-button {
    width: 100%;
  }

  .table-panel {
    overflow-x: auto;
  }

  .medal-table {
    min-width: 620px;
  }

  .map-callout {
    max-width: 42%;
    padding: 0.55rem 0.65rem;
  }

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