:root {
  --bg: #000000;
  --panel: rgba(15, 18, 32, 0.78);
  --panel-strong: rgba(20, 24, 42, 0.92);
  --line: rgba(255, 255, 255, 0.11);
  --discord: #5865f2;
  --cyan: #35e8ff;
  --pink: #ff4fd8;
  --green: #3ee87d;
  --yellow: #f0b232;
  --red: #f45b69;
  --text: #eef4ff;
  --muted: #9aa8c7;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.52);

  /* fluid typography */
  --font-h1: clamp(1.3rem, 2.5vw + 0.5rem, 2.1rem);
  --font-h2: clamp(1rem, 1.8vw + 0.3rem, 1.5rem);
  --font-body: clamp(0.75rem, 1.2vw + 0.25rem, 0.9rem);
  --font-mono: clamp(0.65rem, 1.1vw + 0.2rem, 0.82rem);
  --font-label: clamp(0.6rem, 1vw + 0.15rem, 0.75rem);

  /* === Liquid Glass 3 cấp — cùng blur 24px, viền 8%, highlight trên === */
  --glass-blur: 24px;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.18);
}

/* Một lớp glass dùng được cho mọi panel — chỉ đổi cấp độ đậm nhạt qua .glass-1/2/3 */
.glass-1, .glass-2, .glass-3 {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  box-shadow: var(--shadow);
}
.glass-1 { background: color-mix(in srgb, var(--panel) 55%, transparent); }
.glass-2 { background: color-mix(in srgb, var(--panel) 78%, transparent); }
.glass-3 { background: var(--panel-strong); }

/* Highlight mảnh phía trên — mô phỏng cạnh trên của Liquid Glass */
.glass-1::before, .glass-2::before, .glass-3::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, var(--glass-highlight) 0%, rgba(255, 255, 255, 0.02) 38%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}


/* === Display font cho tiêu đề tên === */
.display-name {
  font-family: "Chakra Petch", "Outfit", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(22px, 4.6vw, 30px);
  line-height: 1.02;
  background: linear-gradient(90deg, #ff4fd8 0%, #c56cff 42%, #35e8ff 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  text-shadow: 0 0 22px rgba(255, 79, 216, 0.18);
  position: relative;
}
.kanji-deco {
  display: inline-block;
  margin-left: 8px;
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-weight: 500;
  font-size: 0.55em;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
  vertical-align: 0.18em;
  text-shadow: 0 0 12px rgba(53, 232, 255, 0.25);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.55);
}
.kanji-deco::before {
  content: "[ ";
  opacity: 0.4;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85em;
  letter-spacing: 0;
  margin-right: 2px;
}
.kanji-deco::after {
  content: " ]";
  opacity: 0.4;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85em;
  letter-spacing: 0;
  margin-left: 2px;
}

/* === Scroll reveal === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s cubic-bezier(.16,1,.3,1), transform .55s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}


.bg-video {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
video.bg-video {
  object-fit: cover;
}
#bg-yt-player {
  position: absolute;
  top: 50%; left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%) scale(1.35);
  width: 100vw;
  height: 56.25vw;
  min-height: 100dvh;
  min-width: 177.77vh;
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s ease;
}
#bg-yt-container {
  background: #020308;
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease, visibility .25s ease;
}
#bg-yt-container::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(rgba(2, 3, 8, .08), rgba(2, 3, 8, .08)),
    url('../background/bg-1440.jpg') center / cover no-repeat;
  opacity: 1;
  transition: opacity .55s ease, visibility .55s ease;
  pointer-events: none;
}
#bg-yt-container.is-playing #bg-yt-player {
  opacity: 1;
}
#bg-yt-container.is-playing::after {
  opacity: 0;
  visibility: hidden;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: rgba(192, 132, 252, 0.6) rgba(4, 6, 15, 0.85); background: transparent; }


body {
  background-image: none !important;
  background-color: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  margin: 0;
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   PHẦN CHỈNH SỬA: Thay thế ảnh nền bằng style chuẩn Linux
   ============================================================ */
.cmd-window {
  width: min(760px, 94vw);
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(8, 8, 12, 0.75);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,.1);
  position: relative;
  transform: translateZ(0);
}

/* Hiệu ứng thở (pulse glow) nhẹ ở nền Terminal */
.cmd-window::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
  animation: terminalPulse 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes terminalPulse {
  0% { transform: scale(0.8); opacity: 0.4; }
  100% { transform: scale(1.2); opacity: 1; }
}
/* ============================================================ */

.terminal-header {
  background-color: #161b22;
  padding: 12px 15px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #30363d;
}

.btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.close { background-color: #ff5f56; }
.minimize { background-color: #ffbd2e; }
.maximize { background-color: #27c93f; }

.terminal-body {
  padding: 20px;
  color: #c9d1d9;
}

.pointer-glow { position:fixed; left:var(--pointer-x, 50vw); top:var(--pointer-y, 50vh); width:420px; height:420px; z-index:1; pointer-events:none; border-radius:50%; transform:translate(-50%, -50%); background:radial-gradient(circle, rgb(var(--accent2-rgb) / .16), rgb(var(--accent-rgb) / .08) 36%, transparent 68%); mix-blend-mode:screen; opacity:0; filter:blur(4px); transition:opacity .22s ease; }
body.pointer-active .pointer-glow { opacity:1; }
.page-ripple { position:fixed; z-index:2; left:var(--ripple-x); top:var(--ripple-y); width:14px; height:14px; border-radius:50%; pointer-events:none; transform:translate(-50%, -50%) scale(0); background:radial-gradient(circle, rgba(255,255,255,.26), rgb(var(--accent3-rgb) / .11) 42%, transparent 70%); mix-blend-mode:screen; animation:pageRipple 1.08s ease-out forwards; }
a { color: inherit; text-decoration: none; }
button, a { font: inherit; }

body, button, a, input { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='%23ffffff' stroke='%23111118' stroke-width='1.4' d='M5 3.8 22.6 13 14.7 15.1 11 23.2z'/%3E%3Cpath fill='%23ff9bd8' d='m9.6 7.6 5.1 4.7-3.4.9z'/%3E%3Ccircle cx='18.8' cy='6.6' r='2.1' fill='%23ff9bd8'/%3E%3Ccircle cx='22.6' cy='9.9' r='1.25' fill='%2389f7ff'/%3E%3C/svg%3E") 5 4, auto; }

.ambient { position: fixed; width: 42vw; height: 42vw; min-width: 300px; min-height: 300px; border-radius: 999px; filter: blur(78px); opacity: 0.24; z-index: -3; animation: drift 14s ease-in-out infinite alternate; }
.ambient-one { left: -12%; top: 4%; background: var(--discord); }
.ambient-two { right: -10%; bottom: -12%; background: var(--pink); animation-delay: -5s; }
.scanlines { position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: 0.025; background: repeating-linear-gradient(0deg, rgba(255,255,255,.13) 0 1px, transparent 1px 4px); mix-blend-mode: overlay; }

body.color-page-active .screen { padding-bottom:30px; align-items:start; }
body.color-page-active .profile-screen { padding-top:34px; }
body.color-page-active .profile-console { margin-top:0; }

/* Chế độ wide khi mở Steam / Minecraft page */
body.wide-page-active .profile-console {
  width: min(860px, 94vw) !important;
  transition: width .45s cubic-bezier(.16,1,.3,1), transform .16s ease, box-shadow .24s ease;
}
body.wide-page-active .color-page {
  min-height: 520px;
}

.screen { min-height: 100dvh; width: 100%; display: none; place-items: center; padding: 30px 16px 138px; }
.terminal-screen { padding-bottom: 30px; overscroll-behavior:none; touch-action:none; position: relative; overflow: hidden; }
.screen.active { display: grid; animation: screenIn .55s ease both; }
.glass-panel { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.08); backdrop-filter: blur(22px) saturate(130%); }

.cmd-titlebar { height: 38px; display: flex; align-items: center; justify-content: flex-start; background: transparent; border-bottom: 1px solid rgba(255,255,255,.08); user-select: none; position: relative; z-index: 2; padding: 0 12px; gap: 8px; }
.cmd-tabs { display: flex; align-items: center; height: 100%; min-width: 0; flex:0 1 auto; overflow:hidden; }
.cmd-tab { height: 100%; min-width:132px; max-width:210px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding: 0 12px; color: rgba(255,255,255,0.6); font: 500 13px "Segoe UI", system-ui, sans-serif; background: transparent; border:0; transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1); position: relative; }
.cmd-tab:hover { color: #fff; background: rgba(255,255,255,0.04); transform: translateY(-1px); }
.cmd-tab.active-tab { color:#fff; background:rgba(255,255,255,0.08); border-radius: 6px 6px 0 0; height: 28px; margin: 5px 0; box-shadow: inset 0 1px 0 rgba(255,255,255,0.12); }
.cmd-tab.active-tab::after { content: ""; position: absolute; bottom: 0; left: 8px; right: 8px; height: 2px; background: linear-gradient(90deg, var(--cyan, #32d3ff), var(--pink, #f0399c)); border-radius: 2px; box-shadow: 0 0 8px var(--cyan, #32d3ff); animation: tabActiveGlow 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes tabActiveGlow { from { opacity: 0; transform: scaleX(0.4); } to { opacity: 1; transform: scaleX(1); } }

.cmd-tab-title { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.cmd-tab-close { opacity:.55; font-size:14px; line-height:1; transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease, background 0.2s ease; border-radius: 50%; width: 16px; height: 16px; display: grid; place-items: center; }
.cmd-tab:hover .cmd-tab-close { opacity:1; }
.cmd-tab-close:hover { transform: rotate(90deg) scale(1.2); color: #ff5f56; background: rgba(255,95,86,0.2); }

.cmd-plus { width: 34px; height:28px; text-align: center; color: #d0d0d0; font-size: 17px; flex:0 0 auto; border:0; background:transparent; cursor:pointer; border-radius: 6px; transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, color 0.2s ease; display: grid; place-items: center; }
.cmd-plus:hover { transform: rotate(90deg) scale(1.15); color: #fff; background: rgba(255,255,255,0.1); }
.cmd-plus:active { transform: rotate(90deg) scale(0.9); }

.cmd-controls { margin-left: 0; margin-right: 12px; display: flex; gap: 8px; height: 100%; align-items: center; }
.cmd-controls span { width: 12px !important; height: 12px !important; border-radius: 50%; display: inline-block; cursor: pointer; flex-shrink: 0; transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, filter 0.2s ease; }
.cmd-controls span:hover { transform: scale(1.25); filter: brightness(1.25); box-shadow: 0 0 10px currentColor; }
.cmd-controls span:active { transform: scale(0.9); }

.cmd-controls span:nth-child(1) { background-color: #ff5f56 !important; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); }
.cmd-controls span:nth-child(2) { background-color: #ffbd2e !important; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); }
.cmd-controls span:nth-child(3) { background-color: #27c93f !important; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); }

/* Windows 11 Window Animations & Tab switching */
.cmd-window {
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
}

.cmd-window.maximized {
  width: min(980px, 98vw) !important;
  max-height: calc(100dvh - 20px) !important;
  box-shadow: 0 25px 70px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.2) !important;
}

.cmd-body { min-height: 380px; padding: 18px 20px 20px; color: #eaf8ff; font: 500 clamp(12px, 2vw, 15px) var(--font-mono); line-height: 1.48; position: relative; z-index: 2;}
.cmd-body.tab-switching {
  animation: win11TabSlide 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes win11TabSlide {
  0% { opacity: 0; transform: translateX(18px) scale(0.98); filter: blur(4px); }
  100% { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

.cmd-continue {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.cmd-continue:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgb(var(--accent-rgb, 99 102 241) / .45), 0 0 16px rgba(50,211,255,0.4);
}
.cmd-continue:active {
  transform: translateY(0) scale(0.97);
}
.cmd-plus:hover { background:#2b2b2b; }
.cmd-log { white-space:pre-wrap; min-height:270px; color:#f2f2f2; }
.cmd-prompt-line { display:flex; align-items:center; gap:0; color:#f2f2f2; margin:0; }
.cmd-prompt-line span { flex:0 0 auto; }
.cmd-prompt-line input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:#f2f2f2; font:inherit; caret-color:#f2f2f2; padding:0 0 0 6px; }
.cmd-body p { margin: 0; }
#typewriter-output.hidden, .cmd-continue.hidden, .cmd-prompt-line.hidden { display:none; }
.cmd-log.typing::after { content: "█"; margin-left: 2px; animation: blink 1s steps(1) infinite; }
.cmd-continue {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 18px;
  width: 100%;
  padding: 13px 14px;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  letter-spacing: .015em;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 14px;
  background:
    radial-gradient(120% 140% at 18% -20%, rgba(255,255,255,.4), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.03) 42%, rgba(0,0,0,.18) 100%),
    rgba(40,40,46,.5);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.55),
    inset 0 -10px 18px -12px rgba(0,0,0,.4),
    0 10px 26px rgba(0,0,0,.45),
    0 0 16px rgba(255,255,255,.06);
  transition: transform .45s cubic-bezier(.16,1,.3,1), box-shadow .45s cubic-bezier(.16,1,.3,1), border-color .35s ease, background .35s ease;
  animation: liquidBreathe 4.5s ease-in-out infinite;
}
.cmd-continue::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
  background-size: 240% 100%;
  background-position: 180% 0;
  mix-blend-mode: screen;
  opacity: .9;
  transition: background-position 1.15s cubic-bezier(.16,1,.3,1);
}
.cmd-continue::after {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent);
  filter: blur(.3px);
  pointer-events: none;
  z-index: 2;
}
.cmd-continue span, .cmd-continue { position: relative; z-index: 3; }
.cmd-continue:hover {
  transform: translateY(-2px) scale(1.012);
  border-color: rgba(255,255,255,.5);
  background:
    radial-gradient(120% 140% at 18% -20%, rgba(255,255,255,.5), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,.05) 42%, rgba(0,0,0,.16) 100%),
    rgba(48,48,54,.55);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.7),
    inset 0 -10px 18px -12px rgba(0,0,0,.4),
    0 16px 38px rgba(0,0,0,.5),
    0 0 26px rgba(255,255,255,.16);
}
.cmd-continue:hover::before { background-position: -40% 0; }
.cmd-continue:active {
  transform: translateY(0) scale(.985);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.5),
    inset 0 6px 14px -8px rgba(0,0,0,.5),
    0 6px 16px rgba(0,0,0,.4);
}
@keyframes liquidBreathe {
  0%, 100% { box-shadow: inset 0 1px 1px rgba(255,255,255,.55), inset 0 -10px 18px -12px rgba(0,0,0,.4), 0 10px 26px rgba(0,0,0,.45), 0 0 14px rgba(255,255,255,.05); }
  50% { box-shadow: inset 0 1px 1px rgba(255,255,255,.65), inset 0 -10px 18px -12px rgba(0,0,0,.4), 0 10px 26px rgba(0,0,0,.45), 0 0 22px rgba(255,255,255,.12); }
}

.profile-console {
  width: min(560px, 94vw);
  overflow: hidden;
  border-radius: 16px;
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px) scale3d(var(--card-scale, 1), var(--card-scale, 1), var(--card-scale, 1));
  transform-style: preserve-3d;
  position: relative;
  border: 0;
  transition: transform 0.12s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.25s ease;
  will-change: transform;
}
.profile-console.interactive-hover {
  box-shadow: var(--shadow), 0 0 50px rgb(var(--accent-rgb) / .28), 0 20px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,.2);
}
.profile-console.slide-to-color { animation:pageDriftOut .72s cubic-bezier(.16,1,.3,1) both; }
.profile-console.slide-to-home { animation:pageDriftIn .66s cubic-bezier(.16,1,.3,1) both; }

/* Specular Glass Glare Spotlight */
.holo-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  opacity: var(--glare-opacity, 0);
  background: radial-gradient(
    circle 360px at var(--glare-x, 50%) var(--glare-y, 50%),
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.04) 36%,
    transparent 70%
  );
  mix-blend-mode: overlay;
  transition: opacity 0.28s ease;
}

/* 3D Depth for inner card layers */
.profile-console .avatar-wrap {
  transform: translateZ(28px);
  transition: transform 0.2s ease;
}
.profile-console .identity-block {
  transform: translateZ(20px);
  transition: transform 0.2s ease;
}
.profile-console .presence-card,
.profile-console .activity-card,
.profile-console .meta-grid,
.profile-console .about-card {
  transform: translateZ(12px);
  transform-style: preserve-3d;
}
.profile-console::before { content:""; position:absolute; inset:0; z-index:2; pointer-events:none; border-radius:inherit; padding:4px; background:linear-gradient(180deg, #ff7adf 0%, #c56cff 34%, rgba(255,255,255,.18) 50%, #5865f2 68%, #35e8ff 100%); -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask-composite:exclude; opacity:.95; }
.profile-console::after { content:""; position:absolute; inset:0; z-index:3; pointer-events:none; border-radius:inherit; background:radial-gradient(360px circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(255,255,255,.18), rgb(var(--accent2-rgb) / .08) 28%, transparent 58%); opacity:0; mix-blend-mode:screen; transition:opacity .22s ease; }
.profile-console.interactive-hover::after { opacity:0; }
.hover-ripple { position:absolute; z-index:3; width:12px; height:12px; left:var(--ripple-x); top:var(--ripple-y); border-radius:50%; pointer-events:none; transform:translate(-50%, -50%) scale(0); background:radial-gradient(circle, rgba(255,255,255,.38), rgb(var(--accent2-rgb) / .16) 38%, transparent 68%); animation:hoverRipple .96s ease-out forwards; mix-blend-mode:screen; }
.profile-banner { height: 128px; position: relative; overflow: hidden; background: #151821; z-index: 1; border-top-left-radius: inherit; border-top-right-radius: inherit; }
.profile-banner img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.12) contrast(1.05); }
.profile-banner::after { content:""; position:absolute; inset:auto 0 0; height:52px; background:linear-gradient(transparent, var(--panel-strong)); z-index:6; pointer-events:none; }
.banner-glow { position:absolute; inset:0; background: radial-gradient(circle at 24% 38%, rgb(var(--accent2-rgb) / .22), transparent 34%); animation: glowShift 5s ease infinite alternate; z-index:5; pointer-events:none; }
.profile-header { display:flex; align-items:end; gap:15px; padding:0 20px 16px; margin-top:-46px; position:relative; z-index:10; }
.avatar-wrap { position:relative; width:104px; height:104px; flex:0 0 auto; }
.avatar-image, .avatar-fallback { width:100%; height:100%; border-radius:50%; border:5px solid var(--panel-strong); object-fit:cover; background:linear-gradient(135deg, #202541, #5865f2); }
.avatar-fallback { position:absolute; inset:0; display:grid; place-items:center; font-size:42px; font-weight:800; color:#fff; }
.avatar-image[src]:not([src=""]) { position:relative; z-index:2; }
.avatar-image[src]:not([src=""]) + .avatar-fallback { display:none; }
.avatar-decoration { position:absolute; z-index:4; inset:0; width:100%; height:100%; object-fit:contain; pointer-events:none; filter:drop-shadow(0 0 8px rgb(var(--accent3-rgb) / .32)); transform:scale(1.08); transform-origin:center; }
.status-orb { position:absolute; z-index:5; right:4px; bottom:7px; width:28px; height:28px; border-radius:50%; border:5px solid var(--panel-strong); background:#828898; box-shadow:none; }
.status-orb::after { content:""; position:absolute; pointer-events:none; }
.status-orb.online { background:#23a55a; box-shadow:0 0 16px rgba(35,165,90,.48); }
.status-orb.online::after { display:none; }
.status-orb.idle { background:transparent url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 23"%3E%3Cpath fill="%23faa61a" fill-rule="evenodd" d="M 11.550781 -0.00390625 C 11.847656 -0.00390625 12.144531 -0.00390625 12.441406 -0.00390625 C 15.25 0.121094 17.71875 1.054688 19.84375 2.789062 C 21.714844 4.359375 22.972656 6.300781 23.617188 8.613281 C 23.847656 9.484375 23.972656 10.371094 23.996094 11.265625 C 23.996094 11.417969 23.996094 11.574219 23.996094 11.726562 C 23.90625 14.496094 22.933594 16.925781 21.074219 19.023438 C 19.386719 20.871094 17.296875 22.089844 14.800781 22.6875 C 14.023438 22.863281 13.234375 22.964844 12.441406 22.996094 C 12.140625 22.996094 11.84375 22.996094 11.542969 22.996094 C 8.800781 22.871094 6.378906 21.976562 4.273438 20.308594 C 2.367188 18.75 1.074219 16.804688 0.398438 14.476562 C 0.164062 13.621094 0.03125 12.75 -0.00390625 11.863281 C -0.00390625 11.621094 -0.00390625 11.378906 -0.00390625 11.136719 C 0.0234375 10.425781 0.113281 9.722656 0.273438 9.027344 C 0.847656 10.859375 1.988281 12.265625 3.691406 13.246094 C 5.175781 14.058594 6.761719 14.355469 8.457031 14.136719 C 10.15625 13.886719 11.601562 13.171875 12.789062 11.996094 C 14.117188 10.621094 14.796875 8.988281 14.824219 7.101562 C 14.792969 5.203125 14.109375 3.566406 12.765625 2.1875 C 11.832031 1.265625 10.714844 0.621094 9.417969 0.261719 C 10.121094 0.113281 10.832031 0.0234375 11.550781 -0.00390625 Z M 11.550781 -0.00390625"/%3E%3C/svg%3E') center/22px 22px no-repeat; box-shadow:none; }
.status-orb.idle::after { display:none; }
.status-orb.dnd { background:#f23f43; box-shadow:0 0 16px rgba(242,63,67,.42); }
.status-orb.dnd::after { left:50%; top:50%; width:14px; height:5px; border-radius:99px; background:#fff; transform:translate(-50%, -50%); }
.status-orb.offline { background:#80848e; box-shadow:none; }
.status-orb.offline::after { inset:5px; border-radius:50%; background:var(--panel-strong); }
.identity-block { min-width:0; padding-bottom:5px; }
.eyebrow { margin:0 0 5px; color:#b9c1ff; text-transform:uppercase; letter-spacing:.12em; font-size:10px; font-weight:800; }
h1 { margin:0; font-size:clamp(24px, 5vw, 32px); line-height:.98; letter-spacing:-.035em; }
.profile-typing-name { display:inline; min-height:1em; background:linear-gradient(90deg, #fff, #ffd6f5 42%, #a9f6ff); -webkit-background-clip:text; background-clip:text; color:transparent; text-shadow:0 0 22px rgb(var(--accent3-rgb) / .18); }
.profile-typing-cursor { display:inline-block; margin-left:2px; color:#fff; font-weight:500; text-shadow:0 0 12px rgba(255,255,255,.58); animation:typingCaret .8s infinite; }
.username { margin:6px 0 0; color:var(--muted); font-weight:600; }

.presence-card, .activity-card, .about-card {
  margin:0 20px 11px;
  padding:14px;
  border:1px solid rgba(255,255,255,.09);
  background:rgba(255,255,255,.045);
  border-radius:18px;
  position: relative;
  transform: perspective(1000px) rotateX(var(--rotateX, 0deg)) rotateY(var(--rotateY, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94), background .45s ease, border-color .35s ease, box-shadow .45s ease;
  will-change: transform;
}
.presence-card::before, .activity-card::before, .about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255,255,255,0.25) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}
.presence-card:hover::before, .activity-card:hover::before, .about-card:hover::before {
  opacity: 1;
}

/* Popping out inner content slightly */
.presence-card > div, .activity-card > div, .about-card > div {
  transform: translateZ(15px);
}
.presence-card { display:flex; justify-content:space-between; align-items:center; gap:12px; z-index:20; position:relative; }
.presence-card h2, .activity-card h2, .about-card h2 { margin:0 0 5px; font-size:14px; }
#custom-status-line { color:#cbd5ff; font-weight:500; letter-spacing:0; }
.presence-card p, .activity-card p, .about-card p { margin:0; color:var(--muted); font-size:14px; }
.inline-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:7px; background:#80848e; }
.inline-dot.online { background:var(--green); box-shadow:0 0 12px rgba(62,232,125,.5); }
.inline-dot.idle { background:var(--yellow); }
.inline-dot.dnd { background:var(--red); }
/* sync-pill removed — replaced by clock-inline widget */
.activity-card.hidden { display:none; }
.activity-card { display:flex; align-items:center; gap:12px; }
.activity-icon { width:40px; height:40px; border-radius:10px; display:grid; place-items:center; background:linear-gradient(135deg, var(--discord), var(--cyan)); box-shadow:0 0 22px rgb(var(--accent-rgb) / .24); flex:0 0 auto; }
.activity-time { margin-top:5px !important; font:700 11px var(--font-mono); color:#c7d0ff !important; }
.meta-grid { display:grid; grid-template-columns:repeat(2, 1fr); gap:8px; margin:0 20px 11px; }
.meta-grid div { min-width:0; padding:12px 14px; border:1px solid rgba(255,255,255,.08); border-radius:16px; background:rgba(255,255,255,.035); }
.meta-grid span { display:block; margin-bottom:4px; color:var(--muted); font-size:12px; font-weight:600; text-transform:none; letter-spacing:0; }
.meta-grid strong { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#eef4ff; font-size:13px; }
.badge-list { display:flex !important; align-items:center; gap:5px; min-height:24px; overflow:visible !important; white-space:normal !important; flex-wrap:wrap; }
.discord-badge { width:22px; height:22px; padding:0; border:0; background:transparent; color:inherit; flex:0 0 auto; border-radius:6px; display:inline-grid; place-items:center; position:relative; transition:.18s ease; }
.discord-badge:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.discord-badge:hover { transform:translateY(-1px) scale(1.08); filter:drop-shadow(0 0 8px rgb(var(--accent-rgb) / .4)); }
.discord-badge::before { content:attr(data-tooltip); position:absolute; left:50%; bottom:calc(100% + 9px); transform:translateX(-50%) translateY(4px) scale(.98); z-index:80; padding:7px 10px; border-radius:7px; background:#111214; color:#f2f3f5; font:700 12px/1.2 "Inter", sans-serif; white-space:nowrap; box-shadow:0 8px 18px rgba(0,0,0,.34); opacity:0; visibility:hidden; pointer-events:none; transition:opacity .14s ease, transform .14s ease, visibility 0s linear .14s; }
.discord-badge::after { content:""; position:absolute; left:50%; bottom:calc(100% + 3px); transform:translateX(-50%) translateY(4px); z-index:79; border:6px solid transparent; border-top-color:#111214; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .14s ease, transform .14s ease, visibility 0s linear .14s; }
.discord-badge:hover::before, .discord-badge:hover::after, .discord-badge:focus-visible::before, .discord-badge:focus-visible::after { opacity:1; visibility:visible; transform:translateX(-50%) translateY(0) scale(1); transition-delay:0s; }
.discord-badge img { width:22px; height:22px; display:block; object-fit:contain; }
.discord-badge.nitro { filter:drop-shadow(0 0 8px rgba(255,115,207,.18)); }
.discord-badge.empty { width:auto; padding:4px 7px; color:var(--muted); font:700 11px var(--font-mono); background:rgba(255,255,255,.045); border:1px solid rgba(255,255,255,.1); }
.discord-badge[data-tooltip]::before,
.discord-badge[data-tooltip]::after { display: none; }
#badge-tooltip {
  position: fixed;
  z-index: 1000000;
  width: max-content;
  max-width: min(280px, calc(100vw - 16px));
  padding: 7px 10px;
  border-radius: 7px;
  background: #111214;
  color: #f2f3f5;
  font: 700 12px/1.4 "Inter", sans-serif;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0,0,0,.34);
  pointer-events: none;
}
.handle { color:#fff !important; font-weight:800; }
.tags { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.tags span { padding:7px 10px; border-radius:999px; background:rgb(var(--accent-rgb) / .12); border:1px solid rgb(var(--accent-rgb) / .24); color:#e7eaff; font-size:12px; }
.social-row { display:flex; justify-content:center; align-items:center; gap:10px; padding:0 20px 13px; }
.social-row a, .profile-footer a { border:1px solid rgba(255,255,255,.1); border-radius:10px; background:rgba(255,255,255,.055); color:white; padding:10px 8px; text-align:center; transition:.22s ease; font-size:14px; }
.social-row a { width:38px; height:38px; min-height:0; padding:0; border-radius:999px; display:grid; place-items:center; }
.social-row svg { width:18px; height:18px; fill:currentColor; filter:drop-shadow(0 0 8px rgba(255,255,255,.12)); transition:.22s ease; }
.social-row a:hover svg { transform:scale(1.12); }
.social-row a:hover { color:#0d0f16; background:#f5f5f5; border-color:rgba(255,255,255,.8); }
.social-row a:hover, .profile-footer a:hover { transform:translateY(-2px); border-color:rgb(var(--accent-rgb) / .45); background:rgb(var(--accent-rgb) / .14); }
.discord-blink {
  transform-box: fill-box;
  transform-origin: center;
  animation: discordEyeBlink 2.8s infinite;
}
@keyframes discordEyeBlink {
  0%, 88%, 100% { transform: scaleY(0); }
  92%, 96% { transform: scaleY(1); }
}
#discord-link .discord-icon { display: block; }
.profile-footer { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; align-items:center; padding:13px 20px 17px; border-top:1px solid rgba(255,255,255,.08); color:var(--muted); font-size:13px; }
.profile-footer a { width:max-content; padding:7px 10px; color:#dfe5ff; font-size:13px; display:inline-flex; align-items:center; gap:6px; }
.profile-footer a:nth-child(1) { justify-self:start; }
.profile-footer a:nth-child(2) { justify-self:center; }
.profile-footer a:nth-child(3) { justify-self:end; }
.steam-icon { width:16px !important; height:16px !important; object-fit:contain; flex:0 0 auto; display:block; }

.color-page { padding:18px 20px 20px; animation:colorPageWipeIn .72s cubic-bezier(.16,1,.3,1) both; transform-origin:right center; transform:perspective(1100px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transform-style:preserve-3d; position:relative; overflow:hidden; transition:transform .16s ease, box-shadow .24s ease; will-change:transform; }
.color-page.interactive-hover { box-shadow: var(--shadow), 0 0 42px rgb(var(--accent2-rgb) / .14), inset 0 1px 0 rgba(255,255,255,.1); }
.color-page::after { content:""; position:absolute; inset:0; z-index:3; pointer-events:none; border-radius:inherit; background:radial-gradient(360px circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(255,255,255,.16), rgb(var(--accent2-rgb) / .08) 28%, transparent 58%); opacity:0; mix-blend-mode:screen; transition:opacity .22s ease; }
.color-page.interactive-hover::after { opacity:1; }
.color-page.leaving { animation:colorPageWipeOut .54s cubic-bezier(.32,0,.2,1) both; }
.profile-console.page-mode .profile-banner, .profile-console.page-mode .profile-header, .profile-console.page-mode .presence-card, .profile-console.page-mode .activity-card, .profile-console.page-mode .meta-grid, .profile-console.page-mode .about-card, .profile-console.page-mode .social-row, .profile-console.page-mode .profile-footer { display:none; }
.color-page-head { display:flex; align-items:center; gap:14px; margin-bottom:14px; }
.color-page-head h2 { margin:0; font-size:24px; letter-spacing:-.03em; }
.mini-btn, .copy-btn { border:1px solid rgba(255,255,255,.12); color:#fff; background:rgba(255,255,255,.07); border-radius:12px; cursor:inherit; transition:.22s ease; }
.mini-btn { padding:9px 11px; flex:0 0 auto; }
.mini-btn:hover, .copy-btn:hover { transform:translateY(-1px); border-color:rgb(var(--accent2-rgb) / .4); background:rgb(var(--accent2-rgb) / .12); }
.field-block { display:grid; gap:8px; margin-bottom:12px; color:#dfe5ff; font-weight:700; font-size:12px; }
.field-block textarea, .field-block select, .color-picks label { width:100%; border:1px solid rgba(255,255,255,.11); border-radius:12px; background:rgba(7,10,22,.58); color:#eef4ff; outline:none; }
.field-block textarea, .field-block select { padding:12px; font:600 13px var(--font-mono); resize:vertical; }
.field-block select { appearance:none; -webkit-appearance:none; min-height:43px; padding-right:38px; background-image:linear-gradient(135deg, rgb(var(--accent-rgb) / .18), rgb(var(--accent2-rgb) / .07)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23bff7ff' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E"); background-repeat:no-repeat, no-repeat; background-position:center, right 12px center; background-size:100% 100%, 16px 16px; box-shadow:inset 0 1px 0 rgba(255,255,255,.05); }
.field-block select option { color:#eef4ff; background:#101427; font:600 13px var(--font-mono); }
.field-block textarea:focus, .field-block select:focus { border-color:rgb(var(--accent2-rgb) / .48); box-shadow:0 0 0 3px rgb(var(--accent2-rgb) / .08); }
.tool-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.tool-grid.compact { align-items:end; }
.color-picks { display:grid; grid-template-columns:repeat(3, 1fr); gap:9px; margin:3px 0 12px; }
.color-picks label { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 10px; color:var(--muted); font-size:12px; transition:.2s ease; }
.color-picks label.disabled { opacity:.34; filter:grayscale(1); pointer-events:none; }
.color-picks input { width:42px; height:30px; padding:0; border:0; border-radius:8px; background:transparent; }
.toggle-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.toggle-row label { min-height:38px; padding:8px 10px; border:1px solid rgba(255,255,255,.1); border-radius:999px; background:rgba(255,255,255,.045); color:#dfe5ff; font-size:12px; display:inline-flex; align-items:center; gap:7px; line-height:1; }
.toggle-row input { width:14px; height:14px; margin:0; accent-color:var(--cyan); flex:0 0 auto; }
.preview-card { margin:2px 0 12px; padding:13px; border-radius:14px; border:1px solid rgba(255,255,255,.1); background:linear-gradient(135deg, rgb(var(--accent-rgb) / .12), rgb(var(--accent2-rgb) / .06)); }
.preview-card > span { display:block; color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.12em; margin-bottom:8px; }
.tc-preview { min-height:38px; word-break:break-word; font-size:16px; line-height:1.45; }
.output-block textarea { min-height:116px; color:#bff7ff; }
.copy-btn { width:100%; padding:12px 14px; font-weight:800; background:linear-gradient(135deg, rgb(var(--accent-rgb) / .32), rgb(var(--accent2-rgb) / .2)); }
.hidden { display:none !important; }

@keyframes screenIn { from { opacity:0; transform:translateY(14px) scale(.98); } to { opacity:1; transform:none; } }


@keyframes drift { to { transform: translate(4%, 3%) scale(1.04); } }
@keyframes pageDriftOut { 0% { opacity:1; transform:translateY(-4px) translateX(0) scale(1); filter:blur(0); } 55% { opacity:.42; transform:translateY(-4px) translateX(-18px) scale(.975); filter:blur(1.8px); } 100% { opacity:1; transform:translateY(-4px) translateX(0) scale(1); filter:blur(0); } }
@keyframes pageDriftIn { 0% { opacity:.46; transform:translateY(-4px) translateX(18px) scale(.975); filter:blur(1.8px); } 100% { opacity:1; transform:translateY(-4px) translateX(0) scale(1); filter:blur(0); } }
@keyframes colorPageWipeIn { 0% { opacity:0; clip-path:inset(0 0 0 100% round 14px); transform:translateX(34px) scale(.985); filter:blur(4px); } 58% { opacity:1; clip-path:inset(0 0 0 0 round 14px); transform:translateX(0) scale(1); filter:blur(.4px); } 100% { opacity:1; clip-path:inset(0 0 0 0 round 14px); transform:none; filter:blur(0); } }
@keyframes colorPageWipeOut { 0% { opacity:1; clip-path:inset(0 0 0 0 round 14px); transform:none; filter:blur(0); } 100% { opacity:0; clip-path:inset(0 100% 0 0 round 14px); transform:translateX(-26px) scale(.985); filter:blur(3px); } }
@keyframes glowShift { to { opacity:.55; transform:translateX(3%); } }
@keyframes hoverRipple { to { opacity:0; transform:translate(-50%, -50%) scale(24); } }
@keyframes pageRipple { to { opacity:0; transform:translate(-50%, -50%) scale(34); } }
@keyframes blink { 50% { opacity:0; } }
@keyframes typingCaret { 50% { opacity:0; } }

/* ============================================================
   TEXT & CARD REVEAL ANIMATIONS
   ============================================================ */
.screen.active .presence-card { animation: cardReveal 0.7s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
.screen.active .activity-card { animation: cardReveal 0.7s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
.screen.active .meta-grid div { animation: cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.screen.active .meta-grid div:nth-child(1) { animation-delay: 0.4s; }
.screen.active .meta-grid div:nth-child(2) { animation-delay: 0.5s; }
.screen.active .about-card { animation: cardReveal 0.7s 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.screen.active .social-row a { animation: cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.screen.active .social-row a:nth-child(1) { animation-delay: 0.7s; }
.screen.active .social-row a:nth-child(2) { animation-delay: 0.75s; }
.screen.active .social-row a:nth-child(3) { animation-delay: 0.8s; }
.screen.active .social-row a:nth-child(4) { animation-delay: 0.85s; }
.screen.active .profile-footer { animation: cardReveal 0.7s 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Block Swipe Reveal for Headers */
.screen.active h2 {
  position: relative;
  display: inline-block;
  color: transparent;
  animation: revealColorH2 0s 0.8s forwards;
}
.screen.active .meta-grid div > span {
  position: relative;
  display: inline-block;
  color: transparent;
  animation: revealColorSpan 0s 0.8s forwards;
}
.screen.active h2::before, .screen.active .meta-grid div > span::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cyan);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 10;
  animation: blockSwipe 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
.screen.active .activity-card h2::before { animation-delay: 0.1s; }
.screen.active .activity-card h2 { animation-delay: 0.9s; }
.screen.active .meta-grid div > span::before { animation-delay: 0.25s; }
.screen.active .meta-grid div > span { animation-delay: 1.05s; }
.screen.active .about-card h2::before { animation-delay: 0.4s; }
.screen.active .about-card h2 { animation-delay: 1.2s; }

@keyframes blockSwipe {
  0% { transform: scaleX(0); transform-origin: left; }
  50% { transform: scaleX(1); transform-origin: left; }
  50.1% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}
@keyframes revealColorH2 {
  to { color: #fff; }
}
@keyframes revealColorSpan {
  to { color: var(--muted); }
}

#discord-link svg { transform:scale(1.08); transform-origin:center; }
#discord-link:hover svg { transform:scale(1.18); }

/* ============================================================
   MUSIC PLAYER
   ============================================================ */
.music-player { position:fixed; left:50%; bottom:18px; transform:translateX(-50%); width:min(510px, calc(100vw - 72px)); z-index:30; border-radius:14px; padding:10px 12px; display:flex; align-items:center; gap:9px; transition:.25s ease; }
.music-player.hidden { opacity:0; pointer-events:none; transform:translateX(-50%) translateY(20px); }

.prev-btn, .play-btn, .next-btn { width:auto; height:auto; min-width:22px; padding:0 2px; border:0; border-radius:0; color:#eaf8ff; background:transparent; cursor:pointer; flex:0 0 auto; display:grid; place-items:center; font-size:18px; line-height:1; text-shadow:0 0 16px rgb(var(--accent2-rgb) / .45); transition:color .3s ease-out, opacity .3s ease-out, transform .3s ease-out, text-shadow .3s ease-out; }
.prev-btn, .next-btn { min-width:24px; font-size:17px; color:#cbd7ee; }
.prev-btn:hover, .play-btn:hover, .next-btn:hover { color:#fff; opacity:1; transform:translateY(-1px) scale(1.08); text-shadow:0 0 22px rgb(var(--accent2-rgb) / .65); }
.player-art { width:42px; height:42px; border-radius:50%; background:repeating-radial-gradient(#111 0%, #111 4%, #222 5%, #222 6%); border:2px solid #000; position:relative; box-shadow:0 0 10px rgba(0,0,0,0.5), inset 0 2px 4px rgba(255,255,255,0.1); flex:0 0 auto; display:grid; place-items:center; animation:spinRecord 4s linear infinite; }
.player-art::before { content:""; position:absolute; width:14px; height:14px; background:linear-gradient(135deg, var(--cyan), var(--pink)); border-radius:50%; box-shadow:0 0 4px rgba(0,0,0,0.5); }
.player-art::after { content:""; position:absolute; width:4px; height:4px; background:#fff; border-radius:50%; }
.paused .player-art { animation-play-state:paused; }
@keyframes spinRecord { to { transform:rotate(360deg); } }
.track-meta { flex:1; min-width:0; }
.track-meta strong, .track-meta span { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.track-meta strong { font-weight:500; letter-spacing:-.01em; }
.track-time { display:flex; justify-content:space-between; gap:10px; margin-top:2px; color:var(--muted); font:500 11px var(--font-mono); }
.track-meta span { color:var(--muted); font-size:12px; }
.progress { height:5px; margin-top:6px; border-radius:99px; background:rgba(255,255,255,.12); overflow:hidden; }
.progress span { display:block; width:0%; height:100%; background:linear-gradient(90deg, var(--discord), var(--pink)); border-radius:inherit; }
.volume-control { position:absolute; right:-48px; top:50%; transform:translateY(-50%); display:flex; align-items:center; justify-content:flex-start; flex:0 0 auto; z-index:2; }
.volume-toggle { width:38px; height:38px; border-radius:50%; border:1px solid var(--line); background:var(--panel); color:#fff; display:grid; place-items:center; cursor:inherit; filter:grayscale(1); transition:.2s ease; box-shadow:0 14px 36px rgba(0,0,0,.32); backdrop-filter:blur(16px) saturate(140%); }
.volume-toggle:hover, .volume-control.open .volume-toggle { background:rgba(255,255,255,.16); border-color:rgba(255,255,255,.28); transform:translateY(-1px); }
.volume-control input { position:absolute; left:46px; width:0; opacity:0; pointer-events:none; accent-color:var(--cyan); cursor:inherit; transition:width .22s ease, opacity .18s ease; }
.volume-control.open input { width:96px; opacity:1; pointer-events:auto; }
.visualizer { display:flex; gap:4px; align-items:end; height:30px; }
.visualizer span { width:4px; height:11px; border-radius:4px; background:var(--cyan); animation:bars .8s ease-in-out infinite alternate; }
.visualizer span:nth-child(2){ animation-delay:.15s } .visualizer span:nth-child(3){ animation-delay:.3s } .visualizer span:nth-child(4){ animation-delay:.45s }
.paused .visualizer span { animation-play-state:paused; height:8px; }

@keyframes bars { to { height:27px; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 620px) {
  body.terminal-active { position:fixed; inset:0; width:100%; overflow:hidden; }
  body.terminal-active .terminal-screen { height:100dvh; min-height:100dvh; padding:18px 12px; }
  body.terminal-active .cmd-window { max-height:calc(100dvh - 36px); }
  body.color-page-active .screen { padding-bottom:18px; }
  body.color-page-active .profile-screen { padding-top:18px; }
  body.color-page-active .profile-console { margin-top:0; }
  body.color-page-active .color-page { padding:16px; }
  .screen { padding: 18px 12px 118px; align-items: start; }
  .terminal-screen { padding-bottom: 18px; align-items: center; }
  .profile-console { width: min(420px, 96vw); border-radius: 14px; margin-top: 8px; }
  .profile-banner { height: 116px; }
  .profile-header { gap: 12px; padding: 0 16px 14px; margin-top: -40px; }
  .avatar-wrap { width: 92px; height: 92px; }
  .presence-card, .activity-card, .about-card { margin-left: 16px; margin-right: 16px; padding: 13px; }
  .meta-grid { margin-left:16px; margin-right:16px; }
  .presence-card { flex-direction: column; align-items: flex-start; }
  .social-row { grid-template-columns: repeat(2, 1fr); padding-left: 16px; padding-right: 16px; }
  .profile-footer { padding-left: 16px; padding-right: 16px; }
  .music-player { bottom: 10px; width: calc(100vw - 68px); }
  .bot-page { padding:16px; }
  .bot-hero { flex-direction:column; align-items:flex-start; }
  .bot-actions { width:100%; flex-direction:column; align-items:stretch; gap:8px; }
  .bot-actions .invite-btn { width:100%; text-align:center; }
  .bot-actions .bot-note { text-align:center; }
  .bot-live-grid { grid-template-columns:repeat(2, 1fr); }
  .bot-live-grid article.wide { grid-column:span 2; }
  .bot-feature-grid { grid-template-columns:1fr; }
  .visualizer { display:none; }
}

@media (max-width: 420px) {
  .cmd-window { border-radius: 8px; }
  body.terminal-active { position:fixed; inset:0; width:100%; overflow:hidden; }
  body.terminal-active .terminal-screen { height:100dvh; min-height:100dvh; padding:18px 12px; }
  body.terminal-active .cmd-window { max-height:calc(100dvh - 36px); }
  body.color-page-active .screen { padding-bottom:18px; }
  body.color-page-active .profile-screen { padding-top:18px; }
  body.color-page-active .profile-console { margin-top:0; }
  body.color-page-active .color-page { padding:16px; }
  .screen { padding: 18px 12px 118px; align-items: start; }
  .terminal-screen { padding-bottom: 18px; align-items: center; }
  .profile-console { width: min(420px, 96vw); border-radius: 14px; margin-top: 8px; }
  .profile-banner { height: 116px; }
  .profile-header { gap: 12px; padding: 0 16px 14px; margin-top: -40px; }
  .avatar-wrap { width: 92px; height: 92px; }
  .presence-card, .activity-card, .about-card { margin-left: 16px; margin-right: 16px; padding: 13px; }
  .meta-grid { margin-left:16px; margin-right:16px; }
  .presence-card { flex-direction: column; align-items: flex-start; }
  .social-row { grid-template-columns: repeat(2, 1fr); padding-left: 16px; padding-right: 16px; }
  .profile-footer { padding-left: 16px; padding-right: 16px; }
  .cmd-controls { grid-template-columns: repeat(3, 36px); }
  .cmd-tab { padding: 0 12px; }
  .cmd-body { min-height: 360px; padding: 14px; font-size: 12px; }
  #typewriter-output { min-height: 190px; }
  .profile-console { width: 100%; }
  .profile-header { align-items: flex-end; }
  .identity-block { max-width: calc(100% - 104px); }
  h1 { font-size: 25px; }
  .username, .presence-card p, .activity-card p, .about-card p { font-size: 13px; }
}

@media (max-width: 340px) {
  .profile-header { flex-direction: column; align-items: flex-start; }
  .identity-block { max-width: 100%; }
}

/* ============================================================
   MINECRAFT SERVER PAGE
   ============================================================ */

/* Bot card */
.mc-bot-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.mc-bot-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / .08), rgb(var(--accent2-rgb) / .04));
  pointer-events: none;
}
.mc-bot-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
}
.mc-bot-avatar img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.12);
}
.mc-bot-status-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid rgba(15,18,32,.98);
}
.mc-bot-status-dot.online { background: var(--green); box-shadow: 0 0 10px rgba(62,232,125,.5); }
.mc-bot-status-dot.offline { background: #80848e; }
.mc-bot-info { min-width: 0; }
.mc-bot-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.mc-bot-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-bot-desc {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action row */
.mc-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.mc-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font: 700 13px var(--font-mono);
  background: linear-gradient(135deg, #5865f2, #4752c4);
  color: #fff;
  border: 1px solid rgb(var(--accent-rgb) / .5);
  text-decoration: none;
  transition: .22s ease;
  box-shadow: 0 4px 18px rgb(var(--accent-rgb) / .3);
  flex: 0 0 auto;
}
.mc-join-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgb(var(--accent-rgb) / .45);
  background: linear-gradient(135deg, #6a74f5, #5865f2);
  color: #fff;
  border-color: rgb(var(--accent-rgb) / .7);
}
.mc-updated {
  font: 600 11px var(--font-mono);
  color: var(--muted);
  letter-spacing: .02em;
}

/* Stats grid */
.mc-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.mc-stat-card {
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  min-width: 0;
  transition: border-color .2s ease;
}
.mc-stat-card:hover {
  border-color: rgb(var(--accent2-rgb) / .22);
}
.mc-stat-card.wide {
  grid-column: span 2;
}
.mc-stat-label {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.mc-stat-value {
  display: block;
  font: 700 14px var(--font-mono);
  color: #eef4ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-ip {
  color: var(--cyan) !important;
  letter-spacing: .04em;
}

/* Feature cards */
.mc-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mc-feature-card {
  padding: 13px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  transition: .22s ease;
}
.mc-feature-card:hover {
  border-color: rgb(var(--accent-rgb) / .3);
  background: rgb(var(--accent-rgb) / .06);
  transform: translateY(-2px);
}
.mc-feature-num {
  font: 800 11px var(--font-mono);
  color: var(--discord);
  letter-spacing: .08em;
  margin-bottom: 7px;
}
.mc-feature-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.mc-feature-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
}

/* Stats grid — wide mode dùng 4 cột */
body.wide-page-active .mc-stats-grid {
  grid-template-columns: repeat(4, 1fr);
}
body.wide-page-active .mc-stats-grid .mc-stat-card.wide {
  grid-column: span 2;
}
body.wide-page-active .mc-feature-grid {
  grid-template-columns: repeat(3, 1fr);
}
body.wide-page-active .mc-bot-card {
  padding: 18px 20px;
}
body.wide-page-active .mc-bot-name,
body.wide-page-active .steam-display-name {
  font-size: 22px;
}
body.wide-page-active .steam-avatar-wrap,
body.wide-page-active .steam-avatar-wrap img {
  width: 72px;
  height: 72px;
}
body.wide-page-active .mc-bot-avatar img {
  width: 68px;
  height: 68px;
}
body.wide-page-active .mc-bot-avatar {
  width: 68px;
  height: 68px;
}

@media (max-width: 420px) {
  .mc-stats-grid { grid-template-columns: 1fr 1fr; }
  .mc-feature-grid { grid-template-columns: 1fr; }
  .mc-feature-card { padding: 11px; }
  .mc-bot-name { font-size: 15px; }
}

/* ============================================================
   STEAM PROFILE PAGE
   ============================================================ */
.steam-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.steam-profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(23,126,212,.1), rgba(27,40,56,.06));
  pointer-events: none;
}
.steam-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
}
.steam-avatar-wrap img {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  border: 2px solid rgba(23,126,212,.5);
  box-shadow: 0 0 16px rgba(23,126,212,.25);
}
.steam-status-dot {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid rgba(15,18,32,.98);
  background: #80848e;
}
.steam-status-dot.online  { background: #57cbde; box-shadow: 0 0 10px rgba(87,203,222,.6); }
.steam-status-dot.ingame  { background: #90ba3c; box-shadow: 0 0 10px rgba(144,186,60,.6); }
.steam-status-dot.offline { background: #4a5568; }

.steam-profile-info { min-width: 0; }
.steam-platform-tag {
  font-size: 10px;
  font-weight: 700;
  color: #57cbde;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.steam-display-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.steam-real-name {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Steam visit button — màu Steam xanh dương */
.steam-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font: 700 13px var(--font-mono);
  background: linear-gradient(135deg, #1b82d6, #1565a8);
  color: #fff;
  border: 1px solid rgba(23,126,212,.5);
  text-decoration: none;
  transition: .22s ease;
  box-shadow: 0 4px 18px rgba(23,126,212,.3);
  flex: 0 0 auto;
}
.steam-visit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(23,126,212,.5);
  background: linear-gradient(135deg, #2196f3, #1b82d6);
  color: #fff;
  border-color: rgba(23,126,212,.8);
}

.steam-game-card:hover {
  border-color: rgba(23,126,212,.35) !important;
  background: rgba(23,126,212,.07) !important;
}
.steam-game-card .mc-feature-num { color: #57cbde; }

@media (max-width: 420px) {
  .steam-avatar-wrap { width: 50px; height: 50px; }
  .steam-avatar-wrap img { width: 50px; height: 50px; }
  .steam-display-name { font-size: 15px; }
}


    /* ============================================================
       ANIME CLOCK — INLINE SYNC-PILL STYLE
       ============================================================ */
    .clock-inline {
      flex: 0 0 auto;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 2px;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgb(var(--accent-rgb) / .13);
      border: 1px solid rgb(var(--accent-rgb) / .25);
      min-width: 118px;
      position: relative;
      overflow: hidden;
      transition: border-color .25s ease, background .25s ease;
    }
    .clock-inline:hover {
      border-color: rgb(var(--accent2-rgb) / .35);
      background: rgb(var(--accent2-rgb) / .08);
    }
    .clock-inline::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgb(var(--accent-rgb) / .08), transparent 60%);
      pointer-events: none;
    }
    .clock-inline-top {
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .clock-inline-dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: var(--cyan);
      box-shadow: 0 0 6px var(--cyan);
      flex-shrink: 0;
      animation: ciDotPulse 2s ease-in-out infinite;
    }
    @keyframes ciDotPulse {
      0%,100% { opacity:1; transform:scale(1); }
      50%      { opacity:.3; transform:scale(.7); }
    }
    .clock-inline-time {
      font: 700 13px var(--font-mono);
      color: #dfe5ff;
      letter-spacing: .03em;
      line-height: 1;
    }
    .ci-sep {
      color: var(--discord);
      animation: ciSepBlink 1s steps(1) infinite;
    }
    @keyframes ciSepBlink { 50% { opacity: .15; } }
    .clock-inline-date {
      font: 600 9px var(--font-mono);
      color: rgba(170,180,255,.42);
      letter-spacing: .06em;
      line-height: 1;
    }
    .clock-inline-phase {
      font: 700 9px var(--font-mono);
      color: rgb(var(--accent2-rgb) / .55);
      letter-spacing: .08em;
      line-height: 1;
    }

/* ============================================================
   THEME SWITCHER — UI
   ============================================================ */
.theme-switcher {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: inherit;
  transition: .28s ease;
  z-index: 2;
  box-shadow: 0 4px 18px rgba(0,0,0,.4);
}
.theme-toggle-btn:hover {
  transform: scale(1.12) rotate(15deg);
  border-color: rgba(255,255,255,.45);
  background: rgba(0,0,0,.75);
  box-shadow: 0 6px 22px rgba(0,0,0,.55);
}

.theme-menu {
  display: flex;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 8px 30px rgba(0,0,0,.55);
  animation: themeMenuIn .32s cubic-bezier(.16,1,.3,1);
}
.theme-menu.hidden {
  display: none !important;
}

@keyframes themeMenuIn {
  from { opacity: 0; transform: translateX(12px) scale(.88); }
  to   { opacity: 1; transform: none; }
}

.theme-option {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: rgba(255,255,255,.06);
  font-size: 14px;
  display: grid;
  place-items: center;
  cursor: inherit;
  transition: .22s ease;
}
.theme-option:hover {
  transform: scale(1.18);
  background: rgba(255,255,255,.14);
}
.theme-option.active {
  border-color: var(--cyan);
  background: rgb(var(--accent2-rgb) / .12);
  box-shadow: 0 0 12px rgb(var(--accent2-rgb) / .3);
}

/* ============================================================
   WEATHER PARTICLES CANVAS & MENU
   ============================================================ */
.weather-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  pointer-events: none;
  z-index: 6;
  transition: opacity 0.5s ease;
}

.weather-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: flex;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 8px 30px rgba(0,0,0,.55);
  animation: themeMenuIn .32s cubic-bezier(.16,1,.3,1);
}
.weather-menu.hidden {
  display: none !important;
}

.weather-option {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: rgba(255,255,255,.06);
  font-size: 14px;
  display: grid;
  place-items: center;
  cursor: inherit;
  transition: .22s ease;
}
.weather-option:hover {
  transform: scale(1.18);
  background: rgba(255,255,255,.14);
}
.weather-option.active {
  border-color: var(--cyan);
  background: rgb(var(--accent2-rgb) / .12);
  box-shadow: 0 0 12px rgb(var(--accent2-rgb) / .3);
}

/* Smooth transition on theme switch */
body,
.glass-panel,
.profile-console::before,
.presence-card, .activity-card, .about-card,
.meta-grid div,
.social-row a, .profile-footer a,
.tags span,
.clock-inline,
.music-player,
.ambient {
  transition: background .45s ease, background-color .45s ease,
              border-color .35s ease, color .35s ease,
              box-shadow .45s ease, transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.profile-typing-name {
  transition: background .45s ease;
}

/* ============================================================
   THEME: SAKURA PINK 🌸
   ============================================================ */
[data-theme="sakura"] {
  --bg: #12080e;
  --panel: rgba(36, 14, 30, 0.78);
  --panel-strong: rgba(48, 20, 40, 0.92);
  --line: rgba(255, 180, 220, 0.13);
  --discord: #e84393;
  --cyan: #fd79a8;
  --pink: #ff6b9d;
  --green: #55efc4;
  --yellow: #ffeaa7;
  --red: #ff7675;
  --text: #fff0f5;
  --muted: #c9a0b5;
  --shadow: 0 28px 90px rgba(40, 0, 20, 0.55);
}
[data-theme="sakura"] .profile-console::before {
  background: linear-gradient(180deg, #ff9a9e 0%, #fecfef 34%, rgba(255,255,255,.18) 50%, #e84393 68%, #fd79a8 100%);
}
[data-theme="sakura"] .profile-typing-name {
  background: linear-gradient(90deg, #fff, #ffd6f0 42%, #ffb8d0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="sakura"] .banner-glow {
  background: radial-gradient(circle at 24% 38%, rgba(232,67,147,.28), transparent 34%);
}
[data-theme="sakura"] .tags span {
  background: rgba(232,67,147,.12); border-color: rgba(232,67,147,.24);
}
[data-theme="sakura"] .clock-inline {
  background: rgba(232,67,147,.13); border-color: rgba(232,67,147,.25);
}
[data-theme="sakura"] .mc-join-btn {
  background: linear-gradient(135deg, #e84393, #d63384);
  border-color: rgba(232,67,147,.5);
  box-shadow: 0 4px 18px rgba(232,67,147,.3);
}
[data-theme="sakura"] .copy-btn {
  background: linear-gradient(135deg, rgba(232,67,147,.32), rgba(253,121,168,.2));
}
[data-theme="sakura"] .preview-card {
  background: linear-gradient(135deg, rgba(232,67,147,.12), rgba(253,121,168,.06));
}
[data-theme="sakura"] .theme-option.active {
  border-color: var(--cyan); box-shadow: 0 0 12px rgba(253,121,168,.35);
}

/* ============================================================
   THEME: OCEAN BLUE 🌊
   ============================================================ */
[data-theme="ocean"] {
  --bg: #020c16;
  --panel: rgba(8, 22, 42, 0.8);
  --panel-strong: rgba(10, 28, 52, 0.92);
  --line: rgba(100, 180, 255, 0.12);
  --discord: #0984e3;
  --cyan: #74b9ff;
  --pink: #a29bfe;
  --green: #00cec9;
  --yellow: #fdcb6e;
  --red: #d63031;
  --text: #dfe6e9;
  --muted: #8fa8c7;
  --shadow: 0 28px 90px rgba(0, 10, 30, 0.6);
}
[data-theme="ocean"] .profile-console::before {
  background: linear-gradient(180deg, #74b9ff 0%, #a29bfe 34%, rgba(255,255,255,.15) 50%, #0984e3 68%, #00cec9 100%);
}
[data-theme="ocean"] .profile-typing-name {
  background: linear-gradient(90deg, #fff, #b8d4ff 42%, #a0f0ed);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="ocean"] .banner-glow {
  background: radial-gradient(circle at 24% 38%, rgba(9,132,227,.28), transparent 34%);
}
[data-theme="ocean"] .tags span {
  background: rgba(9,132,227,.12); border-color: rgba(9,132,227,.24);
}
[data-theme="ocean"] .clock-inline {
  background: rgba(9,132,227,.13); border-color: rgba(9,132,227,.25);
}
[data-theme="ocean"] .mc-join-btn {
  background: linear-gradient(135deg, #0984e3, #0773c5);
  border-color: rgba(9,132,227,.5);
  box-shadow: 0 4px 18px rgba(9,132,227,.3);
}
[data-theme="ocean"] .copy-btn {
  background: linear-gradient(135deg, rgba(9,132,227,.32), rgba(116,185,255,.2));
}
[data-theme="ocean"] .preview-card {
  background: linear-gradient(135deg, rgba(9,132,227,.12), rgba(116,185,255,.06));
}
[data-theme="ocean"] .theme-option.active {
  border-color: var(--cyan); box-shadow: 0 0 12px rgba(116,185,255,.35);
}

/* ============================================================
   THEME: NEON FIRE 🔥
   ============================================================ */
[data-theme="fire"] {
  --bg: #0e0600;
  --panel: rgba(32, 16, 6, 0.8);
  --panel-strong: rgba(44, 22, 8, 0.92);
  --line: rgba(255, 140, 50, 0.12);
  --discord: #e17055;
  --cyan: #ff9f43;
  --pink: #ff6348;
  --green: #2ed573;
  --yellow: #ffa502;
  --red: #ff4757;
  --text: #fff5ee;
  --muted: #c7a88f;
  --shadow: 0 28px 90px rgba(30, 8, 0, 0.55);
}
[data-theme="fire"] .profile-console::before {
  background: linear-gradient(180deg, #ff9f43 0%, #e17055 34%, rgba(255,255,255,.15) 50%, #ff6348 68%, #ffa502 100%);
}
[data-theme="fire"] .profile-typing-name {
  background: linear-gradient(90deg, #fff, #ffd4a8 42%, #ffb088);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="fire"] .banner-glow {
  background: radial-gradient(circle at 24% 38%, rgba(255,99,72,.28), transparent 34%);
}
[data-theme="fire"] .tags span {
  background: rgba(225,112,85,.12); border-color: rgba(225,112,85,.24);
}
[data-theme="fire"] .clock-inline {
  background: rgba(225,112,85,.13); border-color: rgba(225,112,85,.25);
}
[data-theme="fire"] .mc-join-btn {
  background: linear-gradient(135deg, #e17055, #c0392b);
  border-color: rgba(225,112,85,.5);
  box-shadow: 0 4px 18px rgba(225,112,85,.3);
}
[data-theme="fire"] .copy-btn {
  background: linear-gradient(135deg, rgba(225,112,85,.32), rgba(255,159,67,.2));
}
[data-theme="fire"] .preview-card {
  background: linear-gradient(135deg, rgba(225,112,85,.12), rgba(255,159,67,.06));
}
[data-theme="fire"] .theme-option.active {
  border-color: var(--cyan); box-shadow: 0 0 12px rgba(255,159,67,.35);
}

/* ============================================================
   THEME SWITCHER — Responsive
   ============================================================ */
@media (max-width: 420px) {
  .theme-toggle-btn { width: 32px; height: 32px; font-size: 14px; }
  .theme-option { width: 26px; height: 26px; font-size: 12px; }
  .theme-menu { padding: 4px 6px; gap: 3px; }
}

/* ============================================================
   PARALLAX BANNER
   ============================================================ */
.plx-layer {
  position: absolute;
  inset: -16px;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
  transition: transform .12s ease-out;
}
.plx-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.05);
}

/* Light sweep overlay */
.plx-light {
  z-index: 2;
  background: linear-gradient(
    115deg,
    transparent 25%,
    rgba(255,255,255,.05) 40%,
    rgba(255,255,255,.08) 50%,
    rgba(255,255,255,.05) 60%,
    transparent 75%
  );
  background-size: 250% 100%;
  animation: plxLightSweep 5s ease-in-out infinite alternate;
}
@keyframes plxLightSweep {
  0%   { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}

/* Floating particles */
.plx-particles { z-index: 3; inset: 0; }
.plx-particles i {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(255,255,255,.65);
  box-shadow: 0 0 6px var(--cyan, #35e8ff);
  animation: plxFloat linear infinite;
  pointer-events: none;
}
.plx-particles i:nth-child(1)  { width:3px; height:3px; left:6%;  bottom:-4px; animation-duration:7s;  animation-delay:0s; }
.plx-particles i:nth-child(2)  { width:2px; height:2px; left:14%; bottom:-4px; animation-duration:9s;  animation-delay:.7s; }
.plx-particles i:nth-child(3)  { width:4px; height:4px; left:22%; bottom:-4px; animation-duration:6s;  animation-delay:1.4s; }
.plx-particles i:nth-child(4)  { width:2px; height:2px; left:33%; bottom:-4px; animation-duration:11s; animation-delay:.2s; }
.plx-particles i:nth-child(5)  { width:3px; height:3px; left:42%; bottom:-4px; animation-duration:8s;  animation-delay:2s; }
.plx-particles i:nth-child(6)  { width:2px; height:2px; left:52%; bottom:-4px; animation-duration:10s; animation-delay:.9s; }
.plx-particles i:nth-child(7)  { width:4px; height:4px; left:60%; bottom:-4px; animation-duration:7s;  animation-delay:2.6s; }
.plx-particles i:nth-child(8)  { width:2px; height:2px; left:68%; bottom:-4px; animation-duration:9s;  animation-delay:.4s; }
.plx-particles i:nth-child(9)  { width:3px; height:3px; left:76%; bottom:-4px; animation-duration:6.5s; animation-delay:1.7s; }
.plx-particles i:nth-child(10) { width:2px; height:2px; left:84%; bottom:-4px; animation-duration:8s;  animation-delay:3s; }
.plx-particles i:nth-child(11) { width:3px; height:3px; left:10%; bottom:-4px; animation-duration:10s; animation-delay:3.4s; }
.plx-particles i:nth-child(12) { width:2px; height:2px; left:28%; bottom:-4px; animation-duration:7.5s; animation-delay:4s; }
.plx-particles i:nth-child(13) { width:4px; height:4px; left:48%; bottom:-4px; animation-duration:9s;  animation-delay:1.1s; }
.plx-particles i:nth-child(14) { width:2px; height:2px; left:66%; bottom:-4px; animation-duration:11s; animation-delay:2.3s; }
.plx-particles i:nth-child(15) { width:3px; height:3px; left:90%; bottom:-4px; animation-duration:8s;  animation-delay:.6s; }

@keyframes plxFloat {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: .7; }
  50%  { opacity: .5; }
  85%  { opacity: .6; }
  100% { transform: translateY(-170px) translateX(10px); opacity: 0; }
}

/* Sparkle stars */
.plx-sparkles { z-index: 4; inset: 0; }
.plx-sparkles b {
  position: absolute;
  font-style: normal;
  font-weight: normal;
  color: rgba(255,255,255,.65);
  text-shadow: 0 0 8px var(--cyan, #35e8ff);
  animation: plxSparkle ease-in-out infinite;
  pointer-events: none;
}
.plx-sparkles b:nth-child(1) { left:8%;  top:22%; font-size:8px;  animation-duration:3s;   animation-delay:0s; }
.plx-sparkles b:nth-child(2) { left:28%; top:58%; font-size:12px; animation-duration:3.5s; animation-delay:.6s; }
.plx-sparkles b:nth-child(3) { left:52%; top:28%; font-size:9px;  animation-duration:2.8s; animation-delay:1.2s; }
.plx-sparkles b:nth-child(4) { left:73%; top:52%; font-size:11px; animation-duration:3.2s; animation-delay:1.8s; }
.plx-sparkles b:nth-child(5) { left:88%; top:18%; font-size:8px;  animation-duration:3.6s; animation-delay:2.4s; }

@keyframes plxSparkle {
  0%, 100% { opacity: .15; transform: scale(.7) rotate(0deg); }
  50%      { opacity: .85; transform: scale(1.3) rotate(180deg); }
}

/* Parallax — responsive giảm particles trên mobile */
@media (max-width: 420px) {
  .plx-particles i:nth-child(n+9) { display: none; }
  .plx-sparkles b:nth-child(n+4)  { display: none; }
}

/* ============================================================
   CLOCK WIDGET — Mobile Responsive
   ============================================================ */
@media (max-width: 620px) {
  .clock-inline {
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "time date"
      "time phase";
    align-items: center;
    border-radius: 14px;
    padding: 16px 20px;
    gap: 4px 12px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
  }
  .clock-inline-top {
    grid-area: time;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .clock-inline-time {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .02em;
    color: #fff;
  }
  .clock-inline-dot {
    width: 8px;
    height: 8px;
  }
  .ci-sep {
    font-size: 24px;
    opacity: 0.6;
    margin: 0 1px;
  }
  .clock-inline-date {
    grid-area: date;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    text-align: right;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
  }
  .clock-inline-phase {
    grid-area: phase;
    font-size: 13px;
    text-align: right;
    font-weight: 600;
    color: var(--cyan);
  }
}

/* ============================================================
   GLITCH TEXT EFFECT (Hover)
   ============================================================ */
.glitch-hover {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.glitch-hover::before,
.glitch-hover::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  background: var(--panel);
}
.glitch-hover:hover::before {
  opacity: 1;
  left: 2px;
  text-shadow: -2px 0 var(--pink);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  animation: glitch-anim 0.3s infinite linear alternate-reverse;
}
.glitch-hover:hover::after {
  opacity: 1;
  left: -2px;
  text-shadow: -2px 0 var(--cyan), 2px 2px var(--pink);
  clip-path: polygon(0 80%, 100% 20%, 100% 100%, 0 100%);
  animation: glitch-anim2 0.4s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%); transform: translate(-2px, 2px); }
  20% { clip-path: polygon(0 15%, 100% 15%, 100% 15%, 0 15%); transform: translate(2px, -2px); }
  40% { clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%); transform: translate(2px, 2px); }
  60% { clip-path: polygon(0 1%, 100% 1%, 100% 2%, 0 2%); transform: translate(-2px, -2px); }
  80% { clip-path: polygon(0 33%, 100% 33%, 100% 33%, 0 33%); transform: translate(2px, 2px); }
  100% { clip-path: polygon(0 44%, 100% 44%, 100% 44%, 0 44%); transform: translate(-2px, -2px); }
}
@keyframes glitch-anim2 {
  0% { clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%); transform: translate(-2px, 2px); }
  20% { clip-path: polygon(0 3%, 100% 3%, 100% 3%, 0 3%); transform: translate(2px, -2px); }
  40% { clip-path: polygon(0 5%, 100% 5%, 100% 20%, 0 20%); transform: translate(2px, 2px); }
  60% { clip-path: polygon(0 15%, 100% 15%, 100% 20%, 0 20%); transform: translate(-2px, -2px); }
  80% { clip-path: polygon(0 13%, 100% 13%, 100% 13%, 0 13%); transform: translate(2px, 2px); }
  100% { clip-path: polygon(0 44%, 100% 44%, 100% 44%, 0 44%); transform: translate(-2px, -2px); }
}

/* ============================================================
   AUDIO VISUALIZER — Real Web Audio API
   ============================================================ */
.audio-visualizer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  mix-blend-mode: screen;
}
.audio-visualizer.active {
  opacity: 1;
}
.player-visualizer {
  height: 40px !important;
  border-radius: 0 0 14px 14px;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}
/* on mobile make it shorter */
@media (max-width: 620px) {
  .audio-visualizer { height: 80px; }
  .player-visualizer { height: 35px !important; }
}

/* From Uiverse.io by Novaxlo */
.capybaraloader {
  width: 14em;
  height: 10em;
  position: relative;
  z-index: 1;
  --color: rgb(204, 125, 45);
  --color2: rgb(83, 56, 28);
  transform: scale(0.75);
}
.capybara {
  width: 100%;
  height: 7.5em;
  position: relative;
  top: -0.35em;
  z-index: 1;
}
.capy-track {
  width: 100%;
  height: 2.5em;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.capy {
  width: 85%;
  height: 100%;
  background: linear-gradient(var(--color), 90%, var(--color2));
  border-radius: 45%;
  position: relative;
  z-index: 1;
  animation: capy-movebody 1s linear infinite;
}
.capyhead {
  width: 7.5em;
  height: 7em;
  bottom: 0em;
  right: 0em;
  position: absolute;
  background-color: var(--color);
  z-index: 3;
  border-radius: 3.5em;
  box-shadow: -1em 0em var(--color2);
  animation: capy-movebody 1s linear infinite;
}
.capyear {
  width: 2em;
  height: 2em;
  background: linear-gradient(-45deg, var(--color), 90%, var(--color2));
  top: 0em;
  left: 0em;
  border-radius: 100%;
  position: absolute;
  overflow: hidden;
  z-index: 3;
}
.capyear:nth-child(2) {
  left: 5em;
  background: linear-gradient(25deg, var(--color), 90%, var(--color2));
}
.capyear2 {
  width: 100%;
  height: 1em;
  background-color: var(--color2);
  bottom: 0em;
  left: 0.5em;
  border-radius: 100%;
  position: absolute;
  transform: rotate(-45deg);
}
.capymouth {
  width: 3.5em;
  height: 2em;
  background-color: var(--color2);
  position: absolute;
  bottom: 0em;
  left: 2.5em;
  border-radius: 50%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5em;
}
.capylips {
  width: 0.25em;
  height: 0.75em;
  border-radius: 100%;
  transform: rotate(-45deg);
  background-color: var(--color);
}
.capylips:nth-child(2) {
  transform: rotate(45deg);
}
.capyeye {
  width: 2em;
  height: 0.5em;
  background-color: var(--color2);
  position: absolute;
  bottom: 3.5em;
  left: 1.5em;
  border-radius: 5em;
  transform: rotate(45deg);
}
.capyeye:nth-child(4) {
  transform: rotate(-45deg);
  left: 5.5em;
  width: 1.75em;
}
.capyleg {
  width: 6em;
  height: 5em;
  bottom: 0em;
  left: 0em;
  position: absolute;
  background: linear-gradient(var(--color), 95%, var(--color2));
  z-index: 2;
  border-radius: 2em;
  animation: capy-movebody 1s linear infinite;
}
.capyleg2 {
  width: 1.75em;
  height: 3em;
  bottom: 0em;
  left: 3.25em;
  position: absolute;
  background: linear-gradient(var(--color), 80%, var(--color2));
  z-index: 2;
  border-radius: 0.75em;
  box-shadow: inset 0em -0.5em var(--color2);
  animation: capy-moveleg 1s linear infinite;
}
.capyleg2:nth-child(3) {
  width: 1.25em;
  left: 0.5em;
  height: 2em;
  animation: capy-moveleg2 1s linear infinite 0.075s;
}

@keyframes capy-moveleg {
  0% {
    transform: rotate(-45deg) translateX(-5%);
  }
  50% {
    transform: rotate(45deg) translateX(5%);
  }
  100% {
    transform: rotate(-45deg) translateX(-5%);
  }
}

@keyframes capy-moveleg2 {
  0% {
    transform: rotate(45deg);
  }
  50% {
    transform: rotate(-45deg);
  }
  100% {
    transform: rotate(45deg);
  }
}

@keyframes capy-movebody {
  0% {
    transform: translateX(0%);
  }
  50% {
    transform: translateX(2%);
  }
  100% {
    transform: translateX(0%);
  }
}

.capy-track-line {
  width: 50em;
  height: 0.5em;
  border-top: 0.5em dashed var(--color2);
  animation: capy-moveline 10s linear infinite;
}

@keyframes capy-moveline {
  0% {
    transform: translateX(0%);
    opacity: 0%;
  }
  5% {
    opacity: 100%;
  }
  95% {
    opacity: 100%;
  }
  100% {
    opacity: 0%;
    transform: translateX(-70%);
  }
}

/* ============================================================
   CURSOR TRAIL PARTICLES
   ============================================================ */
.cursor-trail-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: particleFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Default (Cyan Neon) */
.cursor-trail-particle.theme-default {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

/* Sakura (Pink Petals) */
.cursor-trail-particle.theme-sakura {
  background: #fd79a8;
  border-radius: 0 50% 0 50%;
  box-shadow: 0 0 5px #fd79a8;
  animation: particleFadeFall 0.8s ease-out forwards;
}

/* Ocean (Blue Bubbles) */
.cursor-trail-particle.theme-ocean {
  background: transparent;
  border: 1px solid #74b9ff;
  box-shadow: inset 0 0 4px #74b9ff, 0 0 4px #74b9ff;
  animation: particleFadeRise 0.7s ease-out forwards;
}

/* Fire (Orange Embers) */
.cursor-trail-particle.theme-fire {
  background: #ff9f43;
  border-radius: 2px;
  box-shadow: 0 0 6px #ff9f43;
  animation: particleFadeRise 0.6s ease-out forwards;
}

@keyframes particleFade {
  0% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
}
@keyframes particleFadeFall {
  0% { opacity: 0.8; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-30px, 30px) scale(0.2) rotate(90deg); }
}
@keyframes particleFadeRise {
  0% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -80px) scale(0); }
}

/* ============================================================
   GLOBAL AUDIO REACTIVITY & GLITCH HEADERS
   ============================================================ */
/* Audio Reactivity on Cards */
.presence-card, .activity-card, .about-card {
  box-shadow: 0 0 calc(var(--audio-bass, 0) * 20px) var(--cyan);
  /* Override box-shadow transition to be fast for audio sync */
  transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94), background .45s ease, border-color .35s ease, box-shadow 0.05s ease-out !important;
}
[data-theme="sakura"] .presence-card, [data-theme="sakura"] .activity-card, [data-theme="sakura"] .about-card {
  box-shadow: 0 0 calc(var(--audio-bass, 0) * 20px) #fd79a8;
}
[data-theme="ocean"] .presence-card, [data-theme="ocean"] .activity-card, [data-theme="ocean"] .about-card {
  box-shadow: 0 0 calc(var(--audio-bass, 0) * 20px) #74b9ff;
}
[data-theme="fire"] .presence-card, [data-theme="fire"] .activity-card, [data-theme="fire"] .about-card {
  box-shadow: 0 0 calc(var(--audio-bass, 0) * 20px) #ff9f43;
}

/* Audio Reactivity on Avatar */
.avatar-wrapper {
  transform: scale(calc(1 + var(--audio-bass, 0) * 0.08));
  transition: transform 0.05s ease-out;
}

/* ============================================================
   SHATTERED GLASS EASTER EGG
   ============================================================ */
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-10px, -10px) rotate(-1deg); }
  20% { transform: translate(10px, 10px) rotate(1deg); }
  30% { transform: translate(-10px, 10px) rotate(-1deg); }
  40% { transform: translate(10px, -10px) rotate(1deg); }
  50% { transform: translate(-5px, -5px) rotate(-0.5deg); }
  60% { transform: translate(5px, 5px) rotate(0.5deg); }
  70% { transform: translate(-5px, 5px) rotate(-0.5deg); }
  80% { transform: translate(5px, -5px) rotate(0.5deg); }
}
body.shaking {
  animation: screenShake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}
/* ============================================================
   WARP SPEED UI
   ============================================================ */
.warp-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  margin-left: 10px;
}
.warp-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  transform: scale(1.1);
}

.warp-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
  background: #000;
}
.warp-canvas.active {
  opacity: 1;
  pointer-events: auto;
}

body.warping .screen {
  transition: transform 2s cubic-bezier(0.5, 0, 0.1, 1), opacity 2s;
  transform-origin: center center;
  transform: perspective(800px) rotateX(-20deg) scale(0.1) translateY(-200%);
  opacity: 0;
}

.easter-egg {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s ease 1.5s;
}
.easter-egg.show {
  opacity: 1;
  pointer-events: auto;
}
.matrix-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 3rem;
  color: #0f0;
  text-shadow: 0 0 10px #0f0, 0 0 20px #0f0;
  margin-bottom: 30px;
  letter-spacing: 5px;
}
#return-warp-btn {
  border-color: #0f0;
  color: #0f0;
  box-shadow: inset 0 0 5px rgba(0,255,0,0.2);
}
#return-warp-btn:hover { background: rgba(0,255,0,0.1); box-shadow: 0 0 15px #0f0; }

/* ════════════════════════════════════════════════════════════
   ██  REFINEMENT LAYER
   Lớp tinh chỉnh — nạp sau cùng nên ghi đè được mọi thứ ở trên.
   Mọi thứ trong file này đều có thể xoá mà trang vẫn chạy.
   ════════════════════════════════════════════════════════════ */

/* ────────────────────────────────────────────────────────────
   1. DESIGN TOKENS — nền tảng của mọi thứ còn lại
   ──────────────────────────────────────────────────────────── */
:root {
  /* Kiểu chữ: Outfit làm giọng chính, JetBrains Mono cho dữ liệu */
  --font-sans: 'Outfit', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, monospace;

  /* Thang giãn cách bậc 4 — thay cho 9/11/13/14px lộn xộn */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px;

  /* Thang bo góc */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px; --r-full: 999px;

  /* Một đường cong chuyển động duy nhất cho toàn trang */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --dur-fast: .18s;
  --dur: .32s;
  --dur-slow: .6s;

  /* Màu nhấn dạng kênh RGB → dùng được với cú pháp rgb(... / alpha) */
  --accent-rgb: 88 101 242;
  --accent2-rgb: 53 232 255;
  --accent3-rgb: 255 79 216;
}

[data-theme="sakura"] { --accent-rgb: 232 67 147;  --accent2-rgb: 253 121 168; --accent3-rgb: 255 154 205; }
[data-theme="ocean"]  { --accent-rgb: 9 132 227;   --accent2-rgb: 116 185 255; --accent3-rgb: 162 155 254; }
[data-theme="fire"]   { --accent-rgb: 225 112 85;  --accent2-rgb: 255 159 67;  --accent3-rgb: 255 99 72; }

/* Đổi theme mượt thay vì nháy */
html { transition: background-color var(--dur-slow) var(--ease); }

/* ────────────────────────────────────────────────────────────
   2. KIỂU CHỮ — thang cỡ rõ ràng, số liệu dùng chữ số đều
   ──────────────────────────────────────────────────────────── */
body { font-family: var(--font-sans); letter-spacing: -.005em; }

h1, h2, .sk-title-text, .color-page-head h2, .mc-bot-name, .steam-display-name {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -.03em;
}
.eyebrow, .mc-stat-label, .steam-platform-tag, .mc-bot-tag, .preview-card > span {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: .14em;
  font-size: 10px;
  text-transform: uppercase;
}

/* Số liệu: chữ số đều bề rộng để không nhảy khi count-up */
.mc-stat-value, .clock-inline-time, .track-time, .activity-time,
#steam-hours, #steam-games, #steam-level, #steam-friends, #mc-ping, #mc-online, #mc-max {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.username { font-family: var(--font-mono); font-size: 13px; letter-spacing: -.01em; }
.about-card p, .presence-card p, .activity-card p { line-height: 1.6; }

/* ────────────────────────────────────────────────────────────
   3. HẠT PHIM (FILM GRAIN) — thay cảm giác scanline cũ kỹ
   ──────────────────────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: -150%;
  z-index: 19;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 6s steps(6) infinite;
  will-change: transform;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  16%  { transform: translate(-3%, -2%); }
  33%  { transform: translate(2%, -4%); }
  50%  { transform: translate(-2%, 3%); }
  66%  { transform: translate(3%, 1%); }
  83%  { transform: translate(-1%, -3%); }
  100% { transform: translate(0, 0); }
}

/* ────────────────────────────────────────────────────────────
   4. PHÂN CẤP — chỉ panel chính được "nổi", card con phải im
   ──────────────────────────────────────────────────────────── */

/* Card con: viền tĩnh, không nghiêng 3D, không loé sáng theo chuột */
.presence-card, .activity-card, .about-card {
  transform: none !important;
  border: 1px solid rgb(255 255 255 / .07);
  background: rgb(255 255 255 / .035);
  border-radius: var(--r-md);
  padding: var(--s4);
  margin: 0 var(--s5) var(--s3);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.presence-card::before, .activity-card::before, .about-card::before { display: none; }
.presence-card > div, .activity-card > div, .about-card > div { transform: none; }

/* Hover nhẹ nhàng thay vì loé */
.presence-card:hover, .activity-card:hover, .about-card:hover {
  background: rgb(255 255 255 / .055);
  border-color: rgb(var(--accent-rgb) / .28);
}

.meta-grid { gap: var(--s2); margin: 0 var(--s5) var(--s3); }
.meta-grid div { padding: var(--s3); border-radius: var(--r-sm); }
.social-row { gap: var(--s2); padding: 0 var(--s5) var(--s3); }
.profile-footer { padding: var(--s3) var(--s5) var(--s5); }
.color-page { padding: var(--s5) var(--s5) var(--s6); }

/* Viền gradient chạy: giữ lại DUY NHẤT ở panel chính */
.profile-console::before { padding: 2px; opacity: .85; }

/* ────────────────────────────────────────────────────────────
   5. SKELETON SHIMMER — thay "Đang tải..." / "--"
   ──────────────────────────────────────────────────────────── */
.skeleton {
  color: transparent !important;
  position: relative;
  border-radius: var(--r-xs);
  background: linear-gradient(90deg,
    rgb(255 255 255 / .045) 25%,
    rgb(var(--accent2-rgb) / .16) 50%,
    rgb(255 255 255 / .045) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  min-width: 4ch;
  display: inline-block;
}
.skeleton > * { visibility: hidden; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Giá trị vừa tải xong thì nhấp nháy một cái rồi thôi */
.value-in { animation: valueIn .5s var(--ease) both; }
@keyframes valueIn {
  from { opacity: 0; transform: translateY(6px); filter: blur(3px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* ────────────────────────────────────────────────────────────
   6. VÒNG AVATAR — màu theo trạng thái, đập theo nhạc
   ──────────────────────────────────────────────────────────── */
.avatar-wrap { --ring: 130 136 148; }
.avatar-wrap.is-online  { --ring: 35 165 90; }
.avatar-wrap.is-idle    { --ring: 240 178 50; }
.avatar-wrap.is-dnd     { --ring: 242 63 67; }
.avatar-wrap.is-offline { --ring: 128 132 142; }

.avatar-ring {
  position: absolute;
  inset: -7px;
  z-index: 1;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 0deg,
    rgb(var(--ring) / .95),
    rgb(var(--accent2-rgb) / .5) 25%,
    rgb(var(--ring) / .12) 50%,
    rgb(var(--accent3-rgb) / .5) 75%,
    rgb(var(--ring) / .95));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: ringSpin 9s linear infinite;
  transform: none;
  opacity: .72;
}
@keyframes ringSpin { to { rotate: 360deg; } }

/* ────────────────────────────────────────────────────────────
   7. ẢNH BÌA ALBUM + MÀU CHỦ ĐẠO CHO THẺ HOẠT ĐỘNG
   ──────────────────────────────────────────────────────────── */
.activity-card { --art-rgb: var(--accent-rgb); }
.activity-card.has-art {
  border-color: rgb(var(--art-rgb) / .34);
  background:
    linear-gradient(100deg, rgb(var(--art-rgb) / .16), transparent 62%),
    rgb(255 255 255 / .035);
}
.activity-card.has-art:hover { border-color: rgb(var(--art-rgb) / .5); }

.activity-art {
  width: 52px; height: 52px;
  flex: 0 0 auto;
  border-radius: var(--r-sm);
  object-fit: cover;
  border: 1px solid rgb(255 255 255 / .14);
  box-shadow: 0 6px 20px rgb(var(--art-rgb) / .35);
  animation: valueIn .45s var(--ease) both;
}
.activity-art.hidden { display: none; }
.activity-card.has-art .activity-icon { display: none; }

/* Thanh sóng nhỏ báo "đang phát" */
.now-playing-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; margin-right: 6px; vertical-align: -1px; }
.now-playing-bars i { width: 2px; height: 4px; border-radius: 2px; background: rgb(var(--art-rgb) / .95); animation: npBar .9s ease-in-out infinite alternate; }
.now-playing-bars i:nth-child(2) { animation-delay: .15s; }
.now-playing-bars i:nth-child(3) { animation-delay: .3s; }
@keyframes npBar { to { height: 10px; } }

/* ────────────────────────────────────────────────────────────
   8. TRÌNH PHÁT NHẠC — thanh tiến trình có thể tua, visualizer thật
   ──────────────────────────────────────────────────────────── */
.progress {
  height: 6px;
  border-radius: var(--r-full);
  background: rgb(255 255 255 / .1);
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition: height var(--dur-fast) var(--ease);
}
.progress:hover { height: 9px; }
.progress span {
  background: linear-gradient(90deg, rgb(var(--accent-rgb)), rgb(var(--accent3-rgb)));
  box-shadow: 0 0 12px rgb(var(--accent3-rgb) / .5);
  border-radius: var(--r-full);
  position: relative;
}
.progress span::after {
  content: "";
  position: absolute;
  right: -5px; top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%) scale(0);
  box-shadow: 0 0 10px rgb(var(--accent3-rgb) / .8);
  transition: transform var(--dur-fast) var(--ease);
}
.progress:hover span::after { transform: translateY(-50%) scale(1); }

/* Canvas visualizer nằm dưới đáy player */
.music-player .audio-visualizer { border-radius: 0 0 var(--r-md) var(--r-md); }

/* ────────────────────────────────────────────────────────────
   9. THẺ TAG & HUY HIỆU — viền gradient + đổ bóng trong
   ──────────────────────────────────────────────────────────── */
.tags span {
  position: relative;
  padding: 6px var(--s3);
  border: 0;
  border-radius: var(--r-full);
  background:
    linear-gradient(rgb(var(--accent-rgb) / .16), rgb(var(--accent-rgb) / .06)) padding-box,
    linear-gradient(140deg, rgb(var(--accent2-rgb) / .55), rgb(var(--accent3-rgb) / .35)) border-box;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .14);
  font-size: 12px;
  font-weight: 500;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.tags span:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 6px 18px rgb(var(--accent-rgb) / .3);
}

.mini-btn, .copy-btn, .mc-join-btn, .steam-visit-btn { border-radius: var(--r-md); }

/* ────────────────────────────────────────────────────────────
   10. TIÊU ĐIỂM BÀN PHÍM — bắt buộc phải nhìn thấy được
   ──────────────────────────────────────────────────────────── */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid rgb(var(--accent2-rgb) / .9);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
:where(a, button, input, select, textarea):focus:not(:focus-visible) { outline: none; }

/* ────────────────────────────────────────────────────────────
   11. REVEAL THEO CUỘN — dùng scroll-driven animation nếu có
   ──────────────────────────────────────────────────────────── */
.reveal-on-view { animation: cardReveal .7s var(--ease) both; }
.mc-stat-card, .mc-feature-card, .steam-game-card { opacity: 1; }

@supports (animation-timeline: view()) {
  .color-page:not(.hidden) .mc-stat-card,
  .color-page:not(.hidden) .mc-feature-card {
    animation: cardReveal linear both;
    animation-timeline: view();
    animation-range: entry 4% cover 26%;
  }
}
/* Xuất hiện so le khi mở trang con (không phụ thuộc cuộn) */
.color-page:not(.hidden) .mc-stat-card { animation: cardReveal .6s var(--ease) both; }
.color-page:not(.hidden) .mc-stat-card:nth-child(1) { animation-delay: .06s; }
.color-page:not(.hidden) .mc-stat-card:nth-child(2) { animation-delay: .12s; }
.color-page:not(.hidden) .mc-stat-card:nth-child(3) { animation-delay: .18s; }
.color-page:not(.hidden) .mc-stat-card:nth-child(4) { animation-delay: .24s; }
.color-page:not(.hidden) .mc-stat-card:nth-child(5) { animation-delay: .3s; }
.color-page:not(.hidden) .mc-stat-card:nth-child(6) { animation-delay: .36s; }
.color-page:not(.hidden) .mc-feature-card { animation: cardReveal .6s var(--ease) both; }
.color-page:not(.hidden) .mc-feature-card:nth-child(1) { animation-delay: .4s; }
.color-page:not(.hidden) .mc-feature-card:nth-child(2) { animation-delay: .46s; }
.color-page:not(.hidden) .mc-feature-card:nth-child(3) { animation-delay: .52s; }

/* ────────────────────────────────────────────────────────────
   12. VIEW TRANSITIONS — chuyển trang con mượt như app
   ──────────────────────────────────────────────────────────── */
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: .42s;
  animation-timing-function: var(--ease);
}
/* Khi View Transition đang chạy thì tắt animation wipe thủ công để khỏi chồng nhau */
body.vt-active .color-page { animation: none !important; }
body.vt-active .profile-console { animation: none !important; }

/* ────────────────────────────────────────────────────────────
   13. NÚT THEME TỰ ĐỘNG
   ──────────────────────────────────────────────────────────── */
.theme-sep {
  width: 1px; height: 18px; margin: 0 2px;
  background: rgb(255 255 255 / .18);
  border-radius: 1px;
  flex: 0 0 auto;
}
.theme-option-auto {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / .16);
  background: rgb(255 255 255 / .06);
  color: #fff;
  font-size: 14px;
  cursor: inherit;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.theme-option-auto:hover { transform: scale(1.12); background: rgb(var(--accent2-rgb) / .2); }
.theme-option-auto.active {
  background: rgb(var(--accent2-rgb) / .3);
  border-color: rgb(var(--accent2-rgb) / .7);
  box-shadow: 0 0 14px rgb(var(--accent2-rgb) / .45);
}
@media (max-width: 420px) { .theme-option-auto { width: 26px; height: 26px; font-size: 12px; } }

/* ────────────────────────────────────────────────────────────
   14. HIỆU NĂNG — giảm tải trên máy yếu / điện thoại
   ──────────────────────────────────────────────────────────── */
@media (max-width: 620px) {
  /* Chồng nhiều lớp backdrop-filter là thứ giết FPS nhanh nhất */
  .presence-card, .activity-card, .about-card,
  .meta-grid div, .mc-stat-card, .mc-feature-card, .volume-toggle {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .grain { opacity: .035; }
  .ambient { filter: blur(60px); }
}



/* ════════════════════════════════════════════════════════════
   ██  REFINEMENT LAYER v2 — theo phản hồi thực tế trên điện thoại
   1. Mượt hơn + bỏ sóng nhạc
   2. Khung nhỏ lại trên điện thoại, nút đổi theme bấm được
   3. Chuyển trang kiểu iOS
   4. Chữ to hơn
   ════════════════════════════════════════════════════════════ */

/* ────────────────────────────────────────────────────────────
   1a. BỎ SÓNG NHẠC
   ──────────────────────────────────────────────────────────── */
.audio-visualizer.viz-silent { display: none !important; }
.visualizer { display: none !important; }   /* 4 vạch nhảy cạnh trình phát */

/* Viền gradient chạy quanh panel: giữ, nhưng mỏng lại cho nhẹ mắt */
.profile-console::before { padding: 2px; }

/* ────────────────────────────────────────────────────────────
   2. KHUNG NHỎ LẠI + NÚT ĐỔI THEME BẤM ĐƯỢC TRÊN ĐIỆN THOẠI
   ──────────────────────────────────────────────────────────── */
@media (max-width: 620px) {
  /* Chừa lề hai bên thay vì dán sát mép màn hình */
  .screen { padding: 14px 14px 112px; }
  .profile-console { width: min(420px, calc(100vw - 28px)); border-radius: 18px; }
  .profile-banner { height: 104px; }
  .profile-header { margin-top: -36px; padding: 0 14px 12px; }
  .avatar-wrap { width: 84px; height: 84px; }

  .presence-card, .activity-card, .about-card { margin-left: 14px; margin-right: 14px; padding: 13px; }
  .meta-grid { margin-left: 14px; margin-right: 14px; }
  .social-row { padding-left: 14px; padding-right: 14px; }
  .profile-footer { padding-left: 14px; padding-right: 14px; }
  .music-player { width: min(420px, calc(100vw - 28px)); left: 50%; }
  .volume-control { right: 8px; }

  /* Nút điều khiển xếp DỌC sát mép phải, luôn nằm trên cùng và đủ to để bấm */
  .theme-switcher {
    top: 8px;
    right: 8px;
    z-index: 60;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  .theme-toggle-btn, .warp-btn {
    width: 38px; height: 38px;
    font-size: 17px;
    background: rgb(0 0 0 / .72);
    border: 1px solid rgb(255 255 255 / .38);
    box-shadow: 0 3px 14px rgb(0 0 0 / .6);
  }
  .theme-toggle-btn:active, .warp-btn:active { transform: scale(.92); }

  .theme-menu, .weather-menu {
    flex-direction: column;
    padding: 7px 6px;
    border-radius: 22px;
    background: rgb(0 0 0 / .8);
    border-color: rgb(255 255 255 / .28);
  }
  .theme-option, .theme-option-auto, .weather-option { width: 34px; height: 34px; font-size: 16px; }
  .theme-sep { width: 18px; height: 1px; margin: 2px 0; }
  @keyframes themeMenuIn {
    from { opacity: 0; transform: translateY(-8px) scale(.9); }
    to   { opacity: 1; transform: none; }
  }
}

@media (max-width: 420px) {
  /* Ghi đè `width: 100%` của bản gốc — đây là lý do khung dán sát mép */
  .profile-console { width: calc(100vw - 24px); }
  .music-player { width: calc(100vw - 24px); }
  .screen { padding: 12px 12px 108px; }
}

/* Trang con (Steam / Minecraft): đừng đổi chiều rộng trên điện thoại.
   Animate `width` là animate layout → khựng chắc chắn. */
@media (max-width: 900px) {
  body.wide-page-active .profile-console {
    width: min(420px, calc(100vw - 28px)) !important;
    transition: none !important;
  }
}

/* ────────────────────────────────────────────────────────────
   3. CHUYỂN TRANG KIỂU iOS
   Nguyên tắc: CHỈ dùng transform + opacity. Bản cũ animate
   clip-path + filter: blur() — cả hai đều bắt trình duyệt vẽ lại
   từng khung, đó chính là chỗ bị khựng.
   ──────────────────────────────────────────────────────────── */
:root { --ios-ease: cubic-bezier(.32, .72, 0, 1); --ios-dur: .42s; }

.color-page {
  transform: none;
  transform-origin: center;
  animation: iosPushIn var(--ios-dur) var(--ios-ease) both;
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.color-page.leaving {
  animation: iosPushOut .28s var(--ios-ease) both;
}
@keyframes iosPushIn {
  from { opacity: 0; transform: translate3d(26%, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes iosPushOut {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to   { opacity: 0; transform: translate3d(22%, 0, 0); }
}

/* Panel nền lùi lại một chút như UINavigationController */
.profile-console.slide-to-color { animation: iosHostBack .42s var(--ios-ease) both; }
.profile-console.slide-to-home  { animation: iosHostFwd  .42s var(--ios-ease) both; }
@keyframes iosHostBack {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  55%  { transform: translate3d(-2%, 0, 0) scale(.986); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes iosHostFwd {
  from { transform: translate3d(-3%, 0, 0) scale(.984); }
  to   { transform: translate3d(0, 0, 0) scale(1); }
}

/* Nút back: phản hồi ngay khi chạm, không chờ animation */
.mini-btn { min-height: 40px; padding: 10px 14px; }
.mini-btn:active { transform: scale(.94); }

/* Bỏ các keyframe cũ có blur/clip-path để không còn ai gọi tới */
@keyframes pageDriftOut { 0%, 100% { transform: none; opacity: 1; } }
@keyframes pageDriftIn  { 0%, 100% { transform: none; opacity: 1; } }
@keyframes colorPageWipeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes colorPageWipeOut { from { opacity: 1; } to { opacity: 0; } }

/* Card trong trang con: hiện thẳng, bỏ stagger cho đỡ nặng lúc chuyển */
.color-page:not(.hidden) .mc-stat-card,
.color-page:not(.hidden) .mc-feature-card { animation: none !important; opacity: 1 !important; }

/* ────────────────────────────────────────────────────────────
   4. CHỮ TO HƠN
   Một hệ số duy nhất — chỉnh --fs-boost là cả trang đổi theo.
   ──────────────────────────────────────────────────────────── */
:root { --fs-boost: 1.12; }

h1 { font-size: clamp(27px, 5.6vw, 35px); }
.color-page-head h2 { font-size: 26px; }

.presence-card h2, .activity-card h2, .about-card h2 { font-size: 16.5px; }
.presence-card p, .activity-card p, .about-card p { font-size: 15.5px; line-height: 1.62; }
#custom-status-line { font-size: 15.5px; }
.username { font-size: 14.5px; }

.meta-grid span   { font-size: 13px; }
.meta-grid strong { font-size: 14.5px; }

.tags span { font-size: 13.5px; padding: 7px 13px; }
.profile-footer, .profile-footer a { font-size: 14px; }
.social-row svg { width: 20px; height: 20px; }
.social-row a { width: 42px; height: 42px; }

.eyebrow, .mc-stat-label, .steam-platform-tag, .mc-bot-tag { font-size: 11px; }
.mc-stat-value { font-size: 17px; }
.mc-feature-title { font-size: 15.5px; }
.mc-feature-desc  { font-size: 13.5px; }
.mc-bot-name, .steam-display-name { font-size: 19px; }
.field-block { font-size: 13px; }
.field-block textarea, .field-block select { font-size: 14px; }
.track-meta strong { font-size: 15px; }
.track-time { font-size: 12px; }
.clock-inline-date, .clock-inline-phase { font-size: 12.5px; }

/* Điện thoại: ghi đè hẳn `font-size: 13px` của khối 420px bản gốc */
@media (max-width: 620px) {
  h1 { font-size: 26px; }
  .username, .presence-card p, .activity-card p, .about-card p { font-size: 15px; }
  #custom-status-line { font-size: 15px; }
  .presence-card h2, .activity-card h2, .about-card h2 { font-size: 16px; }
  .meta-grid strong { font-size: 14px; }
  .tags span { font-size: 13px; }
  .profile-footer a { font-size: 13.5px; }
}
@media (max-width: 420px) {
  h1 { font-size: 25px; }
  .username, .presence-card p, .activity-card p, .about-card p { font-size: 14.5px; }
}

/* ════════════════════════════════════════════════════════════
   ██  PROFILE SCROLLSPY & BACK-TO-TOP BUTTON
   ════════════════════════════════════════════════════════════ */

body.color-page-active




.spy-dot:hover

/* Nút cuộn nhanh lên đầu trang */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 18, 32, 0.85);
  border: 1.5px solid rgba(142, 240, 90, 0.5);
  color: #8ef05a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: all .25s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-top-btn:hover {
  background: rgba(142, 240, 90, 0.2);
  border-color: #8ef05a;
  color: #fff;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 24px rgba(142, 240, 90, 0.35);
}
.scroll-top-btn:active {
  transform: translateY(0) scale(0.95);
}
.scroll-top-btn.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.85);
}
.scroll-top-btn svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   GLOBAL SCROLL & BACKGROUND VIDEO ENGINE
   ========================================================================== */
html {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-behavior: smooth !important;
  background: #020308 !important;
}

/* Glass desk clock: one shared horizontal anchor on every screen size. */
#sec-presence {
  --clock-width: 104px;
  --clock-center: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--clock-width);
  align-items: start;
  gap: 8px;
  padding-top: 20px;
}
#sec-presence > .capybaraloader {
  position: absolute;
  width: 84px;
  height: 60px;
  font-size: 6px;
  right: calc(var(--clock-center) - 42px);
  bottom: calc(100% - 15px);
  transform: none;
  z-index: 5;
  pointer-events: none;
  border: 0;
  background: transparent;
}
.profile-console.page-mode #sec-presence { display: none; }
#sec-presence > .clock-inline {
  grid-column: 2;
  width: var(--clock-width);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 5px 6px;
  border-radius: 12px;
  border: 1px solid rgb(var(--accent2-rgb) / .32);
  background: linear-gradient(135deg, rgb(var(--accent2-rgb) / .12), rgba(13,20,33,.72));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 14px rgba(0,0,0,.18);
}
#sec-presence .clock-inline::before {
  inset: 0 28% auto;
  height: 1px;
  background: rgb(var(--accent2-rgb) / .85);
  box-shadow: 0 0 8px rgb(var(--accent2-rgb) / .45);
}
#sec-presence .clock-inline-top { justify-content: center; }
#sec-presence .clock-inline-time {
  display: flex;
  align-items: center;
  gap: 3px;
  font: 700 17px/1.25 var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  color: #f1f6ff;
}
#sec-presence .clock-tile {
  padding: 2px 3px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,.09) 48%, rgba(0,0,0,.22) 49%, rgba(0,0,0,.22) 53%, rgba(255,255,255,.04) 54%);
  box-shadow: 0 2px 3px rgba(0,0,0,.18);
}
#sec-presence .ci-sep { font-size: 12px; margin: 0; animation: none; color: #adc2d4; }
#sec-presence .clock-seconds { font-size: 9px; color: #a5bdcf; align-self: flex-end; padding-bottom: 3px; }
#sec-presence .clock-inline-date,
#sec-presence .clock-inline-phase { font-size: 8px; line-height: 1.2; text-align: center; letter-spacing: .02em; }
#sec-presence .clock-inline-date { color: #b0bfd2; }
#sec-presence .clock-inline-phase { color: rgb(var(--accent2-rgb) / .9); }

/* Halo hologram: transparent face with a clean rainbow orbit around the date. */
#sec-presence > .clock-inline {
  padding: 5px 3px 4px;
  gap: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}
#sec-presence .clock-inline::before { display: none; }
#sec-presence .clock-inline-time {
  font-size: 22px;
  font-weight: 500;
  gap: 1px;
  color: #d8fffd;
  text-shadow: 0 0 12px rgb(var(--accent2-rgb) / .5);
}
#sec-presence .clock-seconds { font-size: 9px; padding-bottom: 3px; color: #b3d9df; }
#sec-presence .clock-inline-date {
  position: relative;
  z-index: 2;
  color: #d5ecf0;
  text-shadow: 0 0 7px rgba(2, 8, 18, .95);
}
#sec-presence .clock-inline-phase { color: #9bd5d8; }
#sec-presence .clock-halo-ring {
  position: absolute;
  top: 31px;
  left: 0;
  width: 104px;
  height: 24px;
  overflow: visible;
  pointer-events: none;
}
#sec-presence .clock-halo-orbit {
  fill: none;
  stroke: url(#clock-halo-gradient);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 18 5;
  filter: drop-shadow(0 0 3px rgb(var(--accent2-rgb) / .72));
  animation: clockHaloFlow 6s linear infinite;
}
#sec-presence .clock-halo-star {
  fill: #fff8c9;
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 6px #ffdb76);
}
@keyframes clockHaloFlow { to { stroke-dashoffset: -46; } }

/* Hide only the page scrollbar; keep wheel, touch and keyboard scrolling. */
html, body {
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* Scrollbars inside tools remain available. */
::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
  display: block !important;
}

::-webkit-scrollbar-track {
  background: rgba(4, 6, 15, 0.85) !important;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.7), rgba(244, 114, 182, 0.7)) !important;
  border-radius: 999px !important;
  border: 2px solid rgba(4, 6, 15, 0.85) !important;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.95), rgba(244, 114, 182, 0.95)) !important;
}

body {
  height: auto !important;
  min-height: 100vh !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  position: relative !important;
  background: transparent !important;
}

body.terminal-active {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
}

#app-root {
  width: 100% !important;
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  overflow: visible !important;
}

.profile-screen {
  width: 100% !important;
  min-height: 100vh !important;
}

.profile-screen.active {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 30px 16px 140px !important;
  width: 100% !important;
  min-height: 100vh !important;
  overflow: visible !important;
}

/* Background video fixed */
#bg-video, .bg-video {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  object-fit: cover !important;
  z-index: -2 !important;
  pointer-events: none !important;
  display: block !important;
}

#bg-yt-container.hidden {
  display: block !important;
  opacity: 0 !important;
  visibility: hidden !important;
}
#bg-video.hidden {
  display: none !important;
}
#bg-yt-container {
  z-index: -1 !important;
}


/* ==========================================================================
   2. BENTO GRID SECTION (Engineered for Pure Cinematic Authority.)
   ========================================================================== */
.df-bento-section {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 24px 100px;
}

.df-bento-header {
  text-align: center;
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.df-section-title {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: clamp(28px, 4vw, 50px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 14px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ffffff 30%, #e2d4fd 70%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.df-section-sub {
  font-size: clamp(14px, 1.3vw, 17px);
  color: #94a3b8;
  max-width: 620px;
  line-height: 1.6;
}

.df-bento-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Base Card Style */
.bento-card {
  position: relative;
  border-radius: 20px;
  background: rgba(13, 16, 32, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(192, 132, 252, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 35px rgba(168, 85, 247, 0.25);
}

.card-glass-specular {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.01) 32%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  z-index: 4;
}

.card-glow-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

.glow-yellow { background: radial-gradient(circle at 85% 20%, rgba(252, 238, 10, 0.18), transparent 70%); }
.glow-crimson { background: radial-gradient(circle at 50% 50%, rgba(229, 37, 33, 0.22), transparent 70%); }
.glow-pink-neon { background: radial-gradient(circle at 50% 70%, rgba(244, 114, 182, 0.25), transparent 70%); }
.glow-green { background: radial-gradient(circle at 85% 40%, rgba(46, 204, 113, 0.18), transparent 70%); }

.bento-row-top {
  display: grid;
  grid-template-columns: 1.78fr 1fr;
  gap: 20px;
}

.bento-bottom-section {
  display: grid;
  grid-template-columns: 1fr 1.78fr;
  gap: 20px;
}

.bento-right-complex {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bento-bottom-right-subgrid {
  display: grid;
  grid-template-columns: 1.31fr 1fr;
  gap: 20px;
}

.bento-right-mini-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Card Micro Tags */
.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f472b6;
  box-shadow: 0 0 8px #f472b6;
}

.yellow-pulse { background: #fcee0a; box-shadow: 0 0 8px #fcee0a; }
.pink-pulse { background: #f472b6; box-shadow: 0 0 8px #f472b6; }
.green-pulse { background: #2ecc71; box-shadow: 0 0 8px #2ecc71; }

.tag-yellow { color: #fcee0a !important; }
.tag-pink { color: #f472b6 !important; }
.tag-green { color: #2ecc71 !important; }

.df-tag-pill {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.yellow-pill {
  color: #fcee0a !important;
  border-color: rgba(252, 238, 10, 0.35) !important;
  background: rgba(252, 238, 10, 0.08) !important;
}

/* ==========================================================================
   ARTWORK PRESENTATION: UNOBSTRUCTED, CRISP, PROMINENT (NO CLUTTER COVERING AVATARS)
   ========================================================================== */

/* CARD 1: CYBERPUNK 2077 (Wide ~64%) */
.card-1-top-left {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  padding: 32px;
  min-height: 310px;
  align-items: center;
  border-color: rgba(252, 238, 10, 0.22) !important;
}

.card-1-top-left:hover {
  border-color: rgba(252, 238, 10, 0.5) !important;
}

.card-1-content {
  position: relative;
  z-index: 3;
}

.card-1-title {
  font-family: var(--font-tech, 'Chakra Petch', sans-serif);
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: #fff;
}

.card-1-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: #94a3b8;
  margin-bottom: 18px;
  max-width: 380px;
}

.card-1-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-1-visual {
  position: relative;
  z-index: 3;
  width: 100%;
}

.game-art-frame {
  position: relative;
  height: 200px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(252, 238, 10, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(252, 238, 10, 0.2);
}

.game-display-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.card-1-top-left:hover .game-display-art {
  transform: scale(1.06);
}

.art-frame-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(6, 8, 18, 0.85) 100%);
  pointer-events: none;
}

.art-tag-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fcee0a;
  background: rgba(8, 10, 20, 0.85);
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid rgba(252, 238, 10, 0.3);
}

/* CARD 2: RED DEAD REDEMPTION và RED DEAD REDEMPTION 2 (Square ~36%) */
.card-2-top-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  min-height: 310px;
  border-color: rgba(229, 37, 33, 0.25) !important;
}

.card-2-top-right:hover {
  border-color: rgba(229, 37, 33, 0.55) !important;
}

.card-header-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 3;
}

.card-tag-mono {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.red-mono { color: #fca5a5 !important; }

.card-badge-subtle {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.rdr-badge {
  background: rgba(229, 37, 33, 0.2) !important;
  border: 1px solid rgba(229, 37, 33, 0.4) !important;
  color: #fca5a5 !important;
}

.rdr-art-container {
  position: relative;
  margin: 10px 0;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(229, 37, 33, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 3;
}

.rdr-display-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.5s ease;
}

.card-2-top-right:hover .rdr-display-art {
  transform: scale(1.06);
}

.rdr-art-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(14, 7, 7, 0.8) 100%);
  pointer-events: none;
}

.rdr-card-footer {
  position: relative;
  z-index: 3;
  text-align: left;
}

.rdr-game-name {
  font-family: var(--font-tech, 'Chakra Petch', sans-serif);
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin: 0;
}

.rdr-game-sub {
  font-size: 11px;
  color: #94a3b8;
  margin: 3px 0 8px;
}

.rdr-pills {
  display: flex;
  gap: 6px;
}

.rdr-pill {
  color: #fca5a5 !important;
  border-color: rgba(229, 37, 33, 0.35) !important;
  background: rgba(229, 37, 33, 0.12) !important;
}

/* CARD 3: GRAND THEFT AUTO VI (Tall Vertical ~36% width, ~61% height) */
.card-3-tall-left {
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  border-color: rgba(244, 114, 182, 0.25) !important;
}

.card-3-tall-left:hover {
  border-color: rgba(244, 114, 182, 0.55) !important;
}

.c3-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.gtavi-art-container {
  position: relative;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(244, 114, 182, 0.3);
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.gtavi-display-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.card-3-tall-left:hover .gtavi-display-art {
  transform: scale(1.06);
}

.gtavi-art-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 6, 20, 0.8) 100%);
  pointer-events: none;
}

.gta-title-main {
  font-family: var(--font-tech, 'Chakra Petch', sans-serif);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 10px;
}

.title-sub-pink {
  font-size: 0.55em;
  letter-spacing: 0.14em;
  color: #f472b6;
}

.c3-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #94a3b8;
  margin-bottom: 20px;
}

.c3-layer-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.c3-layer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.layer-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.layer-indicator.pink { background: #f472b6; box-shadow: 0 0 8px #f472b6; }
.layer-indicator.cyan { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }

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

.layer-name {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
}

.layer-val {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  color: #94a3b8;
}

/* CARD 4: GRAND THEFT AUTO V (Wide Horizontal ~64%) */
.card-4-mid-wide {
  padding: 28px 30px;
  border-color: rgba(46, 204, 113, 0.22) !important;
}

.card-4-mid-wide:hover {
  border-color: rgba(46, 204, 113, 0.5) !important;
}

.c4-grid-wrap {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: center;
}

.gtav-title {
  font-family: var(--font-tech, 'Chakra Petch', sans-serif);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.c4-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #94a3b8;
  margin-bottom: 16px;
}

.c4-specs {
  display: flex;
  gap: 16px;
}

.c4-spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  font-family: var(--font-mono, monospace);
  font-size: 8.5px;
  color: #64748b;
  letter-spacing: 0.1em;
}

.spec-val {
  font-family: var(--font-tech, 'Chakra Petch', sans-serif);
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}
.green-val { color: #2ecc71 !important; }
.gold-val { color: #facc15 !important; }

/* GTA V Trio Characters Frame: Unobstructed & Clear */
.gtav-art-frame {
  position: relative;
  height: 170px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(46, 204, 113, 0.35);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.gtav-display-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 0.5s ease;
}

.card-4-mid-wide:hover .gtav-display-art {
  transform: scale(1.06);
}

.gtav-frame-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(6, 14, 10, 0.8) 100%);
  pointer-events: none;
}

/* CARDS 5, 6, 7 (ORIGINAL CLEAN DREAMFRAME STATE) */
.card-5-mid-square {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.c5-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.c5-badge-live {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 700;
  color: #f472b6;
  letter-spacing: 0.08em;
}

.c5-visual {
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.c5-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 48px;
  padding: 0 10px;
}

.eq-col {
  width: 6px;
  height: var(--h1, 40%);
  border-radius: 3px;
  background: linear-gradient(180deg, #f472b6, #c084fc);
  animation: eqBounce 1s ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}

@keyframes eqBounce {
  to { height: var(--h2, 85%); }
}

.c5-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.c5-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #94a3b8;
}

.card-6-small-top {
  padding: 20px;
  flex: 1;
}

.c6-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.c6-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.c6-metric {
  font-family: var(--font-tech, 'Chakra Petch', sans-serif);
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.c6-network-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.25);
  display: grid;
  place-items: center;
  color: #c084fc;
}
.c6-network-icon svg { width: 15px; height: 15px; }

.c6-label {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
  margin-top: 6px;
}

.c6-tags {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.c6-tags span {
  font-family: var(--font-mono, monospace);
  font-size: 8.5px;
  color: #c084fc;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.card-7-small-bottom {
  padding: 20px;
  flex: 1;
}

.c7-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.c7-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.c7-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.c7-status-text {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #34d399;
}

.c7-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 6px 0;
}

.c7-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  color: #c084fc;
  transition: all 0.2s ease;
}

.c7-btn-action:hover {
  color: #fff;
  transform: translateX(3px);
}

/* ==========================================================================
   RESPONSIVE LAYOUT FOR BENTO
   ========================================================================== */
@media (max-width: 1024px) {
  .bento-row-top { grid-template-columns: 1.3fr 1fr; }
  .bento-bottom-section { grid-template-columns: 1fr; }
  .c4-grid-wrap { grid-template-columns: 1fr; gap: 16px; }
  .card-1-top-left { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 768px) {
  .bento-row-top,
  .bento-bottom-section,
  .bento-bottom-right-subgrid {
    grid-template-columns: 1fr;
  }
  .card-1-top-left { padding: 24px 20px; }
  .c4-specs { flex-wrap: wrap; gap: 10px; }
}
/* ==========================================================================
   COMPACT PROFILE + MUSIC DOCK
   Match the restrained proportions of the supplied reference while keeping
   every existing control and inner page available.
   ========================================================================== */
.profile-screen.active {
  padding: 18px 14px 112px !important;
}

/* Center the profile, Minecraft and Text Color with room on short screens. */
body:not(.color-page-active) .profile-screen.active,
body.color-page-active .profile-screen.active:has(#minecraft-page:not(.hidden)),
body.color-page-active .profile-screen.active:has(#color-page:not(.hidden)),
body.color-page-active .profile-screen.active:has(#steam-page:not(.hidden)) {
  min-height: 100dvh !important;
  justify-content: center;
  padding: 24px 14px !important;
}

.profile-screen > .music-player {
  position: relative;
  inset: auto;
  transform: none;
  flex-shrink: 0;
}

.profile-screen > .music-player.hidden { display: none; }

.profile-console {
  width: min(410px, calc(100vw - 28px));
  border-radius: 14px;
}

.profile-banner { height: 100px; }
.profile-banner::after { height: 38px; }

.profile-header {
  gap: 11px;
  margin-top: -32px;
  padding: 0 14px 7px;
}

.avatar-wrap {
  width: 70px;
  height: 70px;
}

.avatar-image,
.avatar-fallback { border-width: 4px; }
.avatar-decoration { transform: scale(1.06); }
.status-orb {
  right: 1px;
  bottom: 4px;
  width: 21px;
  height: 21px;
  border-width: 4px;
}
.avatar-ring { inset: -5px; }

.profile-header h1 {
  font-size: clamp(17px, 4.5vw, 20px);
  line-height: 1.2;
}
.profile-header .display-name { font-size: inherit; line-height: inherit; }
.profile-console .identity-block {
  padding-bottom: 2px;
  position: relative;
  top: 4px;
}
.profile-console .username {
  margin-top: 4px;
  font-size: 12px;
}

.profile-console .presence-card,
.profile-console .activity-card,
.profile-console .about-card {
  margin: 0 12px 7px;
  padding: 8px 9px;
  border-radius: 12px;
}

.profile-console .presence-card {
  min-height: 64px;
  gap: 8px;
}

.profile-console .presence-card h2,
.profile-console .activity-card h2,
.profile-console .about-card h2 {
  margin-bottom: 3px;
  font-size: 13px;
  line-height: 1.35;
}

.profile-console .presence-card p,
.profile-console .activity-card p,
.profile-console .about-card p,
.profile-console #custom-status-line {
  font-size: 11.5px;
  line-height: 1.35;
}

.clock-inline {
  min-width: 88px;
  gap: 1px;
  padding: 6px 8px;
}
.clock-inline-time { font-size: 11px; }
.clock-inline-date,
.clock-inline-phase { font-size: 8px; }



.profile-console .meta-grid {
  gap: 6px;
  margin: 0 12px 7px;
}
.profile-console .meta-grid div {
  min-height: 44px;
  padding: 7px 8px;
  border-radius: 11px;
}
.profile-console .meta-grid span {
  margin-bottom: 2px;
  font-size: 10px;
}
.profile-console .meta-grid strong { font-size: 11.5px; }
.profile-console .badge-list { gap: 3px; min-height: 18px; }
.profile-console .discord-badge {
  width: 24px;
  height: 24px;
}
.profile-console .discord-badge img {
  width: 18px;
  height: 18px;
}

.profile-console .about-card { padding-bottom: 8px; }
.profile-console .tags {
  gap: 5px;
  margin-top: 7px;
}
.profile-console .tags span {
  padding: 4px 8px;
  font-size: 10px;
}

.profile-console .social-row {
  gap: 7px;
  padding: 0 12px 6px;
}
.profile-console .social-row a {
  width: 32px;
  height: 32px;
}
.profile-console .social-row svg {
  width: 15px;
  height: 15px;
}

.profile-console .profile-footer {
  gap: 5px;
  padding: 7px 12px 8px;
}
.profile-console .profile-footer a {
  gap: 4px;
  padding: 5px 7px;
  font-size: 10.5px;
  border-radius: 8px;
}
.profile-console .steam-icon {
  width: 13px !important;
  height: 13px !important;
}

.theme-switcher {
  top: 7px;
  right: 7px;
  gap: 4px;
}
.theme-switcher,
.theme-menu {
  align-items: center;
}
.theme-switcher > button,
.theme-menu > button {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  vertical-align: middle;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
}
.theme-toggle-btn,
.warp-btn {
  width: 30px;
  height: 30px;
  margin-left: 0;
  font-size: 13px;
}

/* Reference-style compact music dock. */
.music-player {
  bottom: 10px;
  width: min(410px, calc(100vw - 28px));
  min-height: 58px;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  background: rgba(8, 10, 21, .86);
  color: #edf3ff;
  box-shadow: 0 14px 38px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

.player-art {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: transparent;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 5px 16px rgba(0,0,0,.38);
  animation: none;
}
.player-art::before,
.player-art::after { display: none; }

.track-meta strong {
  color: #f3f6ff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.track-time {
  margin-top: 2px;
  font-size: 9px;
  line-height: 1;
}
.progress {
  height: 3px;
  margin-top: 5px;
  overflow: hidden;
}
.progress:hover { height: 5px; }
.progress span::after { display: none; }

.player-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}
.prev-btn,
.play-btn,
.next-btn {
  width: 27px;
  height: 27px;
  min-width: 27px;
  padding: 0;
  border-radius: 7px;
  font-size: 14px;
}
.prev-btn:hover,
.play-btn:hover,
.next-btn:hover { background: rgba(255,255,255,.08); }

.volume-control {
  position: relative;
  top: auto;
  right: auto;
  transform: none;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 28px;
  flex: 0 0 auto;
}
.volume-toggle {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-size: 13px;
  cursor: pointer;
}
.volume-control input {
  position: static;
  left: auto;
  right: -2px;
  bottom: 36px;
  width: 56px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  opacity: 1;
  pointer-events: auto;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  touch-action: none;
  transition: none;
}
.volume-control.open input { width: 56px; }

/* Expand inward; the speaker stays at the right edge of the music dock. */
.volume-toggle { order: 2; flex-shrink: 0; }
.volume-details {
  order: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  width: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: width .2s ease, opacity .2s ease;
}
.volume-details input { flex-shrink: 0; }
.volume-control:hover .volume-details,
.volume-control:focus-within .volume-details,
.volume-control.open .volume-details {
  width: 83px;
  visibility: visible;
  opacity: 1;
}

.volume-control input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    var(--cyan) 0 var(--music-volume, 50%),
    rgba(255,255,255,.18) var(--music-volume, 50%) 100%);
}
.volume-control input::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 2px solid #f7fbff;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0,0,0,.2), 0 0 9px rgb(var(--accent2-rgb) / .52);
}
.volume-control input::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}
.volume-control input::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--cyan);
}
.volume-control input::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 2px solid #f7fbff;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0,0,0,.2), 0 0 9px rgb(var(--accent2-rgb) / .52);
}
.volume-control input:focus-visible {
  outline: 2px solid rgb(var(--accent2-rgb) / .82);
  outline-offset: 3px;
  border-radius: 999px;
}
.volume-value {
  min-width: 24px;
  color: #dce7f8;
  font: 700 9px/1 var(--font-mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  .profile-screen.active { padding: 12px 10px 100px !important; }
  .profile-console,
  .music-player { width: min(410px, calc(100vw - 20px)); }

  .theme-switcher {
    top: 7px;
    right: 7px;
    flex-direction: row;
    align-items: center;
  }
  .theme-toggle-btn,
  .warp-btn {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .clock-inline {
    width: auto;
    min-width: 88px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 6px 8px;
    gap: 1px;
    border-radius: 999px;
  }
  .clock-inline-top { gap: 4px; }
  .clock-inline-time { font-size: 11px; }
  .clock-inline-dot { width: 5px; height: 5px; }
  .ci-sep { margin: 0; font-size: inherit; }
  .clock-inline-date,
  .clock-inline-phase {
    font-size: 8px;
    text-align: right;
  }
}

@media (max-width: 380px) {
  .profile-console .presence-card {
    align-items: stretch;
    flex-direction: column;
  }
  .clock-inline {
    width: 100%;
    align-items: center;
    border-radius: 10px;
  }
  .music-player { gap: 5px; padding-inline: 7px; }
  .player-art { width: 34px; height: 34px; }
  .player-controls { gap: 1px; }
  .prev-btn,
  .play-btn,
  .next-btn { width: 25px; min-width: 25px; }
  .volume-control { gap: 2px; min-width: 24px; }
  .volume-toggle { width: 24px; min-width: 24px; }
  .volume-control input,
  .volume-control.open input { width: 42px; }
  .volume-value { min-width: 14px; font-size: 8px; }
  .volume-control:hover .volume-details,
  .volume-control:focus-within .volume-details,
  .volume-control.open .volume-details { width: 61px; }
}

/* ==========================================================================
   COMPACT INNER TOOLS
   Keep Minecraft and Text Color aligned with the 410 x 493 profile card.
   Steam intentionally keeps its existing wide layout.
   ========================================================================== */
#minecraft-page,
#color-page {
  box-sizing: border-box;
  min-height: 493px;
}

#minecraft-page:not(.hidden),
#color-page:not(.hidden) {
  display: flex;
  flex-direction: column;
}

#minecraft-page > *,
#color-page > * {
  flex-shrink: 0;
}

#minecraft-page {
  padding: 10px 12px 12px;
  transform: none !important;
  transform-style: flat;
}

#minecraft-page .color-page-head,
#color-page .color-page-head {
  gap: 8px;
  margin-bottom: 7px;
}

#minecraft-page .color-page-head h2,
#color-page .color-page-head h2 {
  font-size: 19px;
  line-height: 1.08;
}

#minecraft-page .color-page-head .eyebrow,
#color-page .color-page-head .eyebrow {
  margin-bottom: 2px;
  font-size: 8px;
  line-height: 1.2;
}

#minecraft-page .mini-btn,
#color-page .mini-btn {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 11px;
}

#minecraft-page .mc-bot-card {
  gap: 9px;
  margin-bottom: 7px;
  padding: 8px 10px;
  align-items: center;
  min-height: 96px;
  border-radius: 11px;
}

#minecraft-page .mc-bot-info { flex: 1; min-width: 0; }

#minecraft-page .mc-join-btn.mc-discord-icon {
  order: 1;
  position: relative;
  align-self: center;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 3px 12px rgba(0,0,0,.2);
}

#minecraft-page .mc-join-btn.mc-discord-icon,
#minecraft-page .mc-join-btn.mc-discord-icon:hover,
#minecraft-page .mc-join-btn.mc-discord-icon:focus-visible {
  transform: none !important;
}
#minecraft-page .mc-join-btn.mc-discord-icon:hover,
#minecraft-page .mc-join-btn.mc-discord-icon:focus-visible {
  color: #fff;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 4px 14px rgba(0,0,0,.25);
}
#minecraft-page .mc-join-btn.mc-discord-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  transform: none !important;
}

#minecraft-page .mc-bot-avatar,
#minecraft-page .mc-bot-avatar img {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

#minecraft-page .mc-bot-avatar img {
  border-radius: 10px;
}

#minecraft-page .mc-bot-status-dot {
  right: -2px;
  bottom: -2px;
  width: 13px;
  height: 13px;
  border-width: 3px;
}

#minecraft-page .mc-bot-tag {
  margin-bottom: 2px;
  font-size: 8.5px;
}

#minecraft-page .mc-bot-name {
  margin-bottom: 2px;
  font-size: 16px;
  line-height: 1.3;
}

#minecraft-page .mc-bot-desc {
  font-size: 11px;
  line-height: 1.45;
}

#minecraft-page .mc-action-row {
  gap: 8px;
  margin-bottom: 7px;
}

#minecraft-page .mc-join-btn {
  gap: 5px;
  padding: 7px 10px;
  font-size: 10px;
}

#minecraft-page .mc-join-btn svg {
  width: 13px;
  height: 13px;
}

#minecraft-page .mc-updated {
  font-size: 8px;
}

#minecraft-page .mc-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 7px;
}

