* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  position: relative;
  cursor: none;
  background: #0a0a0a;
  text-rendering: optimizeSpeed;
}

/* === CUSTOM CURSOR === */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  margin-left: -3px;
  margin-top: -3px;
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  margin-left: -16px;
  margin-top: -16px;
  transition: width 0.2s, height 0.2s, margin 0.2s, background 0.2s, border-color 0.2s;
}

.cursor-ring.hover {
  width: 50px;
  height: 50px;
  margin-left: -25px;
  margin-top: -25px;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.9);
}

/* === CURSOR MOTION BLUR TRAIL === */
.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

.trail-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  filter: blur(2px);
  will-change: transform, opacity;
  pointer-events: none;
}

.cursor-ring.moving {
  filter: blur(1.5px);
  border-color: rgba(255, 255, 255, 0.4);
}

.cursor-dot.moving {
  filter: blur(1px);
}

/* === ENTER SCREEN === */
.enter-screen {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s, visibility 0.4s;
}

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

.enter-content {
  text-align: center;
}

.enter-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.25);
  filter: grayscale(1);
  margin-bottom: 18px;
}

.enter-content h2 {
  font-size: 26px;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.enter-content p {
  font-size: 13px;
  color: #888;
  margin-bottom: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.enter-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 20px;
  cursor: none;
  transition: background 0.3s, transform 0.3s;
  will-change: transform;
}

.enter-btn:hover {
  background: #fff;
  color: #000;
  transform: scale(1.1);
}

/* === BACKGROUND === */
.bg {
  position: fixed;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(6px) brightness(0.45) grayscale(1);
  z-index: -2;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0.4), rgba(0,0,0,0.85));
  z-index: -1;
}

/* === SNOW === */
.snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -10px;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.5;
  will-change: transform;
  animation: snowfall linear infinite;
}

@keyframes snowfall {
  0% {
    transform: translate3d(0, -10px, 0);
  }
  100% {
    transform: translate3d(var(--drift, 20px), 100vh, 0);
  }
}

/* === MUSIC BTN === */
.music-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 16px;
  cursor: none;
  transition: background 0.3s, transform 0.3s;
  z-index: 10;
  will-change: transform;
}

.music-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.1); }

/* === VISUALIZER === */
.visualizer {
  position: fixed;
  top: 30px;
  right: 80px;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 22px;
  z-index: 10;
}

.visualizer span {
  width: 3px;
  height: 22px;
  background: #fff;
  border-radius: 2px;
  transform-origin: bottom;
  animation: viz 1s infinite ease-in-out;
  will-change: transform;
}

.visualizer span:nth-child(1) { animation-delay: 0s; }
.visualizer span:nth-child(2) { animation-delay: 0.15s; }
.visualizer span:nth-child(3) { animation-delay: 0.3s; }
.visualizer span:nth-child(4) { animation-delay: 0.45s; }
.visualizer span:nth-child(5) { animation-delay: 0.6s; }

@keyframes viz {
  0%, 100% { transform: scaleY(0.2); opacity: 0.5; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* === CARD === */
.card {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 440px;
  padding: 35px 25px;
  background: rgba(18, 18, 22, 0.9);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: fadeUp 0.6s ease;
  max-height: 92vh;
  overflow-y: auto;
}

.card::-webkit-scrollbar { width: 0; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === AVATAR (bỏ grayscale, luôn có màu) === */
.avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.25);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.avatar:hover {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
}

/* === AVATAR NOTE (chữ vàng dưới avatar) === */
.avatar-note {
  font-size: 12px;
  font-weight: 600;
  color: #f5c542;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
  text-shadow: 0 0 10px rgba(245, 197, 66, 0.4);
  animation: notePulse 3s ease-in-out infinite;
}

@keyframes notePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* === STATUS ICON === */
.status-icon {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  transition: background 0.3s;
  line-height: 1;
}

.status-icon.online     { background: #23a55a; }
.status-icon.idle       { background: #f0b232; }
.status-icon.dnd        { background: #f23f43; }
.status-icon.offline    { background: #80848e; }
.status-icon.invisible  { background: #80848e; }

.status-icon::after { content: ""; }
.status-icon.online::after     { content: "●"; font-size: 14px; }
.status-icon.idle::after       { content: "🌙"; font-size: 11px; }
.status-icon.dnd::after        { content: "—"; font-size: 14px; font-weight: 900; }
.status-icon.offline::after    { content: "○"; font-size: 12px; }
.status-icon.invisible::after  { content: "○"; font-size: 12px; }

/* === TEXT === */
h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; letter-spacing: 0.5px; }
.username { font-size: 13px; color: #a0a0b0; margin-bottom: 8px; }

/* === BADGES === */
.badges {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-item i { font-size: 10px; }

/* === SKILLS === */
.skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  transition: background 0.25s, transform 0.25s;
  will-change: transform;
}

.skill-badge:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.skill-badge i { font-size: 12px; }

/* === META === */
.meta-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 11px;
  color: #9090a0;
  margin-bottom: 18px;
}

.meta-row span { display: inline-flex; align-items: center; gap: 4px; }

/* === DISCORD ACTIVITY === */
.discord-activity {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 18px;
  text-align: left;
}

.activity-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #d0d0d0;
  margin-bottom: 10px;
  font-weight: 600;
}

.activity-body { display: flex; gap: 12px; align-items: center; }

.activity-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255,255,255,0.05);
}

.activity-info { flex: 1; min-width: 0; }

.activity-type {
  font-size: 10px;
  text-transform: uppercase;
  color: #a0a0b0;
  letter-spacing: 0.5px;
}

.activity-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-detail {
  display: block;
  font-size: 12px;
  color: #b0b0c0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffffff, #888888);
  border-radius: 2px;
  transition: width 1s linear;
}

.progress-times {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #a0a0b0;
  margin-top: 3px;
}

/* === SOCIALS === */
.socials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  transition: background 0.25s, transform 0.25s;
  cursor: none;
  will-change: transform;
}

.social-btn i { font-size: 22px; }

.social-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

/* === DISCORD USER CARD === */
.discord-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  text-align: left;
  transition: background 0.25s, transform 0.25s, border-color 0.25s;
  cursor: none;
  will-change: transform;
}

.discord-user-card:hover {
  background: rgba(88, 101, 242, 0.15);
  border-color: rgba(88, 101, 242, 0.5);
  transform: translateY(-2px);
}

.duc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.15);
}

.duc-info { flex: 1; min-width: 0; }

.duc-name-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 2px;
}

.duc-username {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duc-tag {
  font-size: 11px;
  color: #a0a0b0;
  flex-shrink: 0;
}

.duc-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #b0b0c0;
}

.duc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #80848e;
  transition: background 0.3s;
}

.duc-status-dot.online    { background: #23a55a; }
.duc-status-dot.idle      { background: #f0b232; }
.duc-status-dot.dnd       { background: #f23f43; }
.duc-status-dot.offline   { background: #80848e; }
.duc-status-dot.invisible { background: #80848e; }

.duc-arrow {
  font-size: 12px;
  color: #808090;
  transition: color 0.25s, transform 0.25s;
}

.discord-user-card:hover .duc-arrow {
  color: #5865f2;
  transform: translate(2px, -2px);
}

/* === BOTTOM ROW === */
.bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 0 4px;
}

.views {
  font-size: 12px;
  color: #808090;
  display: flex;
  align-items: center;
  gap: 6px;
}

.share-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 13px;
  cursor: none;
  transition: background 0.25s, transform 0.25s;
  will-change: transform;
}

.share-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: scale(1.1);
}

/* === QR MODAL === */
.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.qr-modal.show {
  opacity: 1;
  visibility: visible;
}

.qr-content {
  background: #14141e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  max-width: 90%;
}

.qr-content h3 {
  font-size: 16px;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}

#qrCode {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 14px;
}

#qrCode img { display: block; }

.qr-url {
  font-size: 11px;
  color: #888;
  margin-bottom: 16px;
  word-break: break-all;
}

.qr-close {
  padding: 8px 22px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 12px;
  cursor: none;
  transition: background 0.25s, color 0.25s;
}

.qr-close:hover {
  background: #fff;
  color: #000;
}

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate3d(-50%, 100px, 0);
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s;
  z-index: 100;
  will-change: transform, opacity;
}

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

/* === RESPONSIVE === */
@media (max-width: 500px) {
  .card { padding: 28px 20px; }
  .avatar { width: 88px; height: 88px; }
  .trail-dot { width: 6px; height: 6px; margin-left: -3px; margin-top: -3px; }
}