:root {
  --bg: #08090d;
  --bg-2: #0d1017;
  --card: #12151d;
  --card-2: #0f1219;
  --line: #232733;
  --neon: #ff5a1f;
  --neon-2: #ff8a3d;
  --neon-soft: rgba(255, 90, 31, .13);
  --neon-glow: rgba(255, 90, 31, .45);
  --neon-line: rgba(255, 90, 31, .38);
  --text: #f2f4f8;
  --muted: #8a91a5;
  --green: #35d07f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* Неоновые блики фона, как у ORIDOS: тёплые радиальные пятна на чёрном */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(620px 420px at 88% -12%, rgba(255, 90, 31, .17), transparent 70%),
    radial-gradient(520px 380px at -14% 34%, rgba(255, 90, 31, .07), transparent 70%),
    radial-gradient(700px 500px at 50% 118%, rgba(255, 90, 31, .05), transparent 70%),
    var(--bg);
}

#app { max-width: 480px; margin: 0 auto; min-height: 100%; padding-bottom: 86px; }

main { padding: 18px 16px 0; }

.screen.hidden, .hidden { display: none !important; }

/* ── Карточка анкеты: неоновая рамка ── */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--neon-line);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 0 26px rgba(255, 90, 31, .12),
    inset 0 0 40px rgba(255, 90, 31, .04),
    0 14px 34px rgba(0, 0, 0, .5);
}
.card-body { padding: 14px 18px 18px; }
.card-photo {
  width: 100%; height: 250px; object-fit: cover; display: block;
  border-bottom: 1px solid var(--neon-line);
}
.card-photo-fallback {
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(300px 200px at 70% 20%, rgba(255, 90, 31, .25), transparent 70%),
    radial-gradient(260px 200px at 20% 90%, rgba(255, 90, 31, .12), transparent 70%),
    var(--bg-2);
}
.card-photo-fallback span {
  font-size: 84px; font-weight: 900; color: var(--neon-2);
  text-shadow: 0 0 34px rgba(255, 138, 61, .5);
}
.card::before {
  content: "";
  position: absolute; top: -1px; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  box-shadow: 0 0 12px var(--neon-glow);
  z-index: 2;
}
.card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-name {
  font-size: 24px; font-weight: 900; letter-spacing: .3px;
  text-shadow: 0 0 24px rgba(255, 90, 31, .18);
}
.card-age { color: var(--muted); font-size: 16px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #343b4e; display: inline-block; }
.dot.online {
  background: var(--green);
  box-shadow: 0 0 10px rgba(53, 208, 127, .9);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .55; } }
