:root {
  --bg: #0f0a1f;
  --bg-alt: #160f2e;
  --surface: #1c1438;
  --surface-2: #241a45;
  --text: #f5f3ff;
  --text-dim: #b8b0d9;
  --pink: #ff3ea5;
  --orange: #ff8a3d;
  --purple: #8b5cf6;
  --blue: #4f8dff;
  --green: #2fe0a0;
  --grad: linear-gradient(120deg, var(--pink), var(--purple) 50%, var(--blue));
  --radius: 18px;
  --shadow: 0 20px 60px -20px rgba(139, 92, 246, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", ui-sans-serif, system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.5;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { color: var(--text-dim); margin: 0; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Background blobs */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}
.blob-1 { width: 480px; height: 480px; background: var(--pink); top: -150px; left: -120px; }
.blob-2 { width: 520px; height: 520px; background: var(--blue); top: 200px; right: -200px; }
.blob-3 { width: 420px; height: 420px; background: var(--purple); bottom: -180px; left: 30%; }

main, header, footer { position: relative; z-index: 1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(255, 62, 165, 0.55);
}
.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.16);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Nav */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(15, 10, 31, 0.72);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.brand {
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-mark { font-size: 1.3rem; }
.nav-links {
  display: flex;
  gap: 30px;
  font-weight: 500;
  color: var(--text-dim);
}
.nav-links a:hover { color: var(--text); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 90px 24px 40px;
}
.badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.35);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  max-width: 820px;
  margin: 0 auto 20px;
  letter-spacing: -0.02em;
}
.lead {
  max-width: 620px;
  margin: 0 auto 34px;
  font-size: 1.15rem;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 50px;
}
/* Event meta strip */
.event-meta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.event-meta-item {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text-dim);
}
.event-meta-item strong { color: var(--text); }

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 auto 12px;
}
.countdown-item {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 92px;
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.countdown-num {
  font-size: 2.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.countdown-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.countdown-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 40px;
}
.countdown.closed .countdown-num { opacity: 0.4; }

/* Logos */
.logos { text-align: center; padding: 30px 24px; }
.logos p { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 18px; }
.logo-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  opacity: 0.7;
}

/* Section head */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 50px;
}
.eyebrow {
  display: inline-block;
  color: var(--pink);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 14px;
}

.features, .how, .faq, .cta {
  padding: 80px 24px;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.icon-1 { background: rgba(255,62,165,0.15); }
.icon-2 { background: rgba(139,92,246,0.15); }
.icon-3 { background: rgba(79,141,255,0.15); }
.icon-4 { background: rgba(47,224,160,0.15); }
.icon-5 { background: rgba(255,138,61,0.15); }
.icon-6 { background: rgba(255,62,165,0.15); }
.feature-card h3 { margin-bottom: 10px; font-size: 1.15rem; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}
.step {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 34px 28px;
  border: 1px solid rgba(255,255,255,0.07);
  text-align: center;
}
.step-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.step h3 { margin-bottom: 10px; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin: 0 auto; }
.faq-list details {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px 22px;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-list summary::after { content: "+"; font-size: 1.3rem; color: var(--pink); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin-top: 14px; }

/* CTA */
.cta-box {
  text-align: center;
  background: var(--grad);
  border-radius: 28px;
  padding: 60px 30px;
  color: #fff;
}
.cta-box h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 14px; }
.cta-box p { color: rgba(255,255,255,0.9); margin-bottom: 30px; }

/* Registration form */
.register-form {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"] {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(20, 16, 31, 0.9);
  color: #fff;
}
.form-row input::placeholder { color: rgba(255,255,255,0.45); }
.form-row input:focus {
  outline: none;
  border-color: #fff;
}
.form-row input.invalid {
  border-color: #ffe066;
  box-shadow: 0 0 0 3px rgba(255, 224, 102, 0.25);
}

.form-row-checkbox { margin-top: 4px; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #14101f;
}
.checkbox-label a { text-decoration: underline; font-weight: 600; color: #fff; }
.checkbox-label.invalid span { color: #ffe066; font-weight: 600; }

.register-form .btn-primary {
  background: #14101f;
  box-shadow: none;
  margin-top: 4px;
}
.register-form .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  margin: 4px 0 0;
  font-size: 0.9rem;
  min-height: 1.2em;
  color: rgba(255,255,255,0.95);
  font-weight: 600;
}
.form-message.error { color: #ffe066; }
.form-message.success { color: #baffd9; }

/* Footer */
.footer {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 60px 24px 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}
.footer-grid > div { display: flex; flex-direction: column; gap: 12px; }
.footer-grid h4 { font-size: 0.9rem; margin-bottom: 6px; }
.footer-grid a { color: var(--text-dim); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 24px;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}

/* Chat widget */
.chat-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
}
.chat-toggle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: var(--grad);
  box-shadow: 0 12px 30px -8px rgba(255, 62, 165, 0.55);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.chat-toggle:hover { transform: scale(1.06); }

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(360px, calc(100vw - 44px));
  height: min(500px, calc(100vh - 140px));
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
}
.chat-close {
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
}
.chat-msg.bot {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--grad);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.error {
  align-self: flex-start;
  background: rgba(255, 224, 102, 0.12);
  color: #ffe066;
  border: 1px solid rgba(255, 224, 102, 0.35);
}
.chat-msg.typing {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text-dim);
  font-style: italic;
}
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.chat-input-row input {
  flex: 1;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(20, 16, 31, 0.6);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}
.chat-input-row input:focus { outline: none; border-color: var(--purple); }
.chat-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--grad);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
}
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 480px) {
  .chat-widget { right: 14px; bottom: 14px; }
  .chat-panel { right: -6px; }
}

/* Responsive */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-wrap.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-cta { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

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