/* MONOCHROME LINKS - Черно-белый стиль */
:root {
  color-scheme: dark;
  --bg-top: #212121;
  --bg-bottom: #000000;
  --accent: #ffffff;
  --accent-muted: #888888;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --muted: #a0a0a0;
  --radius: 16px;
}

/* Отключение синей подсветки тапов на мобильных устройствах */
* { 
  box-sizing: border-box; 
  -webkit-tap-highlight-color: transparent;
}

html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ЭКРАН-ЗАСТВКА (SPLASH) */
.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #080808;
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.7s;
}

.splash-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.splash.hidden {
  opacity: 0;
  transform: scale(1.05);
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  padding: 20px;
}

.splash-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #666666;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px #ffffff;
  animation: pulse-dot 2s infinite ease-in-out;
}

.splash-logo {
  margin: 0;
  font-size: clamp(38px, 9vw, 54px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -.05em;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.splash-logo span { color: #555555; }

.enter-btn {
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.25em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: pulse-border 2.5s infinite ease-in-out;
}

.splash:hover .enter-btn {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
}

.splash-hint {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #444444;
  letter-spacing: 0.05em;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(255, 255, 255, 0.15); }
  50% { border-color: rgba(255, 255, 255, 0.4); }
}

/* БЛОК УПРАВЛЕНИЯ ГРОМКОСТЬЮ */
.volume-control {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.volume-control:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.music-toggle {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  width: 24px;
  height: 24px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.music-toggle:hover {
  opacity: 1;
}

.speaker-svg {
  width: 20px;
  height: 20px;
}

.speaker-state {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.speaker-state.active {
  opacity: 1;
  visibility: visible;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 64px 20px 48px;
}

.profile {
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Аватарка */
.avatar-wrap { 
  position: relative; 
  margin-bottom: 20px; 
  cursor: pointer;
  user-select: none;
}
.avatar {
  position: relative;
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #181818;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.avatar-wrap:hover .avatar {
  border-color: rgba(255, 255, 255, 0.4);
}
.avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}
.avatar-letter {
  color: #ffffff;
  font-size: 42px;
  font-weight: 800;
  z-index: 1;
}
.online-dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #1a1a1a;
  z-index: 3;
}

/* Имя */
.name {
  margin: 0;
  font-size: clamp(32px, 8vw, 42px);
  line-height: 1.1;
  letter-spacing: -.04em;
  font-weight: 800;
  color: #ffffff;
}
.name span { color: #888888; }

/* КОНТЕЙНЕР ДЛЯ БИО И ЭКВАЛАЙЗЕРА */
.bio-container {
  width: 100%;
  max-width: 300px;
  margin: 10px 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
}

/* ЭКВАЛАЙЗЕР */
.visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 220px;
  max-width: 100%;
  height: 22px;
  margin-bottom: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.visualizer.active {
  opacity: 0.85;
  visibility: visible;
}

.visualizer span {
  width: 2px;
  background: #ffffff;
  border-radius: 2px;
  height: 15%;
  animation: bounce 1s ease-in-out infinite alternate;
}

@keyframes bounce {
  0% { height: calc(15% * var(--vol-scale, 1)); }
  50% { height: calc(95% * var(--vol-scale, 1)); }
  100% { height: calc(30% * var(--vol-scale, 1)); }
}

/* АМБИЕНТ-ФОН */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ambient-bg.active {
  opacity: 0.45;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px) saturate(220%);
  background-image: url("avatar.jpg");
  background-size: cover;
  background-position: center;
  mix-blend-mode: screen;
  opacity: 0.7;
}

.blob-1 {
  width: 45vw;
  height: 45vw;
  top: -10%;
  left: -10%;
  animation: wander-1 16s ease-in-out infinite alternate;
}

.blob-2 {
  width: 50vw;
  height: 50vw;
  bottom: -15%;
  right: -10%;
  animation: wander-2 22s ease-in-out infinite alternate;
}

.blob-3 {
  width: 35vw;
  height: 35vw;
  top: 30%;
  left: 30%;
  animation: wander-3 19s ease-in-out infinite alternate;
}

@keyframes wander-1 {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(25vw, 15vh) scale(1.2); }
  66% { transform: translate(10vw, 35vh) scale(0.9); }
  100% { transform: translate(30vw, 20vh) scale(1.1); }
}

@keyframes wander-2 {
  0% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(-30vw, -20vh) scale(1.3); }
  70% { transform: translate(-15vw, -35vh) scale(0.85); }
  100% { transform: translate(-25vw, -10vh) scale(1.15); }
}

@keyframes wander-3 {
  0% { transform: translate(0, 0) scale(0.9); }
  30% { transform: translate(-20vw, 25vh) scale(1.25); }
  60% { transform: translate(20vw, -20vh) scale(1); }
  100% { transform: translate(-10vw, -15vh) scale(1.1); }
}

/* БИО ТЕКСТ */
.bio {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
}
.bio.fade-out {
  opacity: 0;
  transform: translateY(4px);
}

/* Соцсети */
.socials { display: flex; justify-content: center; gap: 12px; margin-bottom: 28px; }
.social-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #cccccc;
  transition: all .25s ease;
}
.social-link svg { width: 18px; height: 18px; fill: currentColor; }
.social-link svg rect, .social-link svg circle:not(.solid) { fill: none; stroke: currentColor; stroke-width: 2; }
.social-link:hover {
  transform: translateY(-3px);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Разделитель */
.section-heading {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 16px;
  color: #666666;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .22em;
}
.section-mark { height: 1px; width: 30px; background: rgba(255, 255, 255, 0.15); }

/* Карточки ссылок */
.link-list { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 12px 18px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  transition: all .25s cubic-bezier(.2,.8,.2,1);
}
.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.link-card:focus-visible, .social-link:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.link-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}
.link-icon svg { width: 18px; height: 18px; fill: currentColor; }
.icon-instagram svg rect, .icon-instagram svg circle:not(.solid) { fill: none; stroke: currentColor; stroke-width: 2; }
.link-copy { min-width: 0; display: flex; flex: 1; align-items: center; }
.link-copy strong { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.link-arrow { color: #666666; font-size: 18px; transition: transform .25s ease, color .25s ease; }
.link-card:hover .link-arrow { transform: translate(3px, -3px); color: #ffffff; }

/* Анимации появления */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal-in .6s cubic-bezier(.2,.7,.2,1) forwards; }
.avatar-wrap.reveal { animation-delay: .05s; }
.name.reveal { animation-delay: .12s; }
.bio-container.reveal { animation-delay: .18s; }
.socials.reveal { animation-delay: .24s; }
.section-heading.reveal { animation-delay: .30s; }
.link-card:nth-child(1).reveal { animation-delay: .36s; }
.link-card:nth-child(2).reveal { animation-delay: .42s; }
.link-card:nth-child(3).reveal { animation-delay: .48s; }
.link-card:nth-child(4).reveal { animation-delay: .54s; }

@keyframes reveal-in { to { opacity: 1; transform: translateY(0); } }

/* TOAST УВЕДОМЛЕНИЕ */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  z-index: 3000;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 12px 20px;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.3s ease, visibility 0.3s;
  pointer-events: none;
  max-width: 90vw;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #22c55e;
  color: #000000;
  font-size: 11px;
  font-weight: 800;
}

.toast-message {
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: pre-line;
}

/* МОДАЛЬНОЕ ОКНО TELEGRAM */
.tg-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.tg-modal.active {
  opacity: 1;
  visibility: visible;
}

.tg-modal-content {
  width: 100%;
  max-width: 380px;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tg-modal.active .tg-modal-content {
  transform: scale(1);
}

.tg-modal-header {
  text-align: center;
}

.tg-modal-header h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.tg-modal-subtitle {
  margin: 0;
  font-size: 12px;
  color: #666666;
  font-family: "JetBrains Mono", monospace;
}

.tg-modal-content textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  resize: none;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.tg-modal-content textarea:focus {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.tg-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tg-char-counter {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #666666;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.tg-char-counter.limit-reached {
  color: #ff4d4d;
}

.tg-modal-buttons {
  display: flex;
  gap: 10px;
}

.tg-btn {
  padding: 12px 16px;
  border-radius: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.tg-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #888;
}

.tg-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tg-btn.primary {
  background: #fff;
  color: #000;
}

.tg-btn.primary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
  .page { padding: 40px 16px 32px; }
  .avatar { width: 96px; height: 96px; }
  .avatar-letter { font-size: 38px; }
  .link-card { min-height: 58px; padding: 10px 14px; }
  
  .volume-control {
    top: 12px;
    left: 12px;
    right: auto;
    padding: 4px 10px 4px 6px;
  }
  .volume-slider {
    width: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