.dot-label { font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

.badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.badge {
  font-size: 12px; font-weight: 800; letter-spacing: .04em;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: #b9c0d4;
  border: 1px solid var(--line);
}
.badge.rank {
  background: var(--neon-soft); color: var(--neon-2);
  border-color: var(--neon-line);
  box-shadow: 0 0 14px rgba(255, 90, 31, .22), inset 0 0 12px rgba(255, 90, 31, .08);
  text-shadow: 0 0 10px rgba(255, 138, 61, .55);
}
.badge.goal {
  background: rgba(53, 208, 127, .08); color: #8fe7b6;
  border-color: rgba(53, 208, 127, .35);
}

.card-about {
  margin-top: 14px; font-size: 14px; line-height: 1.5; color: #c9d0e4;
  white-space: pre-wrap; word-break: break-word;
  border-left: 2px solid var(--neon-line);
  padding-left: 12px;
}
.card-user { margin-top: 12px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }

/* ── Кнопки-действия под карточкой (Tinder-style) ── */
.card-actions { display: flex; gap: 10px; margin-top: 16px; }
.action-btn {
  flex: 0 0 58px; height: 58px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--card-2);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .08s, border-color .2s, box-shadow .2s;
}
.action-btn svg { display: block; }
.action-btn:active { transform: scale(.9); }
.action-btn.danger { color: #ff5d73; border-color: rgba(255, 93, 115, .45); }
.action-btn.danger:active { box-shadow: 0 0 18px rgba(255, 93, 115, .45); border-color: rgba(255, 93, 115, .8); }
.action-btn.like { color: #35d07f; border-color: rgba(53, 208, 127, .45); }
.action-btn.like:active { box-shadow: 0 0 18px rgba(53, 208, 127, .5); border-color: rgba(53, 208, 127, .8); }
.action-write {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 900; letter-spacing: .04em;
  color: #fff;
  background: linear-gradient(135deg, var(--neon) 0%, var(--neon-2) 100%);
  border: 1px solid rgba(255, 138, 61, .6);
  border-radius: 18px;
  box-shadow: 0 0 22px var(--neon-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.action-write:active { transform: scale(.97); }

/* ── Избранное ── */
.fav-item {
  position: relative;
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 15px 14px; margin-bottom: 11px;
  transition: border-color .2s;
}
.fav-item:hover { border-color: var(--neon-line); }
.fav-head { display: flex; align-items: center; gap: 8px; }
.fav-name { font-weight: 900; font-size: 17px; }
.fav-meta { color: var(--muted); font-size: 13px; margin-top: 5px; }
.fav-btns { display: flex; gap: 8px; margin-top: 11px; }
.fav-btns .btn { flex: 1; padding: 11px; }

/* ── Кнопки ── */
.btn {
  border: none; border-radius: 14px; cursor: pointer;
  font-weight: 800; font-size: 15px; color: var(--text);
}
.btn-primary {
  width: 100%; padding: 15px; margin-top: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--neon) 0%, var(--neon-2) 100%);
  box-shadow: 0 0 24px var(--neon-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
  letter-spacing: .03em;
}
.btn-primary:active { transform: scale(.98); }
.btn-ghost { padding: 10px 18px; background: var(--card-2); border: 1px solid var(--line); }
.btn-ghost:active { border-color: var(--neon-line); }

/* ── Пустые состояния ── */
.empty { text-align: center; padding: 54px 18px; color: var(--muted); }
.empty-emoji { font-size: 44px; margin-bottom: 12px; filter: drop-shadow(0 0 18px rgba(255, 90, 31, .5)); }
.empty-title { font-size: 18px; font-weight: 900; color: var(--text); margin-bottom: 7px; letter-spacing: .02em; }
.empty-sub { font-size: 13px; margin-bottom: 18px; }

/* ── Форма профиля ── */
.form-card {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--line); border-radius: 20px; padding: 18px 16px;
}
.form-hint {
  font-size: 11px; color: var(--muted); margin-bottom: 14px;
  letter-spacing: .06em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.form-hint::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 8px var(--neon-glow); flex: 0 0 auto; }
.f-label {
  display: block; font-size: 11px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .18em; margin: 16px 0 8px;
}
.f-input, textarea.f-input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px; color: var(--text); font-size: 15px;
  outline: none; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.f-input:focus {
  border-color: var(--neon-line);
  box-shadow: 0 0 14px rgba(255, 90, 31, .18);
}
textarea.f-input { resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  transition: all .15s;
}
.chip.on {
  background: var(--neon-soft); color: var(--neon-2);
  border-color: var(--neon-line);
  box-shadow: 0 0 12px rgba(255, 90, 31, .25), inset 0 0 10px rgba(255, 90, 31, .07);
  text-shadow: 0 0 8px rgba(255, 138, 61, .5);
}

.toggle {
  display: flex; align-items: center; gap: 11px; margin-top: 20px; cursor: pointer;
  font-size: 14px; font-weight: 700; background: none; border: none; color: var(--text);
}
.toggle-track {
  width: 46px; height: 27px; border-radius: 999px;
  background: #1c2130; border: 1px solid var(--line);
  position: relative; transition: .2s; flex: 0 0 auto;
}
.toggle-dot {
  position: absolute; top: 2.5px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #6a7288; transition: .2s;
}
.toggle.on .toggle-track { background: var(--neon-soft); border-color: var(--neon-line); box-shadow: 0 0 14px rgba(255, 90, 31, .25); }
.toggle.on .toggle-dot { left: 21px; background: var(--neon); box-shadow: 0 0 10px var(--neon-glow); }
.form-foot { text-align: center; color: var(--muted); font-size: 11px; margin-top: 14px; letter-spacing: .14em; text-transform: uppercase; }

/* ── Таб-бар ── */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 20;
  display: flex; background: rgba(8, 9, 13, .97);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar::before {
  content: ""; position: absolute; top: -1px; left: 20%; right: 20%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 90, 31, .5), transparent);
}
.tab {
  flex: 1; background: none; border: none; cursor: pointer;
  padding: 11px 4px 13px; color: var(--muted); font-size: 19px;
  transition: color .2s;
}
.tab span { display: block; font-size: 10px; font-weight: 800; margin-top: 3px; position: relative; letter-spacing: .04em; }
.tab.active { color: var(--neon-2); filter: drop-shadow(0 0 8px rgba(255, 90, 31, .6)); }
.tab.active span { color: var(--neon-2); text-shadow: 0 0 10px rgba(255, 138, 61, .5); }
#favs-badge {
  position: absolute; top: -7px; right: -15px;
  background: var(--neon); color: #fff;
  font-size: 9px; font-weight: 900; border-radius: 999px; padding: 1px 5px;
  box-shadow: 0 0 10px var(--neon-glow);
}

