/* ═══════════════════════════════════════════
   Nguyen Phan No — glass bio (expanded)
   ═══════════════════════════════════════════ */

:root {
  --glass: rgba(255, 255, 255, 0.04);
  --glass-soft: rgba(0, 0, 0, 0.14);
  --card-border: 1px solid rgba(255, 255, 255, 0.14);
  --backgroundBlur: 18px;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.7);
  --nameColor: #ffffff;
  --descriptionColor: rgba(255, 255, 255, 0.82);
  --audioControlColor: #e4eaf8;
  --audioControlRgba05: rgba(228, 234, 248, 0.4);
  --iconColor: #ffffff;
  --iconGlow: drop-shadow(0 0 8px rgba(255, 255, 255, 0.45));
  --online: #23a559;
  --idle: #faa81a;
  --dnd: #ed4245;
  --offline: #747f8d;
  --join: #23a559;
  --join-hover: #2dc86a;
  --radius: 24px;
  --avatarRadius: 50%;
  --font: 'Outfit', system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  overflow: hidden;
  background-color: #000;
  color: var(--text);
  min-height: 100vh;
  min-height: 100svh;
  user-select: none;
  -webkit-user-select: none;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
  -webkit-touch-callout: none;
}

::selection {
  background: #fff;
  color: #010101;
}

/* ── Click to enter (text only) ─────────── */

#enter-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  transition:
    opacity 0.85s var(--ease-out),
    backdrop-filter 0.85s var(--ease-out),
    visibility 0.85s;
}

#enter-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(0);
}

.enter-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  animation: enterPulse 4s ease-in-out infinite;
  pointer-events: none;
}

.enter-content {
  position: relative;
  text-align: center;
  z-index: 1;
}

.enter-label {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.15rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: #fff;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.35);
  animation: enterText 2.8s ease-in-out infinite;
}

.enter-hint {
  display: block;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.45);
  animation: enterText 2.8s ease-in-out infinite 0.15s;
}

@keyframes enterPulse {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  50% { transform: scale(1.2); opacity: 0.9; }
}

@keyframes enterText {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

/* ── Video ──────────────────────────────── */

#video-background {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

#video-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 2px
  );
  z-index: 1;
  pointer-events: none;
}

#myVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  z-index: 2;
  opacity: 1;
  transition: opacity 0.9s var(--ease-out), backdrop-filter 0.9s var(--ease-out);
  pointer-events: none;
}

body.video-normal #video-overlay {
  opacity: 0;
  backdrop-filter: blur(0);
}

/* ── Main stage ─────────────────────────── */

#main-stage {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 18px 24px;
  pointer-events: none;
  overflow: auto;
}

#main-stage.visible {
  display: flex;
  animation: stageIn 0.9s var(--ease-out) both;
}

@keyframes stageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#main-stage > * {
  pointer-events: auto;
}

/* ── Profile card (wide, no inner scroll) ─ */

#blurred-box {
  position: relative;
  width: min(1420px, 98vw);
  max-height: none;
  min-height: min(480px, calc(100vh - 100px));
  height: auto;
  background: var(--glass);
  border-radius: var(--radius);
  border: var(--card-border);
  backdrop-filter: blur(var(--backgroundBlur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--backgroundBlur)) saturate(1.3);
  display: none;
  padding: 0;
  text-align: left;
  transform-style: preserve-3d;
  overflow: hidden;
  flex-direction: row;
  align-items: stretch;
  flex-shrink: 0;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  will-change: transform, opacity, box-shadow;
}

#blurred-box.visible {
  display: flex;
  animation: cardIn 1s var(--ease-out) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: perspective(1400px) translateY(28px) scale(0.94);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: perspective(1400px) translateY(0) scale(1);
    filter: blur(0);
  }
}

.card-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.09) 0%,
    transparent 36%,
    transparent 64%,
    rgba(255, 255, 255, 0.04) 100%
  );
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

