
/* --- Custom fonts added by assistant --- */

/* --- Global font override added to ensure MainFont applies to all text --- */
/* Apply main font to everything; headings are handled below to use TitleFont */
html, body, * , *::before, *::after {
  font-family: var(--main-font) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* Make sure form controls use the main font */
input, textarea, select, button, label, a {
  font-family: var(--main-font) !important;
}

/* Exceptions: headings use the site title font */
h1.site-title, h1, h2, h3, h4, .site-title, .header-title {
  font-family: var(--site-title-font) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}
/* --- end global font override --- */


@font-face {
  font-family: 'TitleFont';
  src: url('../assets/fonts/TitleFont.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'MainFont';
  src: url('../assets/fonts/MainFont.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --site-title-font: 'TitleFont', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  --main-font: 'MainFont', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

/* Apply fonts */
body, input, button, textarea, select {
  font-family: var(--main-font);
}
h1.site-title, h2, .site-title {
  font-family: var(--site-title-font);
  font-weight: 700;
}
/* --- end custom fonts --- */


:root {
  --brand1: #ff3b3b;
  --brand2: #38bdf8;
  --brand3: #a78bfa;
  --bg: #0a0f1e;
  --text: #e7ecff;
  --muted: #9fb0d8;
  --heading: #f2f6ff;
  --border: rgba(255, 255, 255, 0.12);
  --pill: #16233c;
  --accent: #38bdf8;
  --toggle-accent: #7dd3fc; /* цвет стрелки по умолчанию */
}
:root[data-theme="light"] {
  --bg: #fff;
  --text: #0b1220;
  --muted: #4b5a7b;
  --heading: #0b1220;
  --border: rgba(0, 0, 0, 0.15);
  --pill: #e7ecf9;
  --accent: #2563eb;
  --toggle-accent: #2563eb;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(40% 30% at 20% 20%, rgba(56,189,248, 0.12), transparent 60%),
    radial-gradient(35% 25% at 80% 30%, rgba(167,139,250, 0.12), transparent 60%),
    radial-gradient(30% 30% at 50% 90%, rgba(255,60,60, 0.10), transparent 60%);
  filter: blur(40px);
  animation: fogMove 22s ease-in-out infinite alternate;
}
body::after {
  animation-duration: 28s;
  animation-delay: -5s;
  opacity: 0.8;
}

@keyframes fogMove {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2%, -2%, 0) scale(1.05); }
}

#laser-canvas, #particles-canvas {
  position: fixed;
  inset: 0;
  display: block;
}
#laser-canvas { z-index: -2; }
#particles-canvas {
  z-index: -1;
  pointer-events: none;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 14px 110px; /* bottom padding for fixed footer */
}

header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 4px 2px 10px;
}

h1 {
  margin: 0;
  font-size: clamp(18px, 4.5vw, 28px);
  line-height: 1.2;
  color: var(--heading);
}

.sub {
  color: var(--muted);
  font-size: 13px;
}

.logo-link {
  justify-self: end;
  display: block;
  width: min(22vw, 92px);
  height: min(22vw, 92px);
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}
.logo-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  animation: logo-rotate 12s linear infinite;
}
.logo-link::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(60% 60% at 50% 50%, rgba(56,189,248, .55), transparent 70%);
  filter: blur(10px);
  opacity: 0.7;
  pointer-events: none;
  animation: logo-glow 3s ease-in-out infinite;
}

@keyframes logo-glow {
  0%, 100% { opacity: 0.55; filter: blur(9px); }
  50%      { opacity: 1; filter: blur(14px); }
}
@keyframes logo-rotate {
  to { transform: rotate(360deg); }
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 10px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(56,189,248, 0.5);
}
.toggle:active .sun-ico {
  animation: sunspin 0.6s linear;
}
@keyframes sunspin {
  to { transform: rotate(360deg); }
}

.divider {
  height: 1px;
  width: 100%;
  margin: 8px 0 12px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255, 0.18), transparent);
  box-shadow: 0 0 12px rgba(56,189,248, 0.25);
}