#minecraft-page .mc-stat-card {
  min-height: 46px;
  padding: 7px 7px;
  border-radius: 9px;
}

#minecraft-page .mc-stat-card.wide {
  grid-column: span 2;
}

#minecraft-page .mc-stat-label {
  margin-bottom: 3px;
  font-size: 7px;
  letter-spacing: .08em;
}

#minecraft-page .mc-stat-value {
  font-size: 10.5px;
}

#minecraft-page .mc-ip-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

#minecraft-page .mc-copy-ip-btn {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  padding: 0 !important;
  border-radius: 7px !important;
}

#minecraft-page .mc-feature-grid {
  flex-grow: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

#minecraft-page .mc-feature-card {
  padding: 10px 7px;
  border-radius: 9px;
}

#minecraft-page .mc-feature-num {
  margin-bottom: 3px;
  font-size: 8px;
}

#minecraft-page .mc-feature-title {
  margin-bottom: 3px;
  font-size: 10.5px;
  line-height: 1.2;
}

#minecraft-page .mc-feature-desc {
  font-size: 10px;
  line-height: 1.45;
}

#color-page {
  padding: 10px 12px 12px;
}

#color-page .field-block {
  gap: 3px;
  margin-bottom: 6px;
  font-size: 9.5px;
}

#color-page .field-block textarea,
#color-page .field-block select {
  padding: 7px 8px;
  border-radius: 9px;
  font-size: 10.5px;
}

