* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 12px;
  background: #2c3e50 /* Полупрозрачный фон как у body */
}

::-webkit-scrollbar-track {
  background: rgba(26, 42, 58, 0.7); /* Чуть темнее основного фона */
  border-radius: 0;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15); /* Стеклянный полупрозрачный ползунок */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 6px;
  border: 2px solid rgba(26, 42, 58, 0.7); /* Граница под цвет трека */
  box-shadow: 0 0 5px rgba(116, 235, 213, 0.2); /* Небольшое свечение */
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}


body {
  min-height: 100vh;
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(145deg, #1a2a3a 0%, #2c3e50 100%);
  color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 600px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  margin: 40px auto;
}

.particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 40px 30px;
  width: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.profile {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.profile-avatar {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
}

.avatar-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, #3498db, #8e44ad);
  border-radius: 50%;
  filter: blur(15px);
  opacity: 0.7;
  animation: glow 3s infinite alternate;
}

.avatar-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #2c3e50, #4b6cb7);
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  z-index: 1;
  overflow: hidden;
}

.avatar-inner img {
  width: 160%;
  height: 160%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  margin-top: 35px;
  margin-left: 1px;
}

.profile-name {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(to right, #74ebd5, #ACB6E5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInDown 1s ease;
}

.profile-bio {
  font-size: 16px;
  color: #ccd6f6;
  margin-bottom: 30px;
  animation: fadeInUp 1.2s ease;
  opacity: 0.8;
}

.tg-link {
  text-decoration: none;
  color: #ccd6f6;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  animation: fadeIn 1.5s ease;
}

.glass-btn {
  position: relative;
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5f5f5;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  overflow: hidden;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.glass-btn i {
  font-size: 20px;
  margin-right: 15px;
}

.glass-btn span {
  flex: 1;
  text-align: left;
}

.btn-highlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    rgba(255, 255, 255, 0) 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.glass-btn:hover .btn-highlight {
  transform: translateX(100%);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 11;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.overlay.active, .popup-menu.active {
  opacity: 1;
  visibility: visible;
}

.popup-menu.active {
  transform: translate(-50%, -50%) scale(1);
}

.popup-card {
  text-align: center;
  max-width: 350px;
  margin: 0 auto;
}

.popup-card h3 {
  margin-bottom: 20px;
  font-size: 22px;
}

.popup-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.close-btn {
  background: rgba(220, 53, 69, 0.2);
  color: #f5f5f5;
  border: 1px solid rgba(220, 53, 69, 0.3);
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
}

.close-btn:hover {
  background: rgba(220, 53, 69, 0.3);
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(40, 167, 69, 0.9);
  backdrop-filter: blur(5px);
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 12;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-content {
  display: flex;
  align-items: center;
}

.toast i {
  font-size: 22px;
  margin-right: 10px;
}

.footer {
  margin-top: 30px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.footer i {
  color: #e25555;
  animation: heartbeat 1.5s infinite;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes glow {
  0% {
    opacity: 0.5;
    filter: blur(15px);
  }
  100% {
    opacity: 0.8;
    filter: blur(20px);
  }
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.3);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.3);
  }
  70% {
    transform: scale(1);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
  }
  
  .glass-card {
    padding: 30px 20px;
  }
  
  .profile-name {
    font-size: 30px;
  }
  
  .glass-btn {
    padding: 14px 16px;
  }
  
  .glass-btn i {
    font-size: 18px;
  }
}

#emote-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -5;
  pointer-events: none;
}

.toggle-emotes {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 99;
  transition: all 0.3s ease;
}

.toggle-emotes:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.15);
}

.toggle-emotes i {
  font-size: 24px;
  background: linear-gradient(to right, #74ebd5, #ACB6E5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.emotes-control {
  max-width: 300px;
  padding: 20px !important;
  position: relative;
}

.emotes-control .social-links {
  gap: 10px;
}

.close-emotes-card {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #ACB6E5;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-emotes-card:hover {
  transform: scale(1.1);
  color: #74ebd5;
}


