:root {
  --bg: #edf1f4;
  --surface: #ffffff;
  --surface-muted: #f7f8fa;
  --ink: #20242a;
  --muted: #6f7682;
  --line: #e7eaef;
  --primary: #f30278;
  --primary-dark: #3568bd;
  --danger: #d14a56;
  --ok: #2f8b5e;
  --radius: 28px;
  --radius-sm: 18px;
  --shadow-soft: 0 10px 30px rgba(25, 41, 71, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

body {
  padding-bottom: 108px;
}

a {
  color: inherit;
}

.main-wrap {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 16px 14px 24px;
}

.hero-video {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(170deg, rgba(5, 15, 35, 0.35), rgba(5, 15, 35, 0.58));
}

.hero-content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 24px;
  color: #fff;
}

.hero-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2rem;
  line-height: 1.1;
  margin: 0;
  font-weight: 800;
}

.hero-text {
  color: rgba(255, 255, 255, 0.86);
  margin: 0;
}

.auth-links {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-soft);
}

.card-soft {
  background: var(--surface);
}

.card-title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  line-height: 1.1;
  font-weight: 800;
}

.card-subtitle {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.form-group {
  margin-bottom: 12px;
}

label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 7px;
  font-weight: 700;
}

input,
button,
textarea,
select {
  font: inherit;
}

.input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  background: var(--surface-muted);
  color: var(--ink);
}

.input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(74, 127, 216, 0.2);
  border-color: var(--primary);
  background: #fff;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 12px 0 15px;
  font-size: 0.95rem;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  padding: 13px 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 130ms ease, background 130ms ease;
  cursor: pointer;
}

.btn:hover,
.btn:focus {
  background: var(--primary-dark);
}

.btn:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: #5f6a7a;
}

.btn-muted {
  background: #e9edf4;
  color: #2f3846;
}

.btn-danger {
  background: var(--danger);
}

.inline-links {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.96rem;
}

.inline-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.alert {
  border-radius: 16px;
  padding: 11px 13px;
  margin-bottom: 11px;
  font-size: 0.94rem;
}

.alert-error {
  background: #fdecef;
  color: #9f2c3b;
}

.alert-success {
  background: #e6f6ee;
  color: #1e6d47;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.rich-content {
  white-space: normal;
  line-height: 1.55;
}

.rich-content p,
.rich-content h2,
.rich-content h3,
.rich-content h4 {
  margin: 0 0 10px;
}

.rich-content ul,
.rich-content ol {
  margin: 0 0 10px 20px;
  padding: 0;
}

.rich-content li {
  margin-bottom: 6px;
}

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

.tag {
  font-size: 0.79rem;
  background: #edf2fb;
  color: #5678b0;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
}

.challenge-media-wrap {
  margin-top: 12px;
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 24px;
  border: 0;
  overflow: hidden;
  background: #000;
}

.challenge-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.challenge-media-embed {
  border: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: none;
}

.media-sound-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 18, 29, 0.7);
  color: #fff;
  padding: 8px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.media-sound-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: 2px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(100%, 560px);
  height: 68px;
  padding: 0px 8px 8px;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #e5eaf2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 25;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  font-size: 0.72rem;
  color: #6e7684;
  font-weight: 600;
  border-radius: 14px;
  transition: transform 150ms ease, color 150ms ease;
}

.nav-item:active {
  transform: scale(0.97);
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
}

.nav-icon svg {
  width: 25px;
  height: 25px;
  fill: #f30278;
}

.nav-label {
  line-height: 1;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active .nav-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(160deg, #e91e6391, #E91E63);
  border-radius: 50%;
  margin-top: -18px;
  box-shadow: 0 10px 18px rgba(53, 93, 176, 0.3);
}

.nav-item.active .nav-icon svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

.nav-item.active .nav-label {
  color: #6b6d71;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  width: 44px;
  height: 4px;
  border-radius: 99px;
  background: #3e70d2;
}

.top-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.head-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.head-logo {
  height: 2.9rem;
  width: auto;
  display: block;
}

.state-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.08;
}

.grid-two {
  display: grid;
  gap: 12px;
}

.cf-turnstile {
  width: 100%;
  overflow: hidden;
}

@media (min-width: 768px) {
  body {
    padding-top: 10px;
  }

  .main-wrap {
    padding: 20px 18px 30px;
  }

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