:root {
  --accent: #ffffffdd;
  --muted: #ffffff88;
  --glow: rgba(77, 208, 225, 0.5);
  --glow-hover: rgba(77, 208, 225, 0.9);
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  font-family: Inter, system-ui, Segoe UI, Roboto, Arial;
  overflow: hidden;
  color: var(--accent);
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(
      circle at 50% 50%,
      #0e2a47 0%,
      #081d38 40%,
      #041024 70%,
      #000010 100%
  );
  background-repeat: no-repeat;
  background-size: 200% 200%;
  background-attachment: fixed;
  position: relative;
  perspective: 1200px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at 50% 50%,
      rgba(77, 208, 225, 0.1) 0%,
      rgba(0, 0, 0, 0.9) 80%
  );
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url('https://www.transparenttextures.com/patterns/dark-mosaic.png');
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,15,25,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.8s ease;
  z-index: 10;
}

.card {
  position: relative;
  z-index: 2;
  width: 340px;
  min-height: 320px;
  background: rgba(0,0,0,0.6);
  border-radius: 22px;
  padding: 40px 30px;
  text-align: center;
  border: 2px solid rgba(77,208,225,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 0 24px rgba(77,208,225,0.3);
  transform-style: preserve-3d;
}

.card:hover {
  box-shadow: 0 0 36px rgba(77,208,225,0.6), 0 0 60px rgba(77,208,225,0.4);
  transform: rotateY(6deg) rotateX(-6deg);
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: url('ava.png') center/cover no-repeat;
  margin-bottom: 20px;
  position: relative;
  box-shadow: 0 0 20px rgba(77,208,225,0.4);
  animation: avatarPulse 4s infinite ease-in-out;
}

@keyframes avatarPulse {
  0%, 100% {
    box-shadow: 0 0 16px rgba(77,208,225,0.3);
  }
  50% {
    box-shadow: 0 0 28px rgba(77,208,225,0.7);
  }
}

.nickname {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.quote {
  font-size: 16px;
  font-weight: 500;
  color: #ffffffcc;
  line-height: 1.5;
  min-height: 60px;
  text-align: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.quote.show {
  opacity: 1;
}

#toggleSound {
  background: rgba(0,0,0,0.6);
  border: 2px solid var(--glow);
  padding: 12px 20px;
  border-radius: 12px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  margin-top: 16px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 0 12px var(--glow);
}

#toggleSound:hover {
  box-shadow: 0 0 24px var(--glow-hover), 0 0 40px rgba(77,208,225,0.4);
  border-color: var(--glow-hover);
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 14px var(--glow), 0 0 24px rgba(77,208,225,0.3); }
  50% { box-shadow: 0 0 22px var(--glow-hover), 0 0 40px rgba(77,208,225,0.5); }
  100% { box-shadow: 0 0 14px var(--glow), 0 0 24px rgba(77,208,225,0.3); }
}

#toggleSound.on {
  animation: pulseGlow 2.5s infinite ease-in-out;
}

.sound-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 14px;
  background: rgba(0,0,0,0.6);
  border: 2px solid #00ff80;
  color: #00ff80;
  box-shadow: 0 0 16px rgba(0,255,128,0.4);
  z-index: 5;
  transition: all 0.6s ease;
}

.sound-indicator.off {
  border-color: #ff4444;
  color: #ff4444;
  box-shadow: 0 0 16px rgba(255,68,68,0.4);
}

@keyframes soundBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}
.sound-indicator.blink {
  animation: soundBlink 0.6s ease;
}

.muted {
  opacity: 0.8;
  font-size: 13px;
  margin-top: 8px;
}

.telegram-wrapper {
  margin-top: 20px;
  position: relative;
  display: inline-block;
}

.telegram-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.3s ease;
}

.telegram-btn:hover {
  transform: scale(1.05);
}

