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

:root {
  --green: #22ff88;
  --green-dim: #16c96a;
  --green-glow: rgba(34, 255, 136, 0.35);
  --green-soft: rgba(34, 255, 136, 0.12);
  --bg: #050805;
  --glass-bg: rgba(10, 18, 14, 0.28);
  --glass-bg-hover: rgba(14, 28, 20, 0.42);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-border-soft: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(8, 16, 12, 0.32);
  --card-border: rgba(34, 255, 136, 0.22);
  --text: #f0fff5;
  --text-muted: #8aa896;
  --btn-bg: rgba(12, 22, 16, 0.32);
  --btn-border: rgba(255, 255, 255, 0.1);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", Courier, monospace;
  --glass-blur: blur(24px) saturate(1.65);
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ── Splash ── */

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.splash.leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash__content {
  text-align: center;
  animation: breathe 3s ease-in-out infinite;
}

.splash__title {
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}

.splash__title .dot {
  color: var(--green);
  font-size: 0.55em;
  vertical-align: middle;
  margin: 0 -0.02em;
  text-shadow: 0 0 24px var(--green-glow);
}

.splash__hint {
  margin-top: 1.4rem;
  font-size: clamp(0.65rem, 2vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  color: #555;
  text-transform: uppercase;
}

.splash__enter {
  color: var(--green);
  text-shadow: 0 0 12px var(--green-glow);
}

.splash__bracket {
  color: #fff;
}

.splash__mid {
  color: #c8c8c8;
}

.splash__blink {
  animation: hintBlink 1.4s ease-in-out infinite;
}

@keyframes hintBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.985); }
}

/* ── Main Layout ── */

.main {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.neural-vortex {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #000;
}

.neural-vortex__canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.95;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 35%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.45) 100%);
}

/* ── Card ── */

.card-wrap {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 1.6rem;
  border-radius: 22px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    0 0 0 1px rgba(34, 255, 136, 0.08) inset,
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(34, 255, 136, 0.06);
  animation: cardIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease;
}

.tilt-field {
  position: relative;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
}

.card:not(.is-tilting) .tilt-field {
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.card.is-tilting .tilt-field {
  transition: none;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(
      circle at var(--mx, 50%) var(--my, 50%),
      rgba(255, 255, 255, 0.12) 0%,
      transparent 38%
    ),
    radial-gradient(
      circle at var(--mx, 50%) var(--my, 50%),
      rgba(34, 255, 136, 0.16) 0%,
      transparent 55%
    );
  opacity: var(--glare, 0);
  pointer-events: none;
  transform: translateZ(40px);
  mix-blend-mode: screen;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07) 0%,
    transparent 38%,
    rgba(0, 0, 0, 0.22) 100%
  );
  pointer-events: none;
  transform: translateZ(1px);
}

.card.is-tilting {
  transition: none;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card__header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--green);
  overflow: hidden;
  box-shadow: 0 0 16px var(--green-glow);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card__bio {
  margin-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: #8a8f8c;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.card__bio .highlight {
  color: var(--green);
  text-shadow: 0 0 10px rgba(34, 255, 136, 0.35);
}

.bio-hat {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  object-fit: contain;
  display: inline-block;
  margin: 0 0.05em;
}

/* ── Link Buttons ── */

.card__links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transform-style: preserve-3d;
}

.card__section {
  transform-style: preserve-3d;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 8px 24px rgba(0, 0, 0, 0.18);
  transition:
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}

.link-btn:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(34, 255, 136, 0.32);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 0 24px rgba(34, 255, 136, 0.1),
    0 12px 28px rgba(0, 0, 0, 0.28);
}

.link-btn__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-btn__icon svg,
.link-btn__icon img {
  width: 18px;
  height: 18px;
}

.link-btn__icon img {
  object-fit: contain;
  display: block;
}

.link-btn__icon--qtox {
  width: 20px;
  height: 20px;
}

.link-btn__icon--qtox img {
  width: 100%;
  height: 100%;
  mix-blend-mode: lighten;
}

.link-btn__icon--telegram { color: #29a8e0; }
.link-btn__icon--session { color: var(--green); }
.link-btn__icon--qtox { color: #6ecf9a; }
.link-btn__icon--gpg { color: #c8d4cc; }

.link-btn__text {
  flex: 1;
  text-align: left;
}

.link-btn__arrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.6;
}

.link-btn__copy-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  transition: color 0.2s, border-color 0.2s;
}

.link-btn--copy:hover .link-btn__copy-tag {
  color: var(--green);
  border-color: rgba(34, 255, 136, 0.25);
}

.link-btn--copy.copied .link-btn__copy-tag {
  color: var(--green);
  border-color: rgba(34, 255, 136, 0.4);
}

/* ── Divider & Channels ── */

.card__divider {
  height: 1px;
  margin: 1.25rem 0 1.1rem;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(34, 255, 136, 0.28) 20%,
    rgba(34, 255, 136, 0.28) 80%,
    transparent
  );
}