#color-page .field-block select {
  min-height: 32px;
  padding-right: 28px;
  background-position: center, right 7px center;
  background-size: 100% 100%, 13px 13px;
}

#color-page #tc-input-text {
  height: 43px;
  min-height: 43px;
  resize: none;
}

#color-page .tool-grid {
  gap: 6px;
}

#color-page .color-picks {
  gap: 5px;
  margin: 2px 0 6px;
}

#color-page .color-picks label {
  gap: 4px;
  min-width: 0;
  padding: 5px 6px;
  border-radius: 9px;
  font-size: 9px;
}

#color-page .color-picks input {
  width: 31px;
  height: 21px;
  border-radius: 6px;
}

#color-page .tool-grid.compact {
  align-items: center;
}

#color-page .toggle-row {
  gap: 4px;
  margin-bottom: 6px;
}

#color-page .toggle-row label {
  min-height: 29px;
  padding: 5px 7px;
  font-size: 9px;
}

#color-page .toggle-row input {
  width: 11px;
  height: 11px;
}

#color-page .preview-card {
  margin: 1px 0 6px;
  padding: 7px 8px;
  border-radius: 10px;
}

#color-page .preview-card > span {
  margin-bottom: 4px;
  font-size: 8px;
}

#color-page .tc-preview {
  min-height: 24px;
  font-size: 11px;
  line-height: 1.35;
}