.divid {
  height: 100px;
  width: 100%;
  margin: 8px 0 12px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0), transparent);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0);
}

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  overflow: hidden;

  /* Убираем анимацию revealUp или задаём начальное состояние */
  opacity: 1;
  transform: translateY(0) scale(1);

  /* Добавляем плавный переход для transform, цвета и тени */
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  padding: 2px;
  background: conic-gradient(
    from var(--angle, 0deg),
    var(--brand2),
    var(--brand3),
    var(--brand2),
    var(--brand1),
    var(--brand2)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 7s linear infinite;
  pointer-events: none;
  opacity: 0.9;
}

.card:is(:hover, :focus-within) {
  border-color: color-mix(in hsl, var(--accent) 70%, transparent);
  box-shadow:
    0 18px 42px rgba(0,0,0,0.6),
    0 0 34px color-mix(in hsl, var(--accent) 85%, transparent);

  /* Эффект увеличения */
  transform: translateY(0) scale(1.05);
}



@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes spin {
  to { --angle: 360deg; }
}

/* row */
.row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: flex-start;
}

/* avatar */
.avatar-wrap {
  position: relative;
  display: inline-block;
}
.avatar-link {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}
.avatar-link::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(60% 60% at 50% 50%, color-mix(in hsl, var(--accent) 55%, transparent), transparent 70%);
  filter: blur(10px);
  opacity: 0.55;
  pointer-events: none;
  animation: ring-breathe 2.8s ease-in-out infinite;
}
@keyframes ring-breathe {
  0%, 100% { opacity: 0.45; filter: blur(9px); }
  50%      { opacity: 0.95; filter: blur(14px); }
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0f1f2e;
  border: 2px solid rgba(56,189,248, 0.65);
  box-shadow:
    0 0 18px rgba(56,189,248, 0.45),
    0 0 8px rgba(56,189,248, 0.35) inset;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* meta */
.meta h3 {
  margin: 2px 0 4px;
  font-size: 16px;
  color: var(--heading);
}
.country {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* links row */
.links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pill);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
.link::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(56,189,248, 0), rgba(72, 255, 0, 0.85), rgba(56,189,248, 0));
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.link:hover::before {
  opacity: 1;
}
.link:active {
  transform: scale(0.98);
  border-color: var(--accent);
  box-shadow: 0 0 12px 2px color-mix(in hsl, var(--accent) 90%, transparent);
}

.tg-icon,
.pay-ico {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
}
.pay-ico {
  filter: drop-shadow(0 0 6px rgba(56,189,248, 0.6));
}
.pay-ico .stroke {
  stroke: rgba(56,189,248, 0.95);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 36;
  animation: dash 2.2s linear infinite;
}
.pay-ico .fill {
  fill: rgba(56,189,248, 0.85);
}
@keyframes dash {
  to { stroke-dashoffset: -72; }
}

/* copy button */
.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(255,255,255, 0.18);
  background: transparent;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.copy:hover {
  border-color: var(--accent);
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  background: rgba(10, 15, 30, 0.9);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255, 0.15);
  box-shadow: 0 10px 24px rgba(0,0,0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.toast.show {
  opacity: 1;
}

/* pills */
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pill);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid rgba(255,255,255, 0.1);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s;
}
.pill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 1px;
  background: linear-gradient(120deg, rgba(56,189,248, 0), rgba(56,189,248, 0.85), rgba(56,189,248, 0));
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.pill:hover::before {
  opacity: 1;
}
.pill:active {
  transform: scale(0.98);
  border-color: var(--accent);
  box-shadow: 0 0 12px 2px color-mix(in hsl, var(--accent) 90%, transparent);
}

/* pill data-tip tooltip */
.pill[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -14px);
  background: rgba(10, 15, 30, 0.95);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255, 0.15);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.pill[data-tip].show::after,
.pill[data-tip]:hover::after {
  opacity: 1;
  transform: translate(-50%, -18px);
}

/* extras */
.extras {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255,255,255, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}
.share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

/* collapsible payments */
.pay-collapsible {
  margin-top: 8px;
}

.pay-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.pay-toggle:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px 2px color-mix(in hsl, var(--accent) 60%, transparent);
}
.pay-toggle .chev {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.2s;
}
.pay-toggle[aria-expanded="true"] .chev {
  transform: rotate(90deg);
}
.pay-list {
  padding: 10px 4px 0;
}

