:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d8e0ec;
  --accent: #0f766e;
  --accent-2: #e11d48;
  --gold: #f59e0b;
  --blue: #2563eb;
  --shadow: 0 18px 48px rgba(20, 32, 52, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 34%),
    linear-gradient(135deg, #f7fafc 0%, #eaf2ff 46%, #fff7ed 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--text);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.primary {
  border-color: #0f766e;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.event-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 12px clamp(14px, 4vw, 42px);
  border-bottom: 1px solid rgba(216, 224, 236, 0.8);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.event-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 950;
}

.event-header-link,
.event-create-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 950;
  text-decoration: none;
}

.event-brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #e11d48);
}

.event-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px);
}

.event-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.event-hero > div,
.event-wizard {
  border: 1px solid rgba(216, 224, 236, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.event-hero > div:first-child {
  padding: clamp(22px, 4vw, 38px);
}

.eyebrow {
  margin: 0 0 10px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.event-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.event-hero p {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.event-id-card {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 22px;
}

.event-id-card span,
.step-heading span {
  color: #667085;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.event-id-card strong {
  font-size: 24px;
}

.event-key-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.event-wizard {
  overflow: hidden;
}

.event-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
}

.event-steps button {
  border: 0;
  border-radius: 0;
  background: #f8fafc;
}

.event-steps button.active {
  color: #fff;
  background: #172033;
}

.event-form {
  display: grid;
}

.event-step {
  display: none;
  gap: 16px;
  min-height: min(720px, calc(100dvh - 260px));
  padding: clamp(18px, 3vw, 30px);
}

.event-step.active {
  display: grid;
}

.step-heading h2 {
  margin: 5px 0;
  font-size: clamp(24px, 3.2vw, 38px);
  letter-spacing: 0;
}

.step-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.event-type-grid,
.voice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.voice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.event-choice,
.voice-grid label,
.event-image-tile {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  cursor: pointer;
}

.event-choice input,
.voice-grid input {
  position: absolute;
  inset: 12px 12px auto auto;
}

.event-choice:has(input:checked),
.voice-grid label:has(input:checked) {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.event-choice span,
.voice-grid span {
  font-size: 34px;
  line-height: 1;
}

.event-choice strong,
.voice-grid strong {
  font-size: 18px;
}

.event-choice small,
.voice-grid small {
  color: var(--muted);
  line-height: 1.35;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--text);
  background: #fff;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

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

.image-actions,
.final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-field {
  max-width: 360px;
}

.voice-sections {
  display: grid;
  gap: 18px;
}

.voice-sections section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.voice-sections h3 {
  margin: 0;
  font-size: 18px;
}

.event-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.event-image-tile {
  min-height: 132px;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.event-image-tile img {
  width: 100%;
  height: 132px;
  object-fit: cover;
}

.event-image-tile span {
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 16px;
  text-align: center;
  font-weight: 950;
}

.event-image-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 30px;
  padding: 0 9px;
  border-color: rgba(255, 255, 255, 0.65);
  color: #fff;
  background: rgba(23, 32, 51, 0.68);
}

audio {
  width: 100%;
  max-width: 720px;
}

.event-player {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #0f172a;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.24);
}

.event-preview-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  overflow: hidden;
  background: #0f172a;
}

.event-preview-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(15, 23, 42, 0.72));
}

.event-preview-stage .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: eventFade 40s infinite;
  animation-delay: var(--slide-delay, 0s);
  background-size: cover;
  background-position: center;
}

.event-preview-stage .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-preview-stage .slide span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  font-size: clamp(28px, 6vw, 72px);
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.62);
}

@keyframes eventFade {
  0%, 12% { opacity: 1; transform: scale(1); }
  18%, 100% { opacity: 0; transform: scale(1.045); }
}

.event-preview-stage.preset1 .slide {
  animation-name: eventPresetOne;
}

.event-preview-stage.preset2 .slide {
  animation-name: eventPresetTwo;
}