#color-page .output-block {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

#color-page .output-block textarea {
  flex-grow: 1;
  height: 58px;
  min-height: 58px;
  resize: none;
}

#color-page .copy-btn {
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 10px;
}

@media (max-width: 380px) {
  #minecraft-page,
  #color-page {
    min-height: 493px;
  }

  #minecraft-page .mc-stat-label { font-size: 6.5px; }
  #minecraft-page .mc-stat-value { font-size: 9.5px; }
  #minecraft-page .mc-feature-desc { font-size: 8px; }
}

/* ==========================================================================
   COMPACT LANDSCAPE CMD WINDOW
   Keep a smaller terminal-like landscape ratio without changing behaviour.
   ========================================================================== */
body.terminal-active .terminal-screen {
  align-items: start;
  padding: 14px;
  padding-top: clamp(14px, calc((100dvh - 480px) / 2), 120px);
}

body.terminal-active .cmd-window {
  width: min(640px, calc(100vw - 28px));
  height: min(var(--cmd-growth-height, 206px), calc(100dvh - 28px));
  max-height: calc(100dvh - 28px);
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  transition: height .42s cubic-bezier(.16, 1, .3, 1), width .45s cubic-bezier(.16, 1, .3, 1), box-shadow .45s ease;
}

body.terminal-active .cmd-titlebar {
  height: 34px;
  padding: 0 9px;
  gap: 6px;
}