.card__section-title {
  margin-bottom: 0.65rem;
  padding-left: 0.1rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.channel-block {
  border-radius: 14px;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 8px 24px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.channel-block:hover {
  border-color: rgba(34, 255, 136, 0.32);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 0 24px rgba(34, 255, 136, 0.1);
}

.channel-block__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.75rem;
}

.channel-block__name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

.channel-block__links {
  border-top: 1px solid rgba(34, 255, 136, 0.08);
}

.channel-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  transition: color 0.2s, background 0.2s;
}

.channel-link:first-child {
  border-top: none;
}

.channel-link:hover {
  color: var(--green);
  background: rgba(34, 255, 136, 0.08);
  backdrop-filter: blur(8px);
}

.channel-link__arrow {
  font-size: 0.85rem;
  opacity: 0.55;
}

.link-btn__icon--dbmarket {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 3px;
  border-radius: 50%;
  border: 2px solid var(--green);
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 12px var(--green-glow);
}

.link-btn__icon--dbmarket img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Card Footer ── */

.card__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  color: #8a8f8c;
  letter-spacing: 0.01em;
  line-height: 1.55;
}

.card__footer-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.card__footer-eagle {
  color: var(--green);
  text-shadow: 0 0 8px var(--green-glow);
}

.footer-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green-glow);
  flex-shrink: 0;
  animation: footerBlink 1.4s ease-in-out infinite;
}

.footer-dot:last-child {
  animation-delay: 0.7s;
}

@keyframes footerBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(0.75); }
}

/* ── Music Button ── */

.music-btn {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: rgba(8, 14, 10, 0.35);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(34, 255, 136, 0.35);
  color: var(--green);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  animation: musicIn 1s 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.music-btn:hover {
  border-color: var(--green);
  background: rgba(12, 22, 16, 0.48);
  box-shadow: 0 0 22px rgba(34, 255, 136, 0.14);
}

.eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  flex-shrink: 0;
}

.eq__bar {
  width: 3px;
  border-radius: 1px;
  background: var(--green);
  height: 5px;
}

.music-btn[aria-pressed="true"] .eq__bar {
  animation: eqBounce 0.75s ease-in-out infinite;
}

.music-btn[aria-pressed="true"] .eq__bar:nth-child(1) { animation-delay: 0s; }
.music-btn[aria-pressed="true"] .eq__bar:nth-child(2) { animation-delay: 0.12s; }
.music-btn[aria-pressed="true"] .eq__bar:nth-child(3) { animation-delay: 0.24s; }
.music-btn[aria-pressed="true"] .eq__bar:nth-child(4) { animation-delay: 0.36s; }

@keyframes eqBounce {
  0%, 100% { height: 4px; opacity: 0.6; }
  50% { height: 14px; opacity: 1; }
}

.music-btn[aria-pressed="false"] .eq__bar {
  animation: none;
  opacity: 0.55;
}

.music-btn[aria-pressed="false"] .eq__bar:nth-child(1) { height: 9px; }
.music-btn[aria-pressed="false"] .eq__bar:nth-child(2) { height: 13px; }
.music-btn[aria-pressed="false"] .eq__bar:nth-child(3) { height: 6px; }
.music-btn[aria-pressed="false"] .eq__bar:nth-child(4) { height: 11px; }

.music-btn[aria-pressed="false"] {
  color: rgba(34, 255, 136, 0.65);
  border-color: rgba(34, 255, 136, 0.3);
}

/* ── Toast ── */

.toast {
  position: fixed;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  background: rgba(12, 22, 16, 0.95);
  border: 1px solid rgba(34, 255, 136, 0.3);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 500;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

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

.toast:not(.show) {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}

/* ── Responsive ── */

/* ── Cursor Trail ── */

.cursor-trail {
  position: fixed;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--green);
  background: rgba(34, 255, 136, 0.2);
  box-shadow: 0 0 10px var(--green-glow);
  pointer-events: none;
  z-index: 50;
  transform: translate(-50%, -50%) scale(1);
  animation: trailFade 0.9s ease-out forwards;
}

@keyframes trailFade {
  0% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
}

@media (max-width: 420px) {
  .card {
    padding: 1.3rem;
    border-radius: 16px;
  }

  .music-btn {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    justify-content: center;
  }
}