/* sun icon */
.sun-ico {
  width: 18px;
  height: 18px;
  display: inline-block;
}
.sun-ico circle {
  fill: currentColor;
  opacity: 0.9;
}
.sun-ico path {
  stroke: currentColor;
}

/* payment logos */
.pay-logo,
img.pay-logo {
  width: 1em;
  height: 1em;
  display: inline-grid;
  place-items: center;
  flex: 0 0 1em;
}
img.pay-logo {
  object-fit: contain;
  margin-right: 6px;
  vertical-align: middle;
  image-rendering: auto;
}

/* === Футер === */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  max-height: 50vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--footer-bg-start, rgba(10, 15, 30, 0.9)), var(--footer-bg-end, rgba(10, 15, 30, 0.96)));
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border, rgba(255,255,255,0.12));
  box-shadow: 0 -12px 36px var(--footer-shadow, rgba(0,0,0,0.45));
  padding: 12px 14px max(12px, env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.footer-open .site-footer {
  transform: translateY(0);
}

/* Делитель в футере */
.footer-divider {
  margin: 8px auto 12px;
  width: min(92%, 920px);
  height: 1px;
  background: var(--border, rgba(255,255,255,0.12));
}

/* Обертка кнопок */
.footer-btns {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Кнопки футера */
.footer-btn {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: var(--pill, #16233c);
  color: var(--text, #e7ecff);
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s;
  overflow: hidden;
}

.footer-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(56,189,248, 0), rgba(56,189,248, 0.85), rgba(56,189,248, 0));
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.footer-btn:hover::before {
  opacity: 1;
}

.footer-btn:active {
  transform: scale(0.98);
  border-color: var(--accent, #38bdf8);
  box-shadow: 0 0 12px 2px color-mix(in hsl, var(--accent, #38bdf8) 90%, transparent);
}

/* Текст копирайта */
.footer-copy {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: rgba(231,236,255, 0.65);
  text-shadow: 0 0 6px rgba(56,189,248, 0.35);
}

/* === Кнопка переключения футера === */
.footer-toggle {
  position: fixed;
  left: 50%;
  bottom: 10px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  background: color-mix(in hsl, var(--accent, #38bdf8) 8%, transparent);
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
  cursor: pointer;
  display: grid;
  place-items: center;
  transform: translate(-50%, 0);
  transition: transform 0.35s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  z-index: 61;
}

/* При открытом футере кнопка поднимается на высоту футера + отступ */
.footer-open .footer-toggle {
  transform: translate(-50%, calc(-100% - 50px));
}

/* Мобильное отображение - уменьшаем сдвиг кнопки */
@media (max-width: 560px) {
  .footer-open .footer-toggle {
    transform: translate(-50%, calc(-70% - 10));
  }
}

/* Стрелка (иконка) внутри кнопки */
.footer-toggle .chev {
  width: 20px;
  height: 20px;
  stroke: var(--toggle-accent, #7dd3fc);
  stroke-width: 2.2;
  fill: none;
  transition: transform 0.3s ease, stroke 0.2s ease;
  transform-origin: center;
}

.footer-open .footer-toggle .chev {
  stroke: #22c55e; /* зелёный цвет при открытом футере */
}

.footer-toggle_icon {
  fill: #fff
}

.footer-toggle_icon {
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.footer-open .footer-toggle_icon {
  transform: rotate(180deg);
}


/* Адаптив */
@media (max-width: 560px) {
  header {
    grid-template-columns: 1fr;
  }
  .logo-link {
    justify-self: center;
    width: 100px;
    height: 100px;
    margin-top: 4px;
  }
  h1 {
    text-align: center;
  }
  .footer-btns {
    flex-direction: column;
  }
  .footer-btn {
    width: 100%;
  }
}

/* Предотвращаем перекрытие канвасом */
.wrap { position: relative; z-index: 1; }
#laser-canvas, #particles-canvas { z-index: 0; }

.visitors-widget { position: fixed; right: 12px; bottom: 12px; background: rgba(0,0,0,0.6); color:#fff; padding:8px 12px; border-radius:8px; font-weight:600; }