body.terminal-active .cmd-controls {
  gap: 5px;
  margin-right: 7px;
}

body.terminal-active .cmd-controls span {
  width: 10px !important;
  height: 10px !important;
}

body.terminal-active .cmd-tabs {
  flex: 0 1 auto;
  max-width: calc(100% - 110px);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

body.terminal-active .cmd-tabs::-webkit-scrollbar {
  display: none !important;
}

body.terminal-active .cmd-tab {
  min-width: 106px;
  max-width: 142px;
  gap: 6px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 8px;
}

body.terminal-active .cmd-tab.active-tab {
  height: 26px;
  margin: 4px 0;
  border-radius: 8px;
}

body.terminal-active .cmd-tab.active-tab::after { bottom: 3px; }

body.terminal-active .cmd-tab-close {
  width: 14px;
  height: 14px;
  font-size: 12px;
}

body.terminal-active .cmd-plus {
  width: 27px;
  height: 26px;
  font-size: 14px;
  margin-left: 2px;
}

body.terminal-active .cmd-body {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: calc(100% - 34px);
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  font-size: 12px;
  line-height: 1.42;
}

body.terminal-active .cmd-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-wrap: anywhere;
  scrollbar-width: none;
}

body.terminal-active .cmd-log::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body.terminal-active .cmd-prompt-line {
  flex: 0 0 auto;
  min-width: 0;
}

