/* Mobile-first · WebView optimized */
:root {
  --bg-deep: #0a0612;
  --bg-card: rgba(22, 14, 36, 0.85);
  --bg-card-hover: rgba(32, 20, 52, 0.95);
  --accent: #e84393;
  --accent-soft: rgba(232, 67, 147, 0.25);
  --accent-glow: rgba(232, 67, 147, 0.45);
  --adult: #2ecc71;
  --adult-bg: rgba(46, 204, 113, 0.12);
  --adult-border: rgba(46, 204, 113, 0.55);
  --minor: #e74c3c;
  --minor-bg: rgba(231, 76, 60, 0.12);
  --minor-border: rgba(231, 76, 60, 0.45);
  --text: #f5f0fa;
  --text-muted: rgba(245, 240, 250, 0.55);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --radius-lg: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Outfit", system-ui, -apple-system, sans-serif;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  background: var(--bg-deep);
}

body {
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  user-select: none;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: 280px;
  height: 280px;
  top: -80px;
  right: -60px;
  background: var(--accent-glow);
  opacity: 0.35;
}

.bg-glow--2 {
  width: 220px;
  height: 220px;
  bottom: 10%;
  left: -70px;
  background: rgba(155, 89, 182, 0.35);
  opacity: 0.3;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding-top: var(--safe-top);
}

.page-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: 12px 20px 16px;
  max-width: 480px;
  margin: 0 auto;
}

/* Screens */
.screen {
  display: none;
  flex-direction: column;
  min-height: calc(100dvh - 340px - var(--safe-top) - var(--safe-bottom));
  animation: fadeOut 0.2s ease forwards;
}

.screen--active {
  display: flex;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

.screen-header {
  text-align: center;
  margin-bottom: 28px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.title {
  font-size: clamp(1.65rem, 5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
}

.hero-icon {
  display: flex;
  justify-content: center;
  margin: 8px 0 32px;
  color: var(--accent);
}

.hero-icon svg {
  width: 88px;
  height: 88px;
}

/* Age buttons — large green / red */
.btn-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  justify-content: center;
  padding: 4px 0 20px;
}

.choice-btn {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: 112px;
  padding: 26px 24px;
  border-radius: 20px;
  border: 3px solid transparent;
  color: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

.choice-btn:active {
  transform: scale(0.97);
  filter: brightness(1.08);
}

.choice-btn__icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 1.5rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.choice-btn__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.choice-btn__text strong {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.choice-btn__text small {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
}

.choice-btn--adult {
  background: linear-gradient(145deg, #3ee07a 0%, #22c55e 45%, #16a34a 100%);
  border-color: #4ade80;
  box-shadow: 0 12px 36px rgba(34, 197, 94, 0.45);
}

.choice-btn--adult.choice-btn--selected {
  box-shadow: 0 14px 42px rgba(34, 197, 94, 0.55);
}

.choice-btn--minor {
  background: linear-gradient(145deg, #f87171 0%, #ef4444 45%, #dc2626 100%);
  border-color: #fca5a5;
  box-shadow: 0 12px 36px rgba(239, 68, 68, 0.45);
}

.choice-btn--minor.choice-btn--selected {
  box-shadow: 0 14px 42px rgba(239, 68, 68, 0.55);
}

.primary-cta {
  width: 100%;
  min-height: 54px;
  margin-top: auto;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #e84393, #c44569);
  color: #fff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 28px var(--accent-glow);
  transition: transform 0.2s, opacity 0.2s;
}

.primary-cta:active {
  transform: scale(0.98);
}

.primary-cta--outline {
  background: transparent;
  border: 2px solid var(--border);
  box-shadow: none;
  color: var(--text);
}

/* Gender */
.gender-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
  align-content: start;
  padding-top: 12px;
}

.gender-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, border-color var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(12px);
}

.gender-card:active {
  transform: scale(0.96);
  border-color: var(--accent);
  box-shadow: 0 0 32px var(--accent-soft);
}

.gender-card__emoji {
  font-size: 3.5rem;
  line-height: 1;
}

.gender-card[data-gender="male"]:active {
  border-color: #3498db;
  box-shadow: 0 0 28px rgba(52, 152, 219, 0.25);
}

.gender-card[data-gender="female"]:active {
  border-color: #e84393;
  box-shadow: 0 0 28px var(--accent-soft);
}

.gender-card__label {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Lists (category / country) */
.scroll-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
  max-height: calc(100dvh - 380px);
}

.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, background 0.2s;
}

.list-item:active {
  transform: scale(0.99);
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.list-item__icon {
  font-size: 1.4rem;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

.list-item__label {
  flex: 1;
}

.list-item__arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.search-wrap {
  margin-bottom: 14px;
}

.search-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--accent);
}

/* Media type */
.media-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  padding-top: 8px;
}

.media-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 160px;
  padding: 28px 24px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, border-color var(--transition), box-shadow var(--transition);
}

.media-card:active {
  transform: scale(0.98);
  border-color: var(--accent);
  box-shadow: 0 0 36px var(--accent-soft);
}

.media-card__icon {
  width: 56px;
  height: 56px;
  color: var(--accent);
}

.media-card__icon svg {
  width: 100%;
  height: 100%;
}

.media-card__label {
  font-size: 1.25rem;
  font-weight: 600;
}

.media-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Done / blocked */
.done-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 24px 0;
}

.done-check {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--adult-bg);
  color: var(--adult);
  font-size: 2.2rem;
  font-weight: 700;
  border: 2px solid var(--adult-border);
  margin-bottom: 8px;
}

.done-check--blocked {
  background: var(--minor-bg);
  color: var(--minor);
  border-color: var(--minor-border);
}

/* Progress */
.progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 10;
  padding-bottom: var(--safe-bottom);
}

.progress-bar__fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--accent), #9b59b6);
  transition: width var(--transition);
  border-radius: 0 2px 2px 0;
}

/* WebView: hide scrollbars but keep scroll */
.scroll-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Google Ad Manager slots */
.ad-rail {
  flex-shrink: 0;
  padding: 8px 12px;
  text-align: center;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
}

.ad-rail--bottom {
  border-bottom: none;
  border-top: 1px solid var(--border);
  padding-bottom: calc(8px + var(--safe-bottom));
}

.ad-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ad-slot {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-slot--top {
  min-width: 300px;
  min-height: 250px;
  width: 100%;
}

.ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.ad-overlay--visible {
  display: flex;
}

.ad-overlay__panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 20px 16px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
}

.ad-overlay__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.ad-overlay__title {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 4px 0 12px;
}

.ad-overlay__slots {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

body.ad-overlay-open {
  overflow: hidden;
}

body.ad-overlay-open .page-content {
  pointer-events: none;
}
