#preloader {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999999;
  opacity: 1;
  visibility: visible;
  transition: opacity .7s ease, visibility .7s ease;
}

#preloader.hide {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255,255,255,.18);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

body.loading {
  overflow: hidden !important;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (min-width: 769px) {
  html, body {
    height: 100%;
    overflow-y: hidden;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: #000 url("images/retrowave.gif") center center / cover no-repeat fixed;
  overflow-x: hidden;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  position: relative;
}

#bgVideo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s;
  z-index: -1;
}

#bgVideo.show {
  opacity: 1;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 65px;
  display: flex;
  align-items: center;
  padding: 0 25px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 1000;
  opacity: 0;
  animation: fadeInTopbar 1.5s ease forwards;
}

@keyframes fadeInTopbar {
  to { opacity: 1; }
}

.topbar .brand {
  font-weight: 700;
  font-size: 1.8rem;
  background: linear-gradient(270deg, #ffffff, #444444, #ffffff);
  background-size: 200% auto;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  0% { background-position: 200% center; }
  100% { background-position: 0% center; }
}

.topbar .spacer {
  flex: 1;
}

.topbar .btn {
  margin-left: 15px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
}

.topbar .btn.github {
  background: rgba(240,240,240,0.1);
  color: #fff;
  border: 1px solid rgba(240,240,240,0.4);
}

.topbar .btn.discord {
  background: rgba(88,101,242,0.15);
  color: #5865F2;
  border: 1px solid rgba(88,101,242,0.4);
}

.topbar .btn.shift {
  background: rgba(60,120,255,0.15);
  color: #3c78ff;
  border: 1px solid rgba(60,120,255,0.45);
}

.topbar .btn:hover {
  transform: translateY(-2px);
}

.container {
  margin: 140px auto 0;
  max-width: 700px;
  text-align: center;
}

.typing {
  display: inline-block;
  border-right: 2px solid #fff;
  white-space: nowrap;
  overflow: hidden;
  font-size: 2.5rem;
  animation: typing 1.8s steps(6,end) infinite alternate, blink .7s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 6ch; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

.profile-flex {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  margin-top: 50px;
}

.avatar-block {
  width: 200px;
  height: 200px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInAvatar 1.2s ease forwards;
}

@keyframes fadeInAvatar {
  to { opacity: 1; transform: translateY(0); }
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #222;
}

.bio-block {
  flex: 1;
  background: rgba(0,0,0,0.35);
  padding: 20px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: left;
  opacity: 0;
  animation: fadeIn 1.5s ease forwards;
  animation-delay: .8s;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.music-player .btn.play,
.music-buttons .btn.donate {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  text-decoration: none;
}

.music-player .btn.play:hover,
.music-buttons .btn.donate:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.music-player h3 {
  opacity: 0;
  transform: translateY(30px);
  transition: .8s;
}

.music-player h3.show {
  opacity: 1;
  transform: translateY(0);
}

.music-buttons {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.track-link {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 600;
  text-shadow: none;
  transition: none;
}

.track-link:hover,
.track-link:focus {
  color: #ffffff;
  text-shadow: none;
  filter: none;
}

@media (max-width: 768px) {

  body {
    background: #000;
  }

  #bgVideo {
    display: none;
  }

  .container {
    margin-top: 120px;
    padding: 0 15px 120px;
  }

  .typing {
    font-size: 2rem;
  }

  .profile-flex {
    flex-direction: column;
    align-items: center;
    gap: 25px;
  }

  .avatar-block {
    width: 150px;
    height: 150px;
  }

  .bio-block {
    width: 100%;
    text-align: center;
    font-size: 1rem;
    padding: 18px 20px;
  }

  .topbar {
    top: auto;
    bottom: 0;
    padding: 12px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: none;
  }

  .topbar .brand,
  .topbar .spacer {
    display: none;
  }

  .topbar .btn {
    margin: 0;
    font-size: 0.85rem;
    padding: 8px 14px;
  }

  .music-buttons {
    justify-content: center;
  }
}

.track-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  transition: opacity .3s;
}

.track-loader.hidden {
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.spinner.small {
  width: 32px;
  height: 32px;
  border: 4px solid rgba(255,255,255,.2);
  border-top-color: #fff;
}

.loading-text {
  font-size: 0.9rem;
  color: rgba(255,255,255,.8);
}