.card-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  animation: orbFloat 8s ease-in-out infinite;
}

.card-orb-a {
  width: 180px;
  height: 180px;
  top: -40px;
  left: -30px;
  background: rgba(255, 255, 255, 0.12);
}

.card-orb-b {
  width: 140px;
  height: 140px;
  bottom: -30px;
  right: 10%;
  background: rgba(120, 160, 255, 0.12);
  animation-delay: -3s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -10px) scale(1.08); }
}

/* LEFT */

.card-left {
  position: relative;
  z-index: 1;
  flex: 0 0 310px;
  max-width: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 26px;
  gap: 12px;
  text-align: center;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.08) 100%
  );
}

.avatar-stage {
  position: relative;
  width: 130px;
  height: 130px;
  margin-bottom: 6px;
}

.avatar-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 68%);
  animation: avatarGlow 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes avatarGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.07); }
}

.avatar-wrap {
  position: relative;
  width: 118px;
  height: 118px;
  margin: 8px auto 0;
}

#profile-picture {
  width: 118px;
  height: 118px;
  border-radius: var(--avatarRadius);
  object-fit: cover;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
  background: rgba(20, 20, 20, 0.35);
}

#avatar-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.22);
  width: 118px;
  height: 118px;
  z-index: 3;
  pointer-events: none;
  display: none;
  border-radius: 0 !important;
  object-fit: contain;
}

#profile-status-dot {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(12, 12, 14, 0.92);
  z-index: 4;
}

#username-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  font-size: clamp(1.45rem, 2.3vw, 1.85rem);
  font-weight: 600;
  color: var(--nameColor);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

#username-container::before,
#username-container::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

#typing-cursor {
  display: inline-block;
  animation: blink 1s infinite;
  font-weight: 300;
  color: #fff;
}

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

.display-name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.custom-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 92%;
  padding: 7px 14px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
  color: var(--muted);
}

.custom-status[hidden] {
  display: none !important;
}

#custom-status-emoji img {
  width: 18px !important;
  height: 18px !important;
  border-radius: 0 !important;
  vertical-align: middle;
}

.links {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  border-radius: 10px;
  color: var(--iconColor);
  text-decoration: none;
  filter: var(--iconGlow);
  transition: transform 0.35s var(--ease-out), opacity 0.3s ease;
}

.links a:hover {
  transform: translateY(-3px) scale(1.1);
  opacity: 0.92;
  color: #fff;
}

.links a i {
  font-size: 1.4rem;
  margin: 0;
}

/* Divider */

.card-divider {
  width: 1px;
  align-self: stretch;
  margin: 28px 0;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.22) 15%,
    rgba(255, 255, 255, 0.22) 85%,
    transparent
  );
  flex-shrink: 0;
  z-index: 1;
}

/* RIGHT */

.card-right {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 20px 22px 16px;
  overflow: visible;
  justify-content: center;
}

.right-top {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.right-mid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: stretch;
  flex: 1;
  min-height: 250px;
}

.section-block {
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    border-color 0.35s var(--ease-out),
    background 0.35s var(--ease-out);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.section-block:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
}

/* Presence + Server: no outer frame */
.section-block.discord-widget,
.section-block.server-invite-block {
  background: transparent;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 4px 2px;
  box-shadow: none;
}

.section-block.discord-widget:hover,
.section-block.server-invite-block:hover {
  background: transparent;
  border: none;
}

.section-title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-title i {
  opacity: 0.85;
  font-size: 0.82rem;
}

#user-description {
  margin: 0;
  color: var(--descriptionColor);
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 350;
}

#user-description strong {
  color: #fff;
  font-weight: 600;
}

/* Discord presence */

.section-block.discord-widget {
  justify-content: flex-start;
  gap: 0;
}

.discord-content {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

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

#discord-avatar {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  object-fit: cover;
  display: block;
  background: rgba(30, 30, 30, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

#discord-avatar-decor {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.28);
  width: 52px;
  height: 52px;
  pointer-events: none;
  display: none;
  border-radius: 0 !important;
  object-fit: contain;
  z-index: 2;
}

#discord-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2.5px solid rgba(14, 14, 16, 0.95);
  z-index: 3;
  margin: 0 !important;
}

.status-online { background-color: var(--online); box-shadow: 0 0 10px rgba(35, 165, 89, 0.55); }
.status-idle { background-color: var(--idle); box-shadow: 0 0 10px rgba(250, 168, 26, 0.5); }
.status-dnd { background-color: var(--dnd); box-shadow: 0 0 10px rgba(237, 66, 69, 0.5); }
.status-offline { background-color: var(--offline); }

.discord-meta { min-width: 0; flex: 1; }

.discord-meta b {
  font-size: 1.12rem;
  font-weight: 600;
  display: block;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#discord-global-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#discord-global-name:empty { display: none; }

.discord-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  flex-wrap: wrap;
}

#discord-status-text {
  display: inline !important;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 400;
}

.discord-platforms {
  display: flex;
  gap: 6px;
}

.discord-platforms i {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

.discord-platforms i.active { color: #fff; }

.discord-activity {
  position: relative;
  display: flex;
  align-items: center;
  background: transparent;
  padding: 0;
  margin-top: 2px;
  border-radius: 0;
  font-size: 0.86rem;
  color: #ccc;
  min-height: 0;
  overflow: hidden;
  border: none;
  flex: 0 0 auto;
}

#discord-activity-info,
#discord-no-activity { width: 100%; }

#discord-activity-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

#discord-activity-info.hidden,
#discord-no-activity.hidden { display: none; }

#discord-no-activity {
  text-align: left;
  font-style: italic;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.38);
  padding: 4px 0;
}

#discord-album-art {
  width: 52px;
  height: 52px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  flex-shrink: 0;
  background-color: rgba(42, 42, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.discord-activity-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.activity-type-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 500;
}

#discord-activity-name {
  font-weight: 600;
  font-size: 0.98rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#discord-activity-details,
#discord-activity-state {
  font-size: 0.82rem;
  font-weight: 300;
  color: #bbb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotify-progress {
  margin-top: 7px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  overflow: hidden;
}

.spotify-progress.hidden { display: none; }

#discord-spotify-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1db954, #1ed760);
  border-radius: 4px;
  transition: width 1s linear;
}

/* ── Server invite card (live) ──────────── */

.server-invite-block {
  padding: 4px 2px;
}

.server-card {
  position: relative;
  border-radius: 0;
  overflow: visible;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.server-card.is-loading {
  opacity: 0.72;
}

.server-banner {
  height: 62px;
  width: 100%;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(88, 101, 242, 0.55), rgba(35, 165, 89, 0.35)),
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.12), transparent 55%);
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  margin-bottom: 2px;
}

.server-banner.has-image {
  background-color: #1a1a1e;
  background-repeat: no-repeat;
}

.server-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 20%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.server-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 6px;
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.server-icon-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  background: #2b2d31;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  align-self: center;
}

#server-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.server-icon-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.35rem;
  background: linear-gradient(135deg, #5865f2, #3b45a8);
}