/* Keep completed boot lines anchored while the window grows around the footer. */
body.terminal-active .cmd-window.boot-layout .cmd-log {
  flex: 0 0 auto;
}
body.terminal-active .cmd-window.boot-layout .cmd-body {
  overflow-y: auto;
  scrollbar-width: none;
}
body.terminal-active .cmd-window.boot-layout .cmd-body::-webkit-scrollbar {
  display: none;
}
body.terminal-active .cmd-window.boot-layout .cmd-continue:not(.hidden) {
  animation: cmdContinueReveal .18s ease .42s both;
}
@keyframes cmdContinueReveal {
  from { opacity: 0; visibility: hidden; }
  to { opacity: 1; visibility: visible; }
}

body.terminal-active #cmd-enter-hint {
  flex: 0 0 auto;
  margin-top: 10px;
  line-height: inherit;
}

body.terminal-active .cmd-prompt-line span {
  white-space: nowrap;
}

body.terminal-active .cmd-continue {
  flex: 0 0 auto;
  min-height: 38px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 11px;
}

body.terminal-active .cmd-window.maximized {
  height: min(640px, calc(100dvh - 20px));
  max-height: calc(100dvh - 20px) !important;
}

@media (max-width: 420px) {
  body.terminal-active .terminal-screen {
    padding: 10px;
    padding-top: clamp(10px, calc((100dvh - 480px) / 2), 120px);
  }

  body.terminal-active .cmd-window {
    width: calc(100vw - 20px);
    height: min(var(--cmd-growth-height, 206px), calc(100dvh - 20px));
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }

  body.terminal-active .cmd-body {
    padding: 11px;
    font-size: 11.5px;
  }
}
