@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ── */
:root {
  --bg:          #080808;
  --surface:     rgba(12, 12, 12, 0.72);
  --surface-hov: rgba(20, 8, 8, 0.85);
  --accent:      #d82b2b;
  --accent-dim:  rgba(216, 43, 43, 0.18);
  --accent-glow: rgba(216, 43, 43, 0.35);
  --text:        #f0f0f0;
  --subtext:     rgba(255,255,255,0.45);
  --border:      rgba(255,255,255,0.08);
  --border-hov:  rgba(216,43,43,0.7);
  --radius:      14px;
  --blur:        14px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Body ── */
body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  height: 100dvh; /* Fix for mobile browser UI bars */
  display: flex;
  justify-content: center;
  align-items: center; /* Центрируем по вертикали */
  padding: 0 20px;
  overflow: hidden; /* Полностью отключаем любую прокрутку */
}

/* ── Canvas Background ── */
#antigravity-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background: var(--bg);
}

/* ── Main Container ── */
.taplink-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* ── Language Switcher ── */
.lang-switcher {
  position: absolute;
  top: -10px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 10;
  animation: fadeInDown 0.7s cubic-bezier(0.16,1,0.3,1) both;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--subtext);
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  color: var(--accent);
}

.lang-div {
  width: 1px;
  height: 10px;
  background: var(--border);
}

/* ── Profile Section ── */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 30px; /* Опускаем блок пониже */
  animation: fadeInDown 0.9s cubic-bezier(0.16,1,0.3,1) both;
}

/* ── Avatar ── */
.avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 4px;
}

.avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(var(--accent), #8b0000, #ff6b6b, var(--accent));
  animation: spinRing 5s linear infinite;
  z-index: 0;
}

.avatar-img,
.avatar-fallback {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  z-index: 1;
  object-fit: cover;
  overflow: hidden;
}

.avatar-img {
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  object-fit: cover;
}

.avatar-fallback {
  display: none;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  background: #111;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 32px;
}

/* ── Brand Logo / Text ── */
.brand-logo {
  max-width: 200px;
  width: 100%;
  height: auto;
  filter: brightness(1.05);
}

.brand-text {
  display: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--text);
}

.tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--subtext);
}

/* ── Divider ── */
.divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 4px auto;
}

/* ── Links Section ── */
.links-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* ── Link Button ── */
.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  padding: 17px 22px;
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
  opacity: 0;
  animation: fadeInUp 0.7s cubic-bezier(0.16,1,0.3,1) both;
  position: relative;
  overflow: hidden;
}

/* Shimmer on hover */
.link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255,255,255,0.04) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.link-btn:hover::before { transform: translateX(100%); }

.link-btn:hover {
  border-color: var(--border-hov);
  background: var(--surface-hov);
  transform: translateY(-2px) scale(1.005);
  box-shadow: 0 8px 32px var(--accent-dim), 0 0 0 1px var(--accent-glow);
  color: #fff;
}

.link-btn:hover .btn-icon { color: var(--accent); }
.link-btn:hover .btn-arrow { opacity: 1; transform: translateX(0); }

/* Staggered delays */
.links-section .link-btn:nth-child(1) { animation-delay: 0.15s; }
.links-section .link-btn:nth-child(2) { animation-delay: 0.22s; }
.links-section .link-btn:nth-child(3) { animation-delay: 0.29s; }
.links-section .link-btn:nth-child(4) { animation-delay: 0.36s; }
.links-section .link-btn:nth-child(5) { animation-delay: 0.43s; }

/* ── Accent / CTA Button ── */
.accent-btn {
  border-color: rgba(216,43,43,0.4);
  background: rgba(216,43,43,0.08);
}
.accent-btn:hover {
  background: rgba(216,43,43,0.18) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 8px 36px rgba(216,43,43,0.35), 0 0 0 1px var(--accent) !important;
}

/* ── Button Parts ── */
.btn-icon {
  font-size: 15px;
  color: var(--subtext);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.btn-label { }

.btn-arrow {
  font-size: 11px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.35s ease;
}

/* ── Socials ── */
.socials-section {
  display: flex;
  gap: 20px;
  justify-content: center;
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.55s both;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  color: var(--subtext);
  font-size: 18px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}

.social-icon:hover {
  color: var(--accent);
  border-color: var(--border-hov);
  background: var(--accent-dim);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 24px var(--accent-dim);
}

/* ── Footer ── */
.footer-copy {
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.18);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn 1s ease 0.7s both;
}

/* ── Keyframes ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  body {
    padding: 0 16px;
    align-items: center;
  }

  .taplink-container {
    gap: 14px;
    max-width: 100%;
  }

  .lang-switcher {
    top: -15px;
    right: 5px;
  }

  .profile-section {
    gap: 8px;
  }

  .avatar-wrapper {
    width: 78px;
    height: 78px;
    margin-bottom: 2px;
  }

  .brand-logo {
    max-width: 150px;
  }

  .brand-text {
    font-size: 18px;
    letter-spacing: 4px;
  }

  .tagline {
    font-size: 13px;
    letter-spacing: 3px;
  }

  /* Buttons: centered content, comfortable padding */
  .links-section {
    gap: 8px;
    width: 100%;
    padding: 0 4px;
  }

  .link-btn {
    padding: 14px 20px;
    font-size: 10px;
    letter-spacing: 2px;
    gap: 10px;
    border-radius: 12px;
    justify-content: center;
  }

  .btn-icon {
    font-size: 14px;
    width: auto;
    flex-shrink: 0;
  }

  .btn-label {
    flex: unset;
    text-align: center;
  }

  /* Hide arrow on mobile — cleaner look */
  .btn-arrow {
    display: none;
  }

  .socials-section {
    gap: 12px;
  }

  .social-icon {
    width: 42px;
    height: 42px;
    font-size: 16px;
    border-radius: 10px;
  }

  .footer-copy {
    font-size: 9px;
    letter-spacing: 1.5px;
  }
}
