body {
  margin: 0;
  min-height: 100vh;
  background-color: rgb(15,15,15);
  overflow-x: hidden;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  background-image: 
    radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,0.08) 2px, transparent 2px);
  background-size: 60px 60px, 90px 90px, 160px 160px;
  background-position: 0 0, 30px 30px, 50px 50px;
  animation: starMove 80s linear infinite;
  position: relative;
  transition: opacity 1s ease;
}

body.video-active::before {
  content: "";
  position: fixed;
  inset: 0;
  background: none;
  opacity: 0;
  pointer-events: none;
  z-index: -2;
}

#bgVideo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s;
  z-index: -1;
}

#bgVideo.show {
  opacity: 1;
}

@keyframes starMove {
  from { background-position: 0 0, 30px 30px, 50px 50px; }
  to   { background-position: 2000px 1000px, 2030px 1030px, 2050px 1050px; }
}

body::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle, rgba(255,255,255,0.25) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,0.2) 2px, transparent 2px);
  background-size: 100px 100px, 180px 180px;
  background-position: 20px 40px, 60px 80px;
  animation: twinkle 5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes twinkle {
  from { opacity: 0.2; }
  to   { opacity: 0.6; }
}

.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.github:hover { background: rgba(240, 240, 240, 0.25); transform: translateY(-2px); }

.topbar .btn.discord {
  background: rgba(88, 101, 242, 0.15);
  color: #5865F2;
  border: 1px solid rgba(88, 101, 242, 0.4);
}
.topbar .btn.discord:hover { background: rgba(88, 101, 242, 0.3); transform: translateY(-2px); }

.container { margin: 140px auto 0 auto; max-width: 700px; text-align: center; position: relative; }

.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 0.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: 50px auto 0 auto; max-width: 900px; z-index: 2; }

.avatar-block { width: 200px; height: 200px; flex-shrink: 0; margin-top: 10; opacity: 0; transform: translateY(30px); animation: fadeInAvatar 1.2s ease forwards; animation-delay: 0.5s; }
@keyframes fadeInAvatar { to { opacity: 1; transform: translateY(0); } }

.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 3px solid #222; background: #181818; box-shadow: 0 2px 16px rgba(0,0,0,0.25); }

.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: 1s;
  position: relative;
}

@keyframes fadeIn { to { opacity: 1; } }

.bio-block::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 10px;
  padding: 2px;
  background: linear-gradient(270deg, #ffffff, #444444, #ffffff);
  background-size: 200% auto;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  animation: shineBorder 4s linear infinite;
  z-index: -1;
}
@keyframes shineBorder { 0% { background-position: 200% center; } 100% { background-position: 0% center; } }

.music-player .btn.play {
  margin-top: 10px;
  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;
}

.music-player .btn.play:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.music-player h3 {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.music-player h3.show {
  opacity: 1;
  transform: translateY(0);
}

.flag-ru {
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

@media (max-width: 800px) {
  .profile-flex {
    flex-direction: column;
    gap: 25px;
    text-align: center;
    align-items: center;
  }

  .avatar-block {
    width: 160px;
    height: 160px;
    margin-top: 0;
  }

  .bio-block {
    width: 100%;
    text-align: left;
  }
}

@media (max-width: 768px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 15px;
  }

  .topbar .brand {
    font-size: 1.4rem;
    margin-bottom: 8px;
  }

  .topbar .btn {
    font-size: 0.85rem;
    padding: 6px 12px;
    margin-left: 8px;
  }

  .container {
    margin: 110px auto 0 auto;
    padding: 0 15px;
    max-width: 100%;
  }

  .typing {
    font-size: 1.8rem;
  }

  .bio-block {
    font-size: 1rem;
    padding: 15px 20px;
  }
}

@media (max-width: 480px) {
  .typing {
    font-size: 1.5rem;
  }

  .avatar-block {
    width: 140px;
    height: 140px;
    margin-top: 10;
  }

  .bio-block {
    font-size: 0.95rem;
  }
}

.avatar-img:hover {
  transform: none;
  box-shadow: none;
  cursor: default;
}

.avatar-img:hover {
  transform: none;
  box-shadow: none;
  cursor: default;
}

#bgVideo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.2s ease;
  transform: translateZ(0);
  will-change: opacity, transform;
}

#bgVideo.show {
  opacity: 1;
}

@media (max-width: 768px) {
  body {
    animation: none !important;
    background-image: none !important;
  }
  body::after {
    display: none !important;
  }
}

.track-link {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.track-link:hover {
  color: #fff;
  text-shadow: 0 0 8px #ffffff, 0 0 16px #ffffff;
}