
:root[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --text-primary: #e8e8e8;
  --text-muted: rgba(255,255,255,0.5);
  --glass-bg: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.1);
  --glass-pink-bg: rgba(255,45,120,0.06);
  --glass-cyan-bg: rgba(0,245,255,0.05);
  --glass-blue-bg: rgba(137,196,244,0.06);
  --pink-core: #ff2d78;
  --cyan-core: #00f5ff;
  --blue-core: #89c4f4;
  --grid-line-1: rgba(255,45,120,0.03);
  --grid-line-2: rgba(137,196,244,0.03);
  --modal-overlay: rgba(0,0,0,0.8);
  --modal-bg: #111;
}

:root[data-theme="light"] {

  --bg-primary:       #FFE4EF;
  --text-primary:     #5c1a3a;
  --text-muted:       rgba(92,26,58,0.55);
  --glass-bg:         rgba(255,255,255,0.65);
  --glass-border:     rgba(255,105,180,0.45);
  --glass-pink-bg:    rgba(255,105,180,0.18);
  --glass-cyan-bg:    rgba(0,206,209,0.09);
  --glass-blue-bg:    rgba(135,206,235,0.14);
  --pink-core:        #FF69B4;           /* Hot Pink */
  --cyan-core:        #e5559a;           /* Raspberry Pink แทน cyan ใน light */
  --blue-core:        #c2185b;           /* Deep Rose แทน blue ใน light */
  --grid-line-1:      rgba(255,105,180,0.12);
  --grid-line-2:      rgba(255,182,193,0.15);
  --modal-overlay:    rgba(255,200,220,0.75);
  --modal-bg:         #fff5f8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { 
  background-color: var(--bg-primary); 
  color: var(--text-primary); 
  font-family: 'Outfit', sans-serif; 
  overflow-x: hidden; 
  transition: background-color 0.05s, color 0.05s;
}

#theme-ripple {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
}
#theme-ripple.ripple-to-light {
  background: radial-gradient(circle, #fff0f5 0%, #FFD6E7 40%, #FFE4EF 100%);
  animation: ripple-expand 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
#theme-ripple.ripple-to-dark {
  background: radial-gradient(circle, #1a0a14 0%, #0f0f0f 40%, #0a0a0a 100%);
  animation: ripple-expand 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes ripple-expand {
  0%   { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

::view-transition-old(root) {
  animation: none;
}
::view-transition-new(root) {
  animation: theme-slide-in 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes theme-slide-in {
  from { clip-path: circle(0% at var(--ripple-x, 50%) var(--ripple-y, 50%)); }
  to   { clip-path: circle(150% at var(--ripple-x, 50%) var(--ripple-y, 50%)); }
}

/* Custom Scrollbar - Cute Pink Style */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #FFF4F7; border-radius: 10px; }
::-webkit-scrollbar-thumb {
  background-color: #FFB6C1;
  border-radius: 10px;
  border: 3px solid #FFF4F7;
}
::-webkit-scrollbar-thumb:hover { background-color: #FF69B4; }

[data-theme="dark"] ::-webkit-scrollbar-track { background: #1a0a14; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { border-color: #1a0a14; }

body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line-1) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-2) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ─── Progressive Image Loading (Blur-to-Sharp) ── */
.img-loading-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,45,120,0.06), rgba(0,245,255,0.04));
}

.img-loading-wrap img {
  filter: blur(20px);
  transform: scale(1.1);
  transition: filter 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: filter, transform;
}

.img-loading-wrap img.img-loaded {
  filter: blur(0);
  transform: scale(1);
}

/* Shimmer skeleton overlay */
.img-loading-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 105, 180, 0.08) 45%,
    rgba(0, 245, 255, 0.06) 50%,
    transparent 70%
  );
  background-size: 250% 100%;
  animation: imgShimmer 1.8s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
  border-radius: inherit;
}

