@font-face {
  font-family: "Advaken Sans";
  src: url("/static/fonts/Advaken_Sans.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-darkest: #0b140e;
  --bg-mid: #1c2f24;
  --muted: #2d3d33;
  --glass: rgba(10, 20, 14, 0.65);
  --glass-border: rgba(166, 232, 91, 0.12);
  --text: #f2f2ea;
  --text-muted: #a9b5a8;
  --accent: #a6e85b;
  --accent-2: #9be25a;
  --yellow-green: #bccd2c;
  --logo-glow: #d8e04a;
  --logo-glow-2: #b6d63a;
  --danger: #e86a5b;

  --font-main: "Advaken Sans", Arial, sans-serif;
  --font-logo: Georgia, "Times New Roman", serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.5rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  --shadow-glass: 0 10px 40px rgba(0, 0, 0, 0.45);
  --shadow-accent: 0 0 24px rgba(166, 232, 91, 0.35);

  --container: 1200px;
  --nav-height: 64px;
  --player-height: 120px;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-main);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg-darkest);
  overflow-x: hidden;
}

svg {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

#box {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 15%, #2b4a35 0%, transparent 55%),
    radial-gradient(ellipse at 85% 70%, #24432e 0%, transparent 50%),
    linear-gradient(160deg, #1f3a2a 0%, #153024 45%, #0d1a12 100%);
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: rgba(5, 12, 8, 0.35);
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.page-main {
  position: relative;
  z-index: 1;
  padding: var(--space-8) 0 var(--space-16);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.muted {
  color: var(--text-muted);
}

.logo {
  display: inline-block;
  font-family: var(--font-logo);
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: #ffffff;
  text-decoration: none;
  line-height: 1;
  transform: scaleX(0.75) scaleY(1.25);
  transform-origin: center;
  text-shadow:
    2px 0 0 var(--logo-glow),
    -2px 0 0 var(--logo-glow-2),
    0 2px 0 var(--logo-glow),
    0 -2px 0 var(--logo-glow-2),
    -4px 1px 1px rgba(255, 70, 90, 0.55),
    4px -1px 1px rgba(60, 220, 255, 0.5),
    0 0 18px rgba(216, 224, 74, 0.35);
  filter: url(#logo-wave);
}

.logo-small {
  font-size: var(--text-xl);
  filter: url(#logo-wave-small);
}

.logo-big {
  font-size: clamp(2.5rem, 11vw, 7rem);
  margin-bottom: 0.15em;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 46px 30px 42px 34px;
  box-shadow: var(--shadow-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding: var(--space-6) var(--space-8);
}

.panel-title {
  font-weight: 700;
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-6);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  background: var(--muted);
  color: var(--text);
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: #3a4d41;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: #0b140e;
}

.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: var(--shadow-accent);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 0 12px rgba(166, 232, 91, 0.5);
}

.btn-danger {
  background: var(--danger);
  color: #0b140e;
}

.btn-danger:hover {
  background: #f08071;
}

.btn-big {
  min-height: 56px;
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-md);
}

.btn-round {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

.btn.copied {
  background: var(--accent);
  color: #0b140e;
  animation: pop 0.35s ease;
}

.input {
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  background: rgba(8, 16, 11, 0.85);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(166, 232, 91, 0.2);
}

.input::placeholder {
  color: var(--text-muted);
}

.label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  background: transparent;
  cursor: pointer;
  --fill: 0%;
}

input[type="range"]:disabled {
  cursor: default;
  opacity: 0.6;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: var(--radius-pill);
  background: linear-gradient(to right, var(--accent) var(--fill), #3b4a40 var(--fill));
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5.5px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(166, 232, 91, 0.5);
}

input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: var(--radius-pill);
  background: #3b4a40;
}

input[type="range"]::-moz-range-progress {
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
}

.nav {
  position: sticky;
  top: var(--space-4);
  z-index: 10;
  max-width: var(--container);
  margin: var(--space-4) auto 0;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-glass);
  animation: rise 0.6s ease backwards;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  min-height: var(--nav-height);
  padding: var(--space-2) var(--space-6);
}

.nav-link {
  position: relative;
  font-size: var(--text-lg);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  transition:
    color 0.15s ease,
    transform 0.15s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition:
    width 0.2s ease,
    left 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link:hover,
.nav-link:focus-visible {
  transform: translateY(-2px);
}

.nav-link:hover::after,
.nav-link.active::after {
  left: 20%;
  width: 60%;
}

.vinyl {
  position: relative;
  isolation: isolate;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  box-shadow:
    0 0 60px rgba(0, 0, 0, 0.7),
    -2px 0 0 rgba(60, 200, 255, 0.18),
    2px 0 0 rgba(255, 80, 60, 0.18);
}

.vinyl::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(closest-side, #050607 0 58%, transparent 59%),
    conic-gradient(from 0deg, transparent 0 6%, rgba(255, 255, 255, 0.08) 10%, transparent 16% 50%, rgba(255, 255, 255, 0.06) 56%, transparent 62%),
    repeating-radial-gradient(closest-side, rgba(255, 255, 255, 0.06) 0 1px, rgba(0, 0, 0, 0.25) 1px 2px, transparent 2px 4px),
    radial-gradient(closest-side, #0b0d0e 0%, #171b1d 55%, #07090a 100%);
  animation: spin 7s linear infinite;
  animation-play-state: paused;
}

.vinyl::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 35deg, transparent 0 14%, rgba(255, 255, 255, 0.24) 21%, transparent 29% 58%, rgba(255, 255, 255, 0.17) 70%, transparent 79%);
}

.vinyl.spinning::before {
  animation-play-state: running;
}

.vinyl-label {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 36%;
  height: 36%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #f1f0ea 0%, #d9d7ce 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl-label:empty::after {
  content: "";
  width: 7%;
  height: 7%;
  border-radius: 50%;
  background: #0b140e;
}

.vinyl-left,
.vinyl-right {
  position: fixed;
  top: 50%;
  z-index: 0;
  width: clamp(240px, 40vw, 580px);
  pointer-events: none;
  transform: translate(var(--shift, -56%), -50%) translate(var(--px, 0px), var(--py, 0px)) perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.4s ease-out;
}

.vinyl-left {
  left: 0;
  --shift: -56%;
}

.vinyl-right {
  right: 0;
  --shift: 56%;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100% - 2rem);
  padding: var(--space-3) var(--space-6);
  background: var(--bg-mid);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glass);
  animation: toast-in 0.25s ease;
}

.toast.error {
  border-color: var(--danger);
}

.hero > .logo,
.join-wrap > .logo,
.about-wrap > .logo {
  animation: fade 0.9s ease backwards;
}

.logo:hover {
  animation: logo-glitch 0.7s steps(8) 1;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

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

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pop {
  0% {
    transform: scale(0.85);
  }
  60% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes logo-glitch {
  0%,
  100% {
    text-shadow:
      2px 0 0 var(--logo-glow),
      -2px 0 0 var(--logo-glow-2),
      0 2px 0 var(--logo-glow),
      0 -2px 0 var(--logo-glow-2),
      -4px 1px 1px rgba(255, 70, 90, 0.55),
      4px -1px 1px rgba(60, 220, 255, 0.5),
      0 0 18px rgba(216, 224, 74, 0.35);
  }
  25% {
    text-shadow:
      2px 0 0 var(--logo-glow),
      -2px 0 0 var(--logo-glow-2),
      0 2px 0 var(--logo-glow),
      0 -2px 0 var(--logo-glow-2),
      -8px 2px 1px rgba(255, 70, 90, 0.7),
      8px -2px 1px rgba(60, 220, 255, 0.7),
      0 0 26px rgba(216, 224, 74, 0.6);
  }
  50% {
    text-shadow:
      2px 0 0 var(--logo-glow),
      -2px 0 0 var(--logo-glow-2),
      0 2px 0 var(--logo-glow),
      0 -2px 0 var(--logo-glow-2),
      6px -2px 1px rgba(255, 70, 90, 0.7),
      -6px 2px 1px rgba(60, 220, 255, 0.7),
      0 0 26px rgba(216, 224, 74, 0.6);
  }
  75% {
    text-shadow:
      2px 0 0 var(--logo-glow),
      -2px 0 0 var(--logo-glow-2),
      0 2px 0 var(--logo-glow),
      0 -2px 0 var(--logo-glow-2),
      -3px 1px 1px rgba(255, 70, 90, 0.55),
      3px -1px 1px rgba(60, 220, 255, 0.5),
      0 0 22px rgba(216, 224, 74, 0.5);
  }
}

@media (max-width: 768px) {
  .nav {
    border-radius: var(--radius-lg);
    margin: var(--space-2) var(--space-2) 0;
  }

  .nav-list {
    padding: var(--space-2) var(--space-4);
  }

  .nav-link {
    font-size: var(--text-base);
  }

  .glass {
    border-radius: 30px 22px 28px 24px;
    padding: var(--space-4);
  }
}

@media (max-width: 480px) {
  :root {
    --text-xl: 1.4rem;
    --text-2xl: 2rem;
  }

  .btn-big {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