.server-info {
  flex: 1;
  min-width: 0;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.server-name {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.server-desc {
  margin: 4px 0 0;
  font-size: 0.72rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.server-desc[hidden] { display: none; }

.server-join-btn {
  align-self: flex-start;
  margin-top: 8px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 28px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--join);
  color: #fff !important;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 12px rgba(35, 165, 89, 0.35);
  transition:
    background 0.3s var(--ease-out),
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.server-join-btn:hover {
  background: var(--join-hover);
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 5px 16px rgba(35, 165, 89, 0.45);
  color: #fff;
}

.server-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 4px 4px 0;
  margin-top: auto;
}

.server-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-radius: 0;
  background: transparent;
  border: none;
  min-width: 0;
}

.server-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.server-stat-dot.online {
  background: var(--online);
  box-shadow: 0 0 8px rgba(35, 165, 89, 0.65);
}

.server-stat-dot.offline {
  background: #747f8d;
  box-shadow: 0 0 6px rgba(116, 127, 141, 0.45);
}

.server-stat-dot.total {
  background: #5865f2;
  box-shadow: 0 0 8px rgba(88, 101, 242, 0.55);
}

.server-stat-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.server-stat-text strong {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.server-stat-text span {
  font-size: 0.68rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Skills — no frames, clean logos */

.lang-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  flex: 1;
  align-content: center;
}

.lang-logo {
  width: 32px !important;
  height: 32px !important;
  border-radius: 0 !important;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  transition: transform 0.35s var(--ease-out), filter 0.35s ease;
  cursor: default;
}

.lang-logo:hover {
  transform: translateY(-3px) scale(1.1);
  filter: drop-shadow(0 4px 10px rgba(255, 255, 255, 0.25));
}

.animated-border {
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: -1;
}

/* ── Audio player (wider) ───────────────── */

.audio_container {
  width: min(1420px, 98vw);
  flex-shrink: 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: var(--card-border);
  background: var(--glass);
  backdrop-filter: blur(var(--backgroundBlur)) saturate(1.25);
  -webkit-backdrop-filter: blur(var(--backgroundBlur)) saturate(1.25);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  filter: blur(4px);
  transition:
    opacity 0.85s var(--ease-out),
    transform 0.85s var(--ease-out),
    filter 0.85s var(--ease-out),
    box-shadow 0.3s ease;
}

.audio_container[hidden] {
  display: none !important;
}

.audio_container.reveal.active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.audio_main_content {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

#audio_avatar_container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.audio_image {
  width: 80px;
  height: 80px;
  border-radius: calc(var(--radius) - 10px);
  object-fit: cover;
  display: block;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(28, 28, 28, 0.45);
  transition: transform 0.4s var(--ease-out);
}

.audio_container:hover .audio_image {
  transform: scale(1.03);
}

.audio_content_container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  gap: 10px;
}

.audio_container .name {
  margin: 0;
  font-size: 1.2rem;
  color: var(--audioControlColor);
  font-weight: 500;
  line-height: 1.2;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.widget_marquee_container { position: relative; }

.widget_marquee_content {
  display: inline-block;
  white-space: nowrap;
  color: inherit;
  font: inherit;
}

.widget_marquee_container.is-overflowing .widget_marquee_content {
  animation: widget-marquee-bounce 9s ease-in-out infinite;
}

@keyframes widget-marquee-bounce {
  0% { transform: translateX(0); }
  40% { transform: translateX(calc(var(--overflow-offset, 0px) * -1)); }
  55% { transform: translateX(calc(var(--overflow-offset, 0px) * -1)); }
  100% { transform: translateX(0); }
}

.audio_controls_row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.audio_controls_row .duration {
  font-size: 0.8rem;
  color: var(--audioControlColor);
  min-width: 36px;
  flex-shrink: 0;
  opacity: 0.88;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

.audio_controls_row .duration.total {
  margin-right: 4px;
  text-align: right;
}

.slideTrack {
  flex: 1;
  min-width: 60px;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  margin: 0 6px;
}

.slideTrack-rail {
  position: relative;
  width: 100%;
  height: 7px;
  border-radius: 6px;
  background: var(--audioControlRgba05);
  overflow: visible;
}

.slideTrack-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 6px;
  background: var(--audioControlColor);
  pointer-events: none;
  transition: width 0.08s linear;
}

.slideTrack-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transition: transform 0.2s var(--ease-out);
}

.slideTrack:hover .slideTrack-handle {
  transform: translate(-50%, -50%) scale(1.15);
}

.audio_controls_row button {
  background: none;
  outline: none;
  border: none;
  line-height: 0;
  padding: 3px;
  color: var(--audioControlColor);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.25s ease, transform 0.3s var(--ease-out);
}

.audio_controls_row button:hover {
  opacity: 0.88;
  transform: scale(1.08);
}

.audio_controls_row button:active {
  transform: scale(0.94);
}

#backward, #forward {
  font-size: 1.1rem;
  opacity: 0.72;
}

#playPause { font-size: 1.95rem; }

#playPause svg,
#backward svg,
#forward svg {
  display: block;
  width: 1em;
  height: 1em;
}

#iconPlay.hidden,
#iconPause.hidden {
  display: none !important;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 6px;
  flex-shrink: 0;
  color: var(--audioControlColor);
  opacity: 0.85;
}

.volume-wrap i { font-size: 0.8rem; }

#volume-slider {
  width: 72px;
  height: 4px;
  accent-color: var(--audioControlColor);
  cursor: pointer;
  appearance: none;
  background: transparent;
}

#volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: var(--audioControlRgba05);
}

#volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  margin-top: -4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: var(--audioControlRgba05);
  border: none;
}

#volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: none;
}

/* Neko */
.neko {
  transition: left 0.2s ease-out, top 0.2s ease-out;
  will-change: left, top;
}

/* ── Responsive ─────────────────────────── */

@media screen and (max-width: 1200px) {
  #blurred-box,
  .audio_container {
    width: min(96vw, 1080px);
  }

  .right-top,
  .right-mid {
    grid-template-columns: 1fr;
  }

  #blurred-box {
    min-height: 0;
  }
}

@media screen and (max-width: 900px) {
  #main-stage {
    justify-content: flex-start;
    padding-top: 24px;
    gap: 14px;
    overflow-y: auto;
  }

  #blurred-box {
    width: min(96vw, 680px);
    max-height: none;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
  }

  .card-left {
    flex: none;
    max-width: none;
    width: 100%;
    padding: 22px 18px 12px;
  }

  .card-divider {
    width: auto;
    height: 1px;
    margin: 0 28px;
    background: linear-gradient(
      to right,
      transparent,
      rgba(255, 255, 255, 0.2) 15%,
      rgba(255, 255, 255, 0.2) 85%,
      transparent
    );
  }

  .card-right {
    padding: 12px 16px 18px;
    overflow: visible;
  }

  .right-top,
  .right-mid {
    grid-template-columns: 1fr;
  }

  .avatar-stage { width: 120px; height: 120px; }
  .avatar-wrap,
  #profile-picture { width: 104px; height: 104px; }
  #avatar-frame { width: 104px; height: 104px; }

  .audio_container { width: min(96vw, 680px); }
  .audio_image { width: 70px; height: 70px; }

  .server-body {
    align-items: center;
  }

  .server-info { padding-top: 0; }
}

@media screen and (max-width: 560px) {
  .audio_controls_row .duration { display: none; }
  .volume-wrap { display: none; }
  .audio_image { width: 60px; height: 60px; }
  .audio_container .name { font-size: 1.05rem; }
  #playPause { font-size: 1.7rem; }
  #blurred-box { border-radius: 20px; }
  .audio_container {
    border-radius: 20px;
    padding: 14px;
  }
  .server-banner { height: 52px; }
  .server-stats {
    gap: 8px;
  }
  .server-stat {
    padding: 2px 0;
  }
  .enter-label { letter-spacing: 0.18em; }
}

@media (prefers-reduced-motion: reduce) {
  .enter-glow,
  .enter-label,
  .enter-hint,
  .avatar-glow,
  .card-orb,
  .widget_marquee_container.is-overflowing .widget_marquee_content,
  #blurred-box.visible,
  #main-stage.visible,
  .audio_container {
    animation: none !important;
  }
}