/* ── Toast ── */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  background: #14121a; color: var(--text); font-size: 13px; font-weight: 700;
  padding: 11px 18px; border-radius: 13px;
  border: 1px solid var(--neon-line);
  box-shadow: 0 0 18px rgba(255, 90, 31, .2), 0 10px 26px rgba(0, 0, 0, .5);
  z-index: 50; max-width: 90%; text-align: center;
}

/* ── Счётчики и пометки ── */
.count { color: var(--neon-2); text-shadow: 0 0 8px rgba(255, 138, 61, .5); margin-left: 6px; }
.opt { color: var(--muted); text-transform: none; letter-spacing: .04em; font-weight: 600; margin-left: 6px; }
.f-note { font-size: 11px; color: var(--muted); margin-top: 7px; }

/* ── Степпер звёзд Мифика ── */
.stars-box {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
  background: var(--bg-2); border: 1px solid var(--neon-line);
  border-radius: 14px; padding: 8px 10px;
  box-shadow: 0 0 14px rgba(255, 90, 31, .15);
}
.stars-btn {
  width: 42px; height: 40px; border-radius: 11px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--neon-2); font-size: 22px; font-weight: 900; cursor: pointer;
}
.stars-btn:active { box-shadow: 0 0 12px rgba(255, 90, 31, .3); }
.stars-value {
  flex: 1; text-align: center; font-size: 19px; font-weight: 900; color: var(--gold);
  text-shadow: 0 0 14px rgba(245, 185, 66, .45);
}
.stars-value b { font-size: 24px; }

/* ── Поиск героев ── */
.hero-search { position: relative; }
.hero-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--card); border: 1px solid var(--neon-line);
  border-radius: 14px; padding: 6px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .6), 0 0 16px rgba(255, 90, 31, .15);
  max-height: 240px; overflow-y: auto;
}
.hs-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--text);
  font-size: 14px; font-weight: 600; padding: 10px 12px; border-radius: 10px; cursor: pointer;
}
.hs-item:active { background: var(--neon-soft); }
.hero-chip .hx { color: var(--muted); font-weight: 900; margin-left: 2px; }
.hero-all-btn {
  margin-top: 10px; background: none; border: none; cursor: pointer;
  color: var(--neon-2); font-size: 12px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 138, 61, .4);
}
.hero-catalog {
  margin-top: 10px; max-height: 220px; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px;
}

/* ── Карточка: герои и «ищет» ── */
.card-heroes, .card-wanted { margin-top: 10px; font-size: 13px; color: #aab3cd; }
.card-wanted { color: var(--muted); }
.muted { color: var(--muted); }

/* ── Раздел лайков ── */
.sec-title {
  font-size: 13px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text); margin: 20px 0 10px;
  display: flex; align-items: center; gap: 6px;
}
.sec-title .count { color: var(--neon-2); }
.mutual-tag { margin-left: 4px; }
.mutual-badge {
  margin-top: 10px; font-size: 12px; font-weight: 800;
  color: #8fe7b6; background: rgba(53, 208, 127, .08);
  border: 1px solid rgba(53, 208, 127, .35);
  border-radius: 10px; padding: 8px 12px;
}
.btn.like-back { color: #8fe7b6; border-color: rgba(53, 208, 127, .35); }
.btn.like-back:active { box-shadow: 0 0 12px rgba(53, 208, 127, .4); }
