:root {
  --ink: #0b1026;
  --blue: #2c45ff;
  --violet: #7a3cff;
  --sun: #ffd23f;
  --white: #ffffff;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--white);
  font-family: var(--display);
  overflow: hidden;
}

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

/* ---------- Tło: nocny las (SVG, animowane tylko lekkie elementy) ---------- */
.scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.scene .tw { animation: blysk 4s ease-in-out infinite; }
@keyframes blysk { 50% { opacity: 0.1; } }

.scene .zorza { animation: plyn 24s ease-in-out infinite alternate; }
.scene .z2 { animation-duration: 31s; animation-direction: alternate-reverse; }
@keyframes plyn { to { transform: translateX(160px); } }

.scene .mgla { animation: mgla 34s ease-in-out infinite alternate; }
.scene .m2 { animation-duration: 45s; animation-direction: alternate-reverse; }
@keyframes mgla { to { transform: translateX(-120px); } }

#platki {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Treść ---------- */
.card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 3rem);
  padding: 1.5rem;
  text-align: center;
}

.nick {
  margin: 0;
  font-size: clamp(6rem, 30vw, 20rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.05em;
  animation: wejscie 0.9s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes wejscie {
  from { transform: translateY(30%); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.links { gap: 1.1rem; }

.link {
  --c: #5865f2;
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 16rem;
  padding: 0.8rem 1.6rem 0.8rem 0.8rem;
  overflow: hidden;
  border-radius: 1.4rem;
  background: rgba(10, 14, 40, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  text-align: left;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(.3, 1.5, .5, 1), border-color 0.2s, box-shadow 0.25s;
}

.steam { --c: #66c0f4; }

/* połysk przesuwający się po przycisku */
.link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.3) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform 0.8s ease;
}

.link:hover {
  transform: translateY(-6px) scale(1.04);
  border-color: var(--c);
  box-shadow: 0 0 0 1px var(--c), 0 14px 40px color-mix(in srgb, var(--c) 55%, transparent);
}

.link:hover::before { transform: translateX(130%); }
.link:active { transform: translateY(-2px) scale(0.97); }

.ico {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 1rem;
  background: var(--c);
  color: var(--white);
  transition: transform 0.35s cubic-bezier(.3, 1.8, .5, 1);
}

.steam .ico { background: #1b2838; color: #66c0f4; box-shadow: inset 0 0 0 2px #66c0f4; }

.link:hover .ico { transform: rotate(-10deg) scale(1.15); }

.txt { display: grid; gap: 0.1rem; }
.txt b { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.txt small { font-size: 0.9rem; font-weight: 500; opacity: 0.7; }

/* ---------- Odtwarzacz ---------- */
.player {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 3;
  width: min(94vw, 34rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 1.4rem;
  background: rgba(10, 14, 40, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-align: left;
}

.play {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border: 0;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.3, 1.8, .5, 1);
}

.play:hover { transform: scale(1.12); }
.play:active { transform: scale(0.94); }
.play .i-pause, .player.playing .i-play { display: none; }
.player.playing .i-pause { display: block; }

.track { min-width: 0; display: grid; gap: 0.3rem; }

.title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.eq i {
  width: 3px;
  height: 4px;
  background: var(--sun);
  border-radius: 2px;
}
.player.playing .eq i { animation: eq 0.9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { from { height: 3px; } to { height: 14px; } }

.time {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.65;
}

.vol { display: flex; align-items: center; gap: 0.5rem; }

.mute {
  display: grid;
  place-items: center;
  padding: 0.2rem;
  border: 0;
  background: none;
  color: var(--white);
  cursor: pointer;
}
.mute .i-mute, .player.muted .i-vol { display: none; }
.player.muted .i-mute { display: block; }

.vol .range { width: 5.5rem; }

/* suwaki */
.range {
  --p: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--sun) var(--p), rgba(255, 255, 255, 0.22) var(--p));
  cursor: pointer;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 0;
  transition: transform 0.15s;
}
.range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 0;
}
.range:hover::-webkit-slider-thumb { transform: scale(1.35); }


/* nick Discorda pojawia się po najechaniu */
.txt small { position: relative; display: grid; overflow: hidden; height: 1.3em; }
.txt small .def, .txt small .hov {
  grid-area: 1 / 1;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.txt small .hov { transform: translateY(100%); opacity: 0; font-weight: 800; color: #fff; }
.discord:hover small .def,
.discord:focus-visible small .def { transform: translateY(-100%); opacity: 0; }
.discord:hover small .hov,
.discord:focus-visible small .hov { transform: none; opacity: 1; }

/* ukryty odtwarzacz YouTube (dźwięk idzie, obrazu nie widać) */
#yt {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 2px;
  height: 2px;
  opacity: 0.01;
  pointer-events: none;
  border: 0;
}

@media (max-width: 480px) {
  .links { flex-direction: column; width: 100%; }
  .link { min-width: 0; width: 100%; }
  .vol .range { width: 3.5rem; }
  .player { gap: 0.7rem; padding: 0.65rem 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .scene *, .nick, .eq i, .link::before { animation: none !important; transition: none !important; }
}