.img-loading-wrap.img-wrap-loaded::after {
  opacity: 0;
}

@keyframes imgShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -100% 0; }
}

/* Hero background image — both themes */
#hero-bg-image {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('assets/image.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.4s ease;
}
/* max opacity per theme — JS will scale between 0 and this value */
[data-theme="light"] #hero-bg-image { --hero-bg-max: 0.35; }
[data-theme="dark"]  #hero-bg-image { --hero-bg-max: 0.18; }

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.glass-pink {
  background: var(--glass-pink-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}
.glass-cyan {
  background: var(--glass-cyan-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}
.glass-blue {
  background: var(--glass-blue-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

.btn-glow {
  background: linear-gradient(135deg, #ffb6d9, #FF69B4, #e5559a);
  color: #fff !important;
  box-shadow: 0 0 18px rgba(255,105,180,0.45);
  transition: all 0.3s ease; position: relative; overflow: hidden;
}
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(255,105,180,0.65); }

.nav-link {
  position: relative; color: var(--text-muted);
  transition: color 0.3s ease; font-weight: 500;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: linear-gradient(90deg, #ffb6d9, var(--pink-core), var(--cyan-core));
  transition: width 0.3s ease;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.72rem; font-family: 'JetBrains Mono', monospace; font-weight: 600;
}
.badge-pink { background: rgba(255,45,120,0.15); color: var(--pink-core); border: 1px solid rgba(255,45,120,0.3); }
.badge-cyan { background: rgba(0,245,255,0.08); color: var(--cyan-core); border: 1px solid color-mix(in srgb, var(--cyan-core) 35%, transparent); }
.badge-blue { background: rgba(137,196,244,0.1); color: var(--blue-core); border: 1px solid color-mix(in srgb, var(--blue-core) 35%, transparent); }

.timeline-line { width: 2px; background: linear-gradient(180deg, #ffb6d9, var(--pink-core), var(--cyan-core)); }
.timeline-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--pink-core); box-shadow: 0 0 10px var(--pink-core); flex-shrink: 0;
}

.project-card, .bento-card { transition: transform 0.3s, box-shadow 0.3s; }
.project-card:hover, .bento-card:hover { transform: translateY(-4px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

.img-placeholder {
  background: linear-gradient(135deg, rgba(255,45,120,0.1), rgba(0,245,255,0.05));
  border: 1px dashed var(--glass-border);
  display: flex; align-items: center; justify-content: center;
}

.custom-modal {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: var(--modal-overlay); backdrop-filter: blur(5px);
  align-items: center; justify-content: center; padding: 1rem;
}
.custom-modal.active { display: flex; }
.modal-content {
  background: var(--modal-bg); border: 1px solid var(--glass-border);
  border-radius: 24px; padding: 2rem; max-width: 400px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  color: var(--text-primary);
}

.cinnamoroll-stage {
    position: fixed; bottom: 20px; right: 20px; z-index: 40;
    width: 80px; height: auto; pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}
.cinnamoroll-dance { width: 100%; height: auto; animation: bounceCustom 2s ease-in-out infinite; }
@keyframes bounceCustom {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

/* ─── Discord Profile Card (Discord Popup Style) ──────────────────────────── */
.discord-profile-card {
  width: 100%;
  max-width: 300px;
  border-radius: 16px;
  background: #111214;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 48px rgba(0,0,0,0.6);
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
  font-family: 'Outfit', sans-serif;
  /* clip banner+info but let avatar deco overflow */
  overflow: visible;
}
.discord-profile-card .discord-banner {
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

/* ── Discord Mobile Profile Sheet ── */
.discord-mobile-sheet {
  width: 100%;
  max-width: 360px;
  background: #111214;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.65);
  position: relative;
  overflow: visible;
  font-family: 'Outfit', sans-serif;
}
.discord-mobile-banner {
  height: 110px !important;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}
.discord-mobile-sheet .discord-live-badge {
  position: absolute;
  top: 10px; right: 12px;
  z-index: 10;
}
/* Avatar row */
.discord-mobile-avatar-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 16px;
  margin-top: -40px;
  margin-bottom: 6px;
}
.discord-mobile-badges-right {
  margin-top: 48px;        /* align badges with name area */
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 55%;
}
/* Name block */
.discord-mobile-namewrap {
  padding: 0 16px 8px;
  position: relative;
}
/* Action buttons */
.discord-mobile-actions {
  display: flex;
  gap: 8px;
  padding: 4px 16px 12px;
}
.discord-mobile-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 0;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  color: inherit;
  flex: 1;
  border: 1px solid rgba(255,255,255,0.05);
}
.discord-mobile-action-btn:hover {
  background: rgba(255,194,209,0.15);
  transform: translateY(-1px);
}
.discord-mobile-action-btn i {
  font-size: 1rem;
  color: #ffc2d1;
}
.discord-mobile-action-btn span {
  font-size: 0.58rem;
  color: #b5bac1;
  letter-spacing: 0.02em;
}
/* Tab bar */
.discord-mobile-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 0 16px;
  gap: 4px;
}
.discord-mobile-tab {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #80848e;
  padding: 8px 10px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}
.discord-mobile-tab--active {
  color: #fff !important;
}
.discord-mobile-tab--active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffc2d1, #ff8fab);
  border-radius: 2px 2px 0 0;
}
/* Content */
.discord-mobile-content {
  padding: 12px 16px 20px;
}


[data-theme="light"] .discord-profile-card {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 12px 48px rgba(0,0,0,0.15);
}

/* ── Discord mobile sheet always stays dark (Discord is dark-only) ── */
[data-theme="light"] .discord-mobile-sheet {
  background: #111214 !important;
  border-color: rgba(255,255,255,0.08) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.65) !important;
}
[data-theme="light"] .discord-mobile-sheet .discord-display-name { color: #fff !important; }
[data-theme="light"] .discord-mobile-sheet .discord-username    { color: #b5bac1 !important; }
[data-theme="light"] .discord-mobile-sheet .discord-section-label { color: #b5bac1 !important; }
[data-theme="light"] .discord-mobile-sheet .discord-about-text  { color: #dbdee1 !important; }
[data-theme="light"] .discord-mobile-sheet .discord-member-text { color: #dbdee1 !important; }
[data-theme="light"] .discord-mobile-sheet .discord-activity-name   { color: #fff !important; }
[data-theme="light"] .discord-mobile-sheet .discord-activity-detail { color: #b5bac1 !important; }
[data-theme="light"] .discord-mobile-sheet .discord-activity-state  { color: #b5bac1 !important; }
[data-theme="light"] .discord-mobile-sheet .discord-spotify-song    { color: #fff !important; }
[data-theme="light"] .discord-mobile-sheet .discord-spotify-artist  { color: #b5bac1 !important; }
[data-theme="light"] .discord-mobile-sheet .discord-status-dot { border-color: #111214 !important; }
[data-theme="light"] .discord-mobile-sheet .discord-avatar     { border-color: #111214 !important; }
[data-theme="light"] .discord-mobile-sheet .discord-mobile-tab     { color: #80848e !important; }
[data-theme="light"] .discord-mobile-sheet .discord-mobile-tab--active { color: #fff !important; }
[data-theme="light"] .discord-mobile-sheet .discord-mobile-tabs {
  border-bottom-color: rgba(255,255,255,0.07) !important;
}
[data-theme="light"] .discord-mobile-sheet .discord-custom-status { color: #b5bac1 !important; }
[data-theme="light"] .discord-mobile-sheet .discord-mobile-action-btn {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.05) !important;
}
[data-theme="light"] .discord-mobile-sheet .discord-mobile-action-btn span { color: #b5bac1 !important; }

.discord-profile-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(255,143,171,0.35);
}

/* Banner */
.discord-banner {
  height: 80px;
  background: linear-gradient(135deg, #ffc2d1 0%, #ffb3c6 50%, #ff8fab 100%);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.discord-banner-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,194,209,0.5) 0%, rgba(255,143,171,0.3) 100%);
}

/* Avatar */
.discord-avatar-row {
  padding: 0 16px;
  margin-top: -38px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
}
.discord-avatar-wrap {
  position: relative;
  width: 76px; height: 76px;
  flex-shrink: 0;
  overflow: visible;
}

.discord-avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  border: 5px solid #111214;
  object-fit: cover;
  background: #2b2d31;
  display: block;
}
[data-theme="light"] .discord-avatar { border-color: #ffffff; }

/* Status dot */
.discord-status-dot {
  position: absolute;
  bottom: 3px; right: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 4px solid #111214;
}
[data-theme="light"] .discord-status-dot { border-color: #ffffff; }
.status-online    { background: #23a55a; }
.status-idle      { background: #f0b232; }
.status-dnd       { background: #f23f43; }
.status-streaming { background: #593695; }
.status-offline   { background: #80848e; }

/* Info body */
.discord-info,
.discord-info-wrap {
  padding: 0 14px 14px;
}
.discord-info-wrap { position: relative; }

.discord-display-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f2f3f5;
  line-height: 1.2;
  margin-bottom: 1px;
}
[data-theme="light"] .discord-display-name { color: #060607; }

.discord-username {
  font-size: 0.78rem;
  color: #b5bac1;
  display: block;
  margin-bottom: 8px;
}
[data-theme="light"] .discord-username { color: #4e5058; }

.discord-custom-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: #b5bac1;
  margin-bottom: 6px;
}

/* Divider */
.discord-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 10px 0;
}
[data-theme="light"] .discord-divider { background: rgba(0,0,0,0.08); }

/* Section labels */
.discord-section-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #b5bac1;
  margin-bottom: 5px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

/* About & member text */
.discord-about-text {
  font-size: 0.8rem;
  color: #dbdee1;
  line-height: 1.5;
  margin-bottom: 10px;
}
[data-theme="light"] .discord-about-text { color: #313338; }

.discord-member-text {
  font-size: 0.8rem;
  color: #dbdee1;
  margin-bottom: 10px;
}
[data-theme="light"] .discord-member-text { color: #313338; }

/* Spotify */
.discord-spotify {
  display: flex;
  gap: 10px;
  background: rgba(30,215,96,0.07);
  border: 1px solid rgba(30,215,96,0.18);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}
.discord-spotify-art {
  width: 56px; height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.discord-spotify-info { flex: 1; min-width: 0; }
.discord-spotify-song {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f2f3f5;
}
[data-theme="light"] .discord-spotify-song { color: #060607; }
.discord-spotify-artist, .discord-spotify-album {
  font-size: 0.68rem;
  color: #b5bac1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discord-spotify-bar-bg {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.12);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}
.discord-spotify-bar-fill {
  height: 100%;
  background: #1ED760;
  border-radius: 99px;
  transition: width 1s linear;
  width: 0%;
}

/* Generic Activity */
.discord-generic-activity {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}
[data-theme="light"] .discord-generic-activity {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}
.discord-activity-img {
  width: 54px; height: 54px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.discord-activity-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f2f3f5;
}
[data-theme="light"] .discord-activity-name { color: #060607; }
.discord-activity-detail,
.discord-activity-state,
.discord-activity-elapsed { font-size: 0.72rem; color: #b5bac1; }

/* Profile button */
.discord-view-profile-btn {
  display: block;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffc2d1, #ff8fab);
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  margin-top: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(255,143,171,0.4);
}
.discord-view-profile-btn:hover {
  background: linear-gradient(135deg, #ffb3c6, #ff758f);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,143,171,0.55);
}

/* Live badge */
.discord-live-badge {
  position: absolute;
  top: 8px; right: 10px;
  font-size: 0.58rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  background: linear-gradient(135deg, rgba(255,194,209,0.85), rgba(255,143,171,0.85));
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(255,143,171,0.4);
}
.discord-live-dot {
  width: 5px; height: 5px;
  background: #fff;
  border-radius: 50%;
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.65); }
}

/* Offline */
.discord-offline-block {
  text-align: center;
  padding: 10px 0 4px;
  color: #b5bac1;
  font-size: 0.8rem;
}

/* ── Avatar Decoration Overlay ── */
.discord-avatar-deco {
  position: absolute;
  width: calc(100% + 22px);
  height: calc(100% + 22px);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
  object-fit: contain;
}

/* ── Nameplate background (collectible) ── */
.discord-nameplate-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: 0; /* covers the info section */
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}
.discord-info-wrap {
  position: relative;
  padding: 0 14px 14px;
  overflow: hidden;
}

/* ── Display name gradient ── */
.discord-display-name.has-gradient {
  background: var(--dn-gradient, linear-gradient(90deg, #fff, #eee));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Name + badges row ── */
.discord-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1px;
}
.discord-clan-tag {
  font-size: 0.62rem;
  font-weight: 700;
  color: #b5bac1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 1px 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}
.discord-clan-tag img {
  width: 14px; height: 14px;
  border-radius: 2px;
  object-fit: contain;
}
[data-theme="light"] .discord-clan-tag {
  color: #4e5058;
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.1);
}
.discord-badges-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.discord-badge-icon {
  width: 20px; height: 20px;
  object-fit: contain;
  cursor: default;
  transition: transform 0.15s;
}
.discord-badge-icon:hover { transform: scale(1.3); }

/* ── HypeSquad / platform icons row ── */
.discord-platform-row {
  display: flex; gap: 5px;
  margin-bottom: 4px;
}
.discord-platform-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
}

/* ── Nameplate-palette: bubble_gum ── */
.nameplate-bubble_gum .discord-banner {
  background: linear-gradient(135deg, #ffb3d9 0%, #ffc2d1 40%, #ff8fab 100%) !important;
}
.nameplate-bubble_gum .discord-view-profile-btn {
  background: linear-gradient(135deg, #ff94c4, #ff6eab) !important;
}



/* ─── Discord Window Mockup (Desktop only) ─────────────────────────────── */
.discord-window {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  background: #1e1f22;
  min-height: 600px;
}
[data-theme="light"] .discord-window {
  box-shadow: 0 32px 80px rgba(0,0,0,0.25);
  border-color: rgba(0,0,0,0.08);
}

/* Titlebar */
.discord-titlebar {
  background: #111214;
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.discord-titlebar-dots {
  display: flex; gap: 6px; align-items: center;
}
.discord-titlebar-dots span {
  width: 11px; height: 11px; border-radius: 50%;
}
.discord-titlebar-title {
  font-size: 0.72rem;
  color: #b5bac1;
  font-weight: 600;
  margin: 0 auto;
}

/* Window body */
.discord-window-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Server sidebar */
.discord-server-sidebar {
  width: 72px;
  background: #1e1f22;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.discord-server-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #313338;
  display: flex; align-items: center; justify-content: center;
  color: #b5bac1;
  cursor: pointer;
  transition: border-radius 0.2s, background 0.2s, color 0.2s;
  font-size: 0.9rem;
  position: relative;
}
.discord-server-icon::before {
  content: '';
  position: absolute;
  left: -12px;
  width: 4px; height: 0;
  background: #fff;
  border-radius: 0 4px 4px 0;
  transition: height 0.2s;
}
.discord-server-icon--active {
  background: linear-gradient(135deg, #ffc2d1, #ff8fab);
  color: #fff;
  border-radius: 30%;
}
.discord-server-icon--active::before { height: 40px; }
.discord-server-icon:hover:not(.discord-server-icon--active) {
  border-radius: 30%;
  background: #ffc2d1;
  color: #fff;
}
.discord-server-icon:hover::before { height: 20px; }
.discord-server-icon--add {
  background: #313338;
  color: #23a55a;
}
.discord-server-icon--add:hover { background: #23a55a; color: #fff; }
.discord-server-divider {
  width: 32px; height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 1px;
  margin: 2px 0;
}

/* Server icon as link with favicon */
a.discord-server-icon {
  text-decoration: none;
}

/* Favicon-based icons: always squircle (Discord's server icon style) */
.discord-server-icon--img {
  padding: 0;
  overflow: hidden !important;
  border-radius: 22% !important;  /* Discord squircle — consistent always */
  transition: border-radius 0.2s, transform 0.15s, box-shadow 0.15s;
}
.discord-server-icon--img::before {
  display: none !important; /* hide the left indicator bar for img icons */
}
.discord-server-icon--img:hover {
  border-radius: 30% !important;
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(255,194,209,0.3);
}
.discord-server-icon--img.discord-server-icon--active {
  border-radius: 30% !important;
}
.discord-server-icon--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.discord-server-icon--img i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1rem;
}






/* Channel sidebar */
.discord-channel-sidebar {
  width: 220px;
  background: #2b2d31;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.04);
  overflow-y: auto;
}
.discord-server-name {
  padding: 16px 16px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #f2f3f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.discord-channel-category {
  padding: 16px 6px 4px 8px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #80848e;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}
.discord-channel-item {
  padding: 5px 8px;
  margin: 1px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #80848e;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.discord-channel-item:hover { background: rgba(255,255,255,0.06); color: #dbdee1; }
.discord-channel-item--active { background: rgba(255,255,255,0.1); color: #f2f3f5; }
.discord-channel-icon { font-size: 0.8rem; width: 14px; flex-shrink: 0; }

/* User panel */
.discord-user-panel {
  margin-top: auto;
  background: #232428;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.discord-panel-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.discord-panel-info { flex: 1; min-width: 0; }
.discord-panel-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f2f3f5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.discord-panel-tag {
  display: block;
  font-size: 0.65rem;
  color: #b5bac1;
}
.discord-panel-icons {
  display: flex; gap: 6px;
  color: #b5bac1; font-size: 0.85rem;
}
.discord-panel-icons i { cursor: pointer; transition: color 0.15s; }
.discord-panel-icons i:hover { color: #f2f3f5; }

/* Chat area */
.discord-chat-area {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 292px; /* 72px + 220px */
  right: 340px;
  display: flex;
  flex-direction: column;
  background: #313338;
  overflow: hidden;
}
.discord-chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: #313338;
}
.discord-messages {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.discord-messages::-webkit-scrollbar { width: 4px; }
.discord-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
[data-theme="light"] .discord-messages { scrollbar-color: rgba(0,0,0,0.1) transparent; }
[data-theme="light"] .discord-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }
.discord-msg-system {
  font-size: 0.72rem;
  color: #80848e;
  padding: 2px 0 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 10px;
}
.discord-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 2px 0;
}
.discord-msg:hover { background: rgba(255,255,255,0.02); border-radius: 4px; }
.discord-msg-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
}
.discord-msg-body { flex: 1; min-width: 0; }
.discord-msg-meta {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 2px;
}
.discord-msg-author { font-size: 0.88rem; font-weight: 700; }
.discord-msg-tag {
  font-size: 0.58rem; font-weight: 700;
  padding: 1px 4px; border-radius: 3px;
  color: #fff; letter-spacing: 0.03em;
}
.discord-msg-time { font-size: 0.65rem; color: #80848e; }
.discord-msg-text {
  font-size: 0.85rem;
  color: #dbdee1;
  line-height: 1.45;
}
.discord-embed {
  display: flex;
  margin-top: 6px;
  border-radius: 6px;
  overflow: hidden;
  background: #2b2d31;
  max-width: 380px;
}
.discord-embed-bar { width: 4px; flex-shrink: 0; }
.discord-embed-body { padding: 10px 12px; }
.discord-embed-title { font-size: 0.82rem; font-weight: 700; color: #f2f3f5; margin-bottom: 4px; }
.discord-embed-desc { font-size: 0.75rem; color: #b5bac1; }
.discord-embed-desc code {
  background: rgba(255,255,255,0.08);
  padding: 1px 4px; border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
}
/* ── AGH Live DNS Log — Webhook style ── */
.discord-msg--agh {
  padding-top: 2px;
  margin-top: 0;
  display: block;   /* override flex so entries stack */
  padding: 0;
}
.discord-msg--agh .discord-msg-body {
  width: 100%;
}

/* Scrollable container holding all webhook messages */
.discord-agh-entries {
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.discord-agh-entries::-webkit-scrollbar { width: 3px; }
.discord-agh-entries::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* Header line (shown once, above messages) */
.discord-agh-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 16px 2px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #80848e;
  letter-spacing: 0.04em;
}
.discord-agh-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #23a55a;
  box-shadow: 0 0 5px #23a55a;
  animation: aghPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes aghPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.discord-agh-badge {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 600;
  color: #80848e;
}

/* Each blocked entry = a Discord webhook message */
.discord-agh-msg {
  display: flex;
  gap: 12px;
  padding: 3px 16px;
  animation: aghFadeIn 0.25s ease;
}
@keyframes aghFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.discord-agh-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f23f43, #b01c20);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.discord-agh-msg-body { flex: 1; min-width: 0; }
.discord-agh-msg-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}
.discord-agh-botname {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}
.discord-agh-app-badge {
  font-size: 0.55rem;
  font-weight: 700;
  background: #5865f2;
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.discord-agh-msg-time {
  font-size: 0.65rem;
  color: #80848e;
}
/* The embed inside the webhook message */
.discord-agh-msg-embed {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid #f23f43;
  border-radius: 0 4px 4px 0;
  padding: 6px 10px;
  max-width: 340px;
}
.discord-agh-msg-embed-icon { font-size: 0.9rem; flex-shrink: 0; }
.discord-agh-msg-embed-domain {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: #f23f43;
  word-break: break-all;
  line-height: 1.4;
}
.discord-agh-placeholder {
  padding: 8px 16px;
  font-size: 0.72rem;
  color: #4e5058;
}

.discord-chat-input {
  margin: 0 16px 16px;
  background: #383a40;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.discord-chat-placeholder { font-size: 0.85rem; color: #6d6f78; flex: 1; }

/* Profile popup column */
.discord-profile-popup-wrap {
  width: 340px;
  flex-shrink: 0;
  background: #1e1f22;
  border-left: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  overflow-y: auto;
  margin-left: auto;
}
.discord-profile-popup-wrap .discord-profile-card {
  width: 100%;
  max-width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.discord-profile-popup-wrap .discord-profile-card:hover {
  transform: none;
}


/* ── Wiki nav: Discord component action row (exact Discord specs) ── */
.wiki-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.wiki-nav-btn {
  /* Discord ButtonStyle.Secondary exact spec */
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #4e5058;
  color: #fff;
  border: none;
  outline: none;
  border-radius: 4px;
  padding: 2px 16px;
  min-height: 38px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Outfit', 'gg sans', 'Whitney', sans-serif;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.17s ease, opacity 0.17s ease;
  box-sizing: border-box;
  gap: 6px;
}
.wiki-nav-btn:hover {
  background: #6d6f78;
}
.wiki-nav-btn:active {
  background: #4e5058;
  opacity: 0.7;
}
.wiki-day-label {
  /* non-interactive display pill */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 2px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: #b5bac1;
  letter-spacing: 0.04em;
  min-width: 48px;
  user-select: none;
}

