:root {
  --accent: #b5afb1;
  --text-main: #ffffff;
  --text-muted: rgba(228, 228, 231, 0.72);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Playfair Display', Georgia, serif;
  background-color: #07070c;
  color: var(--text-main);
  overflow-x: hidden;
  user-select: none;
}

/* Nền video toàn màn hình */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

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

.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 35%, rgba(4, 4, 8, 0.75) 100%);
}

/* Màn hình Click to Enter */
.enter-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 11, 0.88);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  cursor: pointer;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.enter-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.enter-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  animation: pulse 2s infinite ease-in-out;
}

.enter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px #fff;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Container & Thẻ Bio kiểu Cú Profile */
.container {
  position: relative;
  z-index: 3;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  perspective: 1200px;
}

.bio-card {
  position: relative;
  width: 100%;
  max-width: 811px;
  border-radius: 37px;
  background: linear-gradient(135deg, rgba(181, 175, 177, 0.11) 0%, rgba(16, 16, 24, 0.24) 50%, rgba(16, 16, 24, 0.12) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out;
}

.card-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.07), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.bio-card:hover .card-spotlight {
  opacity: 1;
}

/* Banner trên cùng */
.card-banner {
  position: relative;
  height: 165px;
  width: 100%;
  background: url('https://pub-3faf99c16ada425bb9b35adf8bcb2ce0.r2.dev/media/22_1795645739422_260tvi.gif') center/cover no-repeat;
}

.banner-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent);
}

.tab-switcher {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: 'Inter', sans-serif;
}

.tab-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #a1a1aa;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: rgba(181, 175, 177, 0.28);
  color: #fff;
}

/* Thân thẻ */
.card-body {
  padding: 0 32px 28px;
}

.avatar-badges-row {
  position: relative;
  z-index: 10;
  margin-top: -48px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
}

.avatar-glow {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  background: var(--accent);
  filter: blur(12px);
  opacity: 0.38;
}

.avatar-sonar {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  animation: sonar 2.5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.avatar-sonar.delay {
  animation-delay: 1.25s;
  border-color: rgba(255, 255, 255, 0.35);
}

@keyframes sonar {
  0% { transform: scale(0.96); opacity: 0.78; }
  100% { transform: scale(1.34); opacity: 0; }
}

.avatar {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Nút Mute góc trên trái */
.mute-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 40;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(12, 12, 22, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  color: #e4e4e7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.mute-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.06);
}

.mute-btn svg {
  width: 16px;
  height: 16px;
}

.badges-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(12, 12, 22, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 8px;
  color: #e4e4e7;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.badge-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.12);
}

.badge-icon svg {
  width: 16px;
  height: 16px;
}

.premium-gem {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  vertical-align: middle;
  filter: drop-shadow(0 0 6px #a749dd);
}

.premium-gem svg {
  width: 20px;
  height: 20px;
}

.foot-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.foot-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.9;
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Tên + Sao lấp lánh */
.display-name-wrap {
  margin-bottom: 2px;
}

.display-name {
  position: relative;
  display: inline-block;
  font-size: 1.9rem;
  font-weight: 700;
  text-shadow: 0 0 14px rgba(181, 175, 177, 0.65), 0 2px 10px rgba(0, 0, 0, 0.85);
}

.sparkle {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 0 5px #fff);
  animation: twinkle 2.3s ease-in-out infinite;
}

.s1 { top: -8px; left: -12px; width: 11px; height: 11px; }
.s2 { top: -6px; right: -14px; width: 13px; height: 13px; animation-delay: 0.55s; }
.s3 { bottom: -4px; left: 22%; width: 10px; height: 10px; animation-delay: 1.1s; }
.s4 { bottom: -4px; right: 18%; width: 9px; height: 9px; animation-delay: 1.65s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.75); }
  50% { opacity: 1; transform: scale(1.15); }
}

.handle {
  font-family: monospace;
  font-size: 0.78rem;
  color: #a1a1aa;
  margin-bottom: 8px;
}

.bio-quote {
  font-size: 0.95rem;
  line-height: 1.6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  margin-bottom: 20px;
}

/* Thẻ Discord Live */
.discord-card {
  max-width: 440px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(15, 15, 24, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease;
}

.discord-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.dc-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.dc-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.dc-online {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #23a55a;
  border: 2px solid #18181b;
}

.dc-info {
  min-width: 0;
}

.dc-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dc-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.dc-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.65rem;
  font-weight: 700;
}

.dc-tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c084fc;
}

.dc-activity {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Trình phát nhạc */
.music-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(12, 12, 22, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-family: 'Inter', sans-serif;
  margin-bottom: 18px;
}

.music-cover {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.music-body {
  flex: 1;
  min-width: 0;
}

.track-title {
  font-size: 0.78rem;
  font-weight: 600;
}

.track-artist {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.music-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.time-text {
  font-family: monospace;
  font-size: 0.68rem;
  font-weight: 600;
}

#progress-bar {
  flex: 1;
  height: 4px;
  accent-color: var(--accent);
  cursor: pointer;
}

.play-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(181, 175, 177, 0.22);
  border: 1px solid rgba(181, 175, 177, 0.42);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.play-btn:hover {
  transform: scale(1.06);
}

.play-btn svg {
  width: 15px;
  height: 15px;
}

/* Socials */
.socials-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
}

.social-icon {
  color: #fff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
  transition: transform 0.2s ease;
}

.social-icon:hover {
  transform: translateY(-2px) scale(1.12);
}

.social-icon svg {
  width: 30px;
  height: 30px;
}

/* Media Tab */
.media-placeholder {
  padding: 36px 16px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
}

.media-placeholder p {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.media-placeholder span {
  font-size: 0.8rem;
}

/* Footer */
.card-footer {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.uid {
  font-family: monospace;
  opacity: 0.85;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 60;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(15, 20, 28, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .card-body {
    padding: 0 18px 22px;
  }
  .card-banner {
    height: 135px;
  }
}
