:root {
  --bg: #111111;
  --text: #ffffff;
  --muted: #9a93a6;
  --violet: #a12cf5;
  --violet-deep: #5a128f;
  --pink: #ff17c5;
  --card: #3b1260;
  --radius: 10px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Roboto, "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }

/* фон: картинка webapp/static/media/back.jpg */
.pattern {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: #111111 url("media/back.jpg") center top / cover no-repeat;
}

.screen { display: none; position: relative; z-index: 1; min-height: 100vh; }
.screen.active { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------ intro */
#intro { overflow: hidden; }
/* тёмная виньетка с фиолетовым оттенком, как в оригинальном видео */
#intro::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 75% 60% at 50% 48%, rgba(40, 6, 50, .15), rgba(0, 0, 0, .72) 100%);
}
#intro video { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
#intro.has-video::before { display: none; }  /* в ролике своя виньетка */
.splash { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; }
.neon-name {
  position: relative; z-index: 2;
  margin: 0; text-align: center; font-family: "Bebas Neue", Oswald, Impact, sans-serif; font-weight: 400;
  font-size: clamp(70px, 25vw, 140px); line-height: .98; letter-spacing: .07em; text-transform: uppercase;
  color: #c81ff0;
  text-shadow: 0 0 3px rgba(214, 60, 255, .7), 0 0 14px rgba(180, 20, 240, .45), 0 0 34px rgba(140, 10, 220, .3);
  animation: flicker .8s ease-in both, name-pulse .9s .9s ease-in-out infinite alternate;
}
/* как в оригинале: цвет переливается маджента -> фиолетовый */
@keyframes name-pulse {
  0%, 35% { color: #d21cf2; }
  60% { color: #b524f0; }
  100% { color: #8f2cf0; text-shadow: 0 0 3px rgba(160, 60, 255, .6), 0 0 14px rgba(120, 30, 240, .4), 0 0 30px rgba(100, 10, 220, .25); }
}
.neon-name span { display: block; }
@keyframes flicker {
  0% { opacity: 0; } 8% { opacity: 1; } 11% { opacity: .2; } 15% { opacity: 1; }
  20% { opacity: .5; } 24%, 100% { opacity: 1; }
}
/* неоновая рамка с подсветкой узора фона (точки считает app.js) */
.neon-frame {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none;
  opacity: 0; animation: frame-in .35s ease-out forwards;
}
.nf-line {
  fill: none; stroke: #b52cff; stroke-width: 1.8; stroke-linejoin: round;
  filter: drop-shadow(0 0 2px #d35bff) drop-shadow(0 0 7px rgba(155, 18, 240, .85)) drop-shadow(0 0 16px rgba(122, 10, 208, .6));
}
.nf-haze { fill: none; stroke: #8a16e0; stroke-width: 30; opacity: .13; }
@keyframes frame-in { to { opacity: 1; } }

/* маленькие неоновые фрукты у линий рамки: вспыхивают и гаснут */
.neon-fruits { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.neon-fruit {
  position: absolute; margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2);
  width: var(--sz); height: var(--sz);
  fill: none; stroke: #ffe6ff; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 1.5px #f08bff) drop-shadow(0 0 6px #b324f5) drop-shadow(0 0 14px rgba(140, 20, 230, .8));
  opacity: 0; animation: fruit var(--life, 1.3s) ease-out forwards;
}
.neon-fruit.far { stroke-width: 1.8; filter: drop-shadow(0 0 4px #b324f5); }
@keyframes fruit {
  0%   { opacity: 0; transform: translate(0, 0) rotate(var(--r0)) scale(.85); }
  8%   { opacity: .9; }
  12%  { opacity: .35; }
  18%  { opacity: 1; transform: translate(0, 0) rotate(calc(var(--r0) + 6deg)) scale(1); }
  70%  { opacity: .95; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(calc(var(--r0) - 6deg)) scale(.96); }
}

/* ------------------------------------------------ language toggle */
.lang-toggle {
  background: none; border: 0; padding: 6px 2px; font-size: 22px; font-weight: 500; color: var(--text);
}
.lang-toggle b { color: var(--violet); font-weight: 500; }
#age .lang-toggle { position: absolute; top: 18px; right: 22px; z-index: 2; }

/* ------------------------------------------------ age gate */
#age { display: none; flex-direction: column; justify-content: space-between; padding: 0 24px 48px; }
#age.active { display: flex; }
.age-box { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 80px; }
.age-mark {
  font-family: Oswald, Impact, sans-serif; font-weight: 700; font-size: 132px; line-height: 1;
  color: transparent; -webkit-text-stroke: 5px var(--pink);
  filter: drop-shadow(0 0 10px rgba(255, 23, 197, .55));
}
.age-q { margin: 18px 0 0; font-size: 22px; font-weight: 500; }
.age-actions { display: grid; gap: 14px; }
.btn-solid, .btn-ghost {
  height: 64px; border-radius: 12px; font-size: 21px; font-weight: 500;
}
.btn-solid { border: 0; background: var(--pink); color: #fff; box-shadow: 0 0 24px rgba(255, 23, 197, .35); }
.btn-ghost { border: 2px solid var(--pink); background: rgba(110, 20, 110, .45); }

/* ------------------------------------------------ profile */
#profile { padding-bottom: 32px; font-size: 15px; }
.banner { height: 132px; overflow: hidden; background: linear-gradient(135deg, #2a0b45, #120818); }
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.head { display: flex; align-items: flex-start; gap: 14px; padding: 0 16px; }
.avatar {
  width: 108px; height: 108px; flex: none; margin-top: -22px; border-radius: 50%; object-fit: cover;
  border: 3px solid #1a1a1a; background: #2a0b45; position: relative;
}
.who { flex: 1; min-width: 0; padding-top: 14px; }
.name { display: flex; align-items: center; gap: 5px; font-size: 16px; font-weight: 500; text-transform: uppercase; letter-spacing: .01em; }
.name span { overflow-wrap: anywhere; line-height: 1.2; }
.verified { width: 18px; height: 18px; flex: none; }
.username { color: var(--muted); font-size: 13px; margin-top: 3px; }
.head .lang-toggle { padding-top: 12px; font-size: 16px; }
.row-links { display: flex; justify-content: space-between; align-items: flex-start; padding: 10px 16px 0; }
.pill {
  display: inline-flex; align-items: center; gap: 12px; padding: 0 14px 0 0; height: 36px;
  border: 1.5px solid #6a2aa6; border-radius: 8px; background: rgba(36, 12, 52, .7);
  font-size: 16.5px; font-weight: 500;
}
.pill .ico {
  width: 34px; height: 34px; padding: 7px; border-right: 1.5px solid #6a2aa6; background: rgba(70, 22, 105, .85);
  fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round;
}
.envelope { background: none; border: 0; padding: 0; }
/* конверт как в оригинале: острые углы, тонкая маджента-фиолетовая линия, верх вровень с «Мои соц.сети» */
.envelope { display: block; line-height: 0; }
.envelope svg {
  width: 94px; height: 66px; fill: none; stroke: #b41de9; stroke-width: 2.3; stroke-linejoin: miter;
  filter: drop-shadow(0 0 2px rgba(190, 40, 245, .55));
}
.section {
  margin: 20px 16px 10px; padding-bottom: 8px; text-align: center; font-size: 15px; font-weight: 400;
  border-bottom: 3px solid #9b2cf0; box-shadow: 0 5px 10px -7px rgba(161, 44, 245, .9);
}
.nbtn, .grid-channels button {
  width: 100%; min-height: 52px; padding: 10px 12px; border-radius: 8px;
  border: 1.5px solid #9a35ec;
  background: rgba(82, 20, 118, .72);
  font-size: 15px; font-weight: 500; transition: transform .12s, box-shadow .2s;
}
.nbtn:active, .grid-channels button:active, .wish:active, .order:active { transform: scale(.98); }
.grid-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px; }
.grid-channels .wide { grid-column: 1 / -1; }
.grid-channels .hl {
  border-color: #b04dff;
  background: linear-gradient(180deg, rgba(150, 45, 225, .72), rgba(105, 20, 170, .72));
  box-shadow: 0 0 16px rgba(170, 50, 255, .55), inset 0 0 14px rgba(255, 255, 255, .06);
}
.order {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 14px 16px 0; white-space: nowrap;
  min-height: 52px; padding: 0 16px 0 18px; border-radius: 8px;
  border: 1.5px solid #e01fb8;
  background: linear-gradient(90deg, rgba(110, 16, 120, .6), rgba(135, 22, 140, .55) 50%, rgba(110, 16, 120, .6));
  box-shadow: 0 0 12px rgba(224, 31, 184, .35); font-size: 14px; font-weight: 400;
}
.order i { width: 1.5px; align-self: stretch; margin: 12px 0; background: #e01fb8; }
.order-ico { width: 30px; height: 22px; margin-left: auto; fill: none; stroke: #ff3cd0; stroke-width: 3; }
/* рамка «дышит» свечением: от слабого к сильному */
.order { animation: order-glow 1.6s ease-in-out infinite alternate; }
/* «Закрытый VIP канал» дышит так же, только в фиолетовом и без блёсток */
.grid-channels .hl { animation: vip-glow 1.6s ease-in-out infinite alternate; }
@keyframes vip-glow {
  from { box-shadow: 0 0 3px rgba(170, 50, 255, .45), inset 0 0 2px rgba(200, 120, 255, .2); border-color: #9a3ae6; }
  to   { box-shadow: 0 0 16px rgba(170, 50, 255, .85), 0 0 28px rgba(140, 30, 230, .45), inset 0 0 10px rgba(200, 120, 255, .3); border-color: #c77bff; }
}
@keyframes order-glow {
  from { box-shadow: 0 0 3px rgba(255, 40, 200, .45), inset 0 0 2px rgba(255, 40, 200, .25); border-color: #c81aa6; }
  to   { box-shadow: 0 0 16px rgba(255, 40, 200, .85), 0 0 28px rgba(224, 31, 184, .45), inset 0 0 10px rgba(255, 60, 210, .35); border-color: #ff4fd8; }
}
.order > span:not(.spark), .order > i, .order > svg { position: relative; z-index: 1; }
.order > span:not(.spark) { white-space: nowrap; font-size: clamp(11px, 3.2vw, 13px); font-weight: 500; }  /* как в оригинале: всё в одну строку */
.order > i, .order > svg { flex: none; }  /* разделитель и конверт не сжимаются */
/* блёстки: летят снизу вверх и сгорают (создаёт app.js) */
.order > .spark {
  position: absolute; bottom: -4px; z-index: 0; pointer-events: none;
  width: var(--s, 2px); height: var(--s, 2px); border-radius: 50%;
  background: #fff; box-shadow: 0 0 4px #fff, 0 0 8px rgba(255, 120, 230, .9);
  animation: spark-up var(--d, 1.6s) linear forwards;
}
@keyframes spark-up {
  0%   { opacity: 0; transform: translate(0, 0) scale(1); }
  12%  { opacity: 1; }
  70%  { opacity: .9; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), calc(-1 * var(--h, 52px))) scale(.2); }
}
#services { display: grid; gap: 8px; padding: 14px 16px 0; }
.grid-wish { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 16px; }
.wish {
  position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 0; padding: 0;
  background: rgba(70, 18, 105, .8);
}
.wish img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wish .stamp {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-12deg);
  padding: 1px 6px; border: 2px solid var(--pink); border-radius: 3px;
  font-family: Oswald, Impact, sans-serif; font-weight: 700; font-size: clamp(12px, 4.2vw, 19px);
  letter-spacing: .03em; color: var(--pink); background: rgba(40, 0, 40, .35); white-space: nowrap;
}
.wish.done img { opacity: .75; }
.tips { display: block; width: calc(100% - 32px); margin: 20px 16px 0; }
/* ------------------------------------------------ мои соц.сети */
#socials { padding: 0 16px 32px; }
.s-bg {
  position: fixed; inset: -30px; z-index: -1; background: #120818 center / cover no-repeat;
  filter: blur(16px) brightness(.42) saturate(1.1);
}
.s-back {
  position: absolute; top: 12px; left: 12px; z-index: 2; display: none;
  width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .35); font-size: 22px;
}
body.no-tg .s-back { display: block; }
.s-wrap { position: relative; padding-top: 40px; }
.s-head { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.s-avatar { width: 140px; height: 140px; flex: none; border-radius: 50%; object-fit: cover; background: #2a0b45; }
.s-who { flex: 1; min-width: 0; text-align: center; }
.s-title {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
  padding-bottom: 10px; border-bottom: 3px solid var(--pink); font-size: 24px; font-weight: 500;
}
.s-check { width: 26px; height: 26px; flex: none; }
.s-badge { font-size: 22px; }
.s-subtitle { margin: 12px 0 0; font-size: 16px; font-weight: 500; line-height: 1.5; }

.s-list { display: grid; gap: 16px; }
.sbtn {
  position: relative; display: flex; align-items: center; justify-content: center; width: 100%;
  height: 62px; padding: 0 60px; border: 3px solid var(--pink); border-radius: 10px;
  background: rgba(14, 6, 20, .72); font-size: 25px; font-weight: 500; overflow: hidden;
  transition: transform .12s;
}
.sbtn:active, .sicon:active { transform: scale(.97); }
.sbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbtn .sico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.sbtn.filled {
  background: linear-gradient(90deg, #4e1380, #7a22b4 50%, #4e1380);
  box-shadow: 0 0 18px rgba(255, 23, 197, .25);
}
/* мерцающие искры на заливных кнопках */
.sbtn.filled::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 62% 30%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 80% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 92% 25%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 75%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 72% 85%, #fff 50%, transparent 51%);
  animation: twinkle 2.2s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .25; } to { opacity: 1; } }
.sico { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.s-icons { display: flex; justify-content: space-around; margin: 30px 0; }
.sicon { padding: 8px; border: 0; background: none; transition: transform .12s; }
.sicon .sico { width: 40px; height: 40px; }

.s-footer { margin: 34px 0 0; text-align: center; font-size: 22px; color: rgba(255, 255, 255, .22); }