.event-preview-stage.preset3 .slide {
  animation-name: eventPresetThree;
}

.event-preview-stage.preset4 .slide {
  animation-name: eventPresetFour;
}

@keyframes eventPresetOne {
  0%, 12% { opacity: 1; transform: scale(1.04) translateX(0); }
  18%, 100% { opacity: 0; transform: scale(1.12) translateX(-3%); }
}

@keyframes eventPresetTwo {
  0%, 12% { opacity: 1; transform: scale(1.08) translateX(-2%); }
  18%, 100% { opacity: 0; transform: scale(1.02) translateX(3%); }
}

@keyframes eventPresetThree {
  0%, 12% { opacity: 1; transform: scale(1.05) translateY(0) rotate(0deg); }
  18%, 100% { opacity: 0; transform: scale(1.12) translateY(-2%) rotate(-1deg); }
}

@keyframes eventPresetFour {
  0%, 12% { opacity: 1; transform: scale(1.02) translateX(0); }
  18%, 100% { opacity: 0; transform: scale(1.08) translateX(3%); }
}

.event-player-overlay {
  position: absolute;
  inset: auto clamp(16px, 4vw, 44px) 74px clamp(16px, 4vw, 44px);
  z-index: 2;
  display: grid;
  gap: 12px;
  max-width: 860px;
  color: #fff;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.72);
}

.event-player-overlay span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: #0f766e;
  font-weight: 950;
}

.event-player-overlay h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 70px);
  line-height: 1.05;
  letter-spacing: 0;
}

.event-player-overlay p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.5;
}

.event-player-overlay small {
  color: #fff;
  font-weight: 900;
  line-height: 1.45;
}

.event-player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.86));
}

.event-player-controls button {
  min-width: 84px;
}

.event-player-controls span {
  color: #fff;
  font-weight: 900;
  text-align: center;
}

.event-form-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px clamp(18px, 3vw, 30px);
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.event-message {
  margin: 0;
  color: #475467;
  font-weight: 800;
}

.event-ad-footer {
  margin: 18px auto 0;
  padding: 10px;
  border: 1px solid rgba(216, 224, 236, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.event-ad-footer ins {
  min-height: 70px;
}

.public-view-mode .event-step:not([data-step="4"]),
.public-view-mode .event-steps,
.public-view-mode .event-form-footer {
  display: none;
}

.events-view-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(216, 224, 236, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.events-view-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
}

.events-view-hero p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.event-watch-panel,
.events-gallery-section {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(216, 224, 236, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.event-watch-panel[hidden] {
  display: none;
}

.events-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.event-gallery-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: #fbfcff;
  text-decoration: none;
}

.event-gallery-card div {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #fff;
}

.event-gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-gallery-card div span {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 12px;
  text-align: center;
  font-weight: 950;
}

.event-gallery-card strong {
  line-height: 1.25;
}

.event-gallery-card small {
  color: var(--muted);
  font-weight: 900;
}

.share-btn.whatsapp {
  border-color: #16a34a;
  color: #fff;
  background: #16a34a;
}

.share-btn.facebook {
  border-color: #2563eb;
  color: #fff;
  background: #2563eb;
}

.share-btn.email {
  border-color: #f59e0b;
  color: #111827;
  background: #fbbf24;
}

@media (max-width: 860px) {
  .event-hero,
  .events-view-hero,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .event-steps {
    grid-template-columns: repeat(5, minmax(118px, 1fr));
    overflow-x: auto;
  }

  .event-type-grid,
  .voice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-form-footer {
    grid-template-columns: 1fr;
  }

  .event-player-overlay {
    inset: auto 14px 72px 14px;
  }

  .event-player-overlay p {
    display: none;
  }
}

@media (max-width: 560px) {
  .event-header {
    min-height: 58px;
  }

  .event-shell {
    padding: 12px;
  }

  .event-type-grid,
  .voice-grid {
    grid-template-columns: 1fr;
  }

  .event-preview-stage {
    min-height: 320px;
  }
}