.telegram-tooltip {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 6px;
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  border: 1px solid #ccc;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.telegram-wrapper:hover .telegram-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

canvas.trail {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
@media only screen and (max-width: 768px) { html, body {
  height: 100%;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  margin: 0;
  font-family: Inter, system-ui, Segoe UI, Roboto, Arial;
  overflow: hidden;
  color: var(--accent);
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(
      circle at 50% 50%,
      #0e2a47 0%,
      #081d38 40%,
      #041024 70%,
      #000010 100%
  );
  background-repeat: no-repeat;
  background-size: 200% 200%;
  background-attachment: fixed;
  position: relative;
  perspective: 1200px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at 50% 50%,
      rgba(77, 208, 225, 0.1) 0%,
      rgba(0, 0, 0, 0.9) 80%
  );
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url('https://www.transparenttextures.com/patterns/dark-mosaic.png');
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,15,25,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.8s ease;
  z-index: 10;
}

.card:hover {
  box-shadow: 0 0 36px rgba(77,208,225,0.6), 0 0 60px rgba(77,208,225,0.4);
  transform: rotateY(6deg) rotateX(-6deg);
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: url('ava.png') center/cover no-repeat;
  margin-bottom: 20px;
  position: relative;
  box-shadow: 0 0 20px rgba(77,208,225,0.4);
  animation: avatarPulse 4s infinite ease-in-out;
}

@keyframes avatarPulse {
  0%, 100% {
    box-shadow: 0 0 16px rgba(77,208,225,0.3);
  }
  50% {
    box-shadow: 0 0 28px rgba(77,208,225,0.7);
  }
}

.nickname {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.quote {
  font-size: 16px;
  font-weight: 500;
  color: #ffffffcc;
  line-height: 1.5;
  min-height: 60px;
  text-align: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.quote.show {
  opacity: 1;
}

#toggleSound {
  background: rgba(0,0,0,0.6);
  border: 2px solid var(--glow);
  padding: 12px 20px;
  border-radius: 12px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  margin-top: 16px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 0 12px var(--glow);
}

#toggleSound:hover {
  box-shadow: 0 0 24px var(--glow-hover), 0 0 40px rgba(77,208,225,0.4);
  border-color: var(--glow-hover);
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 14px var(--glow), 0 0 24px rgba(77,208,225,0.3); }
  50% { box-shadow: 0 0 22px var(--glow-hover), 0 0 40px rgba(77,208,225,0.5); }
  100% { box-shadow: 0 0 14px var(--glow), 0 0 24px rgba(77,208,225,0.3); }
}

#toggleSound.on {
  animation: pulseGlow 2.5s infinite ease-in-out;
}

.sound-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 14px;
  background: rgba(0,0,0,0.6);
  border: 2px solid #00ff80;
  color: #00ff80;
  box-shadow: 0 0 16px rgba(0,255,128,0.4);
  z-index: 5;
  transition: all 0.6s ease;
}

.sound-indicator.off {
  border-color: #ff4444;
  color: #ff4444;
  box-shadow: 0 0 16px rgba(255,68,68,0.4);
}

@keyframes soundBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}
.sound-indicator.blink {
  animation: soundBlink 0.6s ease;
}

.muted {
  opacity: 0.8;
  font-size: 13px;
  margin-top: 8px;
}

.telegram-wrapper {
  margin-top: 20px;
  position: relative;
  display: inline-block;
}

.telegram-btn {
  width: 48px;
  height: 48px;
  left: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.3s ease;
}

.telegram-btn:hover {
  transform: scale(1.05);
}

.telegram-tooltip {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 6px;
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  border: 1px solid #ccc;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.telegram-wrapper:hover .telegram-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

canvas.trail {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
    }}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

#trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none;
  z-index: 1;
}

.card {
  position: relative;
  z-index: 2;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .card {
    width: 90%;
    max-width: 340px;
    padding: 32px 22px;
  }
}
#overlay {
  text-align: center;
  width: 100vw;
  height: 100vh;
}

#overlay.hide {
  display: none;
}
.card {
  position: absolute;
  top: auto;
  left: auto;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 2;
}
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(10, 20, 40, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  backdrop-filter: blur(12px);
  z-index: 999;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: #d9e8ff;
  text-shadow: 0 0 6px rgba(255,255,255,0.25);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-switch {
  font-size: 20px;
  color: #ffda6a;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  opacity: .85;
  transition: .2s;
}

.theme-switch:hover {
  opacity: 1;
}

.theme-switch .divider {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.2);
}

.btn-login,
.btn-register {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #dfeaff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all .2s ease;
}

.btn-login:hover,
.btn-register:hover {
  background: rgba(255,255,255,0.22);
}

.btn-register {
  background: rgba(0,110,255,0.25);
  border-color: rgba(0,110,255,0.35);
}

.btn-register:hover {
  background: rgba(0,110,255,0.4);
}

.buttons-container {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  justify-content: center;
  align-items: center;
}

.telegram-bts {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.3s ease;
  text-decoration: none;
  position: relative;
}

.telegram-bts:hover {
  transform: scale(1.05);
}

.telegram-bts {
  position: static;
  left: auto;
  top: auto;
}