@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
  --app-bg: #060818;
  --app-bg-2: #0e1726;
  --app-surface: #192a3e;
  --app-border: #1b2e4b;
  --app-accent: #4361ee;
  --app-accent-2: #38bdf8;
  --app-success: #00ab55;
  --app-muted: #888ea8;
  --app-text: #e0e6ed;
  --app-text-dim: #bfc9d4;
  --sidebar-width: 280px;
  --header-height: 56px;
  --hover-overlay: rgba(255,255,255,0.07);
  --hover-overlay-2: rgba(255,255,255,0.1);
}

[data-theme="light"] {
  --app-bg: #f0f2f8;
  --app-bg-2: #ffffff;
  --app-surface: #e8ecf4;
  --app-border: #d5dae8;
  --app-accent: #4361ee;
  --app-accent-2: #0284c7;
  --app-success: #00ab55;
  --app-muted: #6b7280;
  --app-text: #1e293b;
  --app-text-dim: #374151;
  --hover-overlay: rgba(0,0,0,0.04);
  --hover-overlay-2: rgba(0,0,0,0.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--app-bg);
  color: var(--app-text);
  font-size: 14px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--app-bg-2); }
::-webkit-scrollbar-thumb { background: var(--app-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--app-accent); }

.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--app-bg-2);
  border-right: 1px solid var(--app-border);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto; overflow-x: hidden;
  z-index: 50;
  display: flex; flex-direction: column;
  transition: transform 0.3s ease;
}
.sidebar.mobile-hidden { transform: translateX(-100%); }
.sidebar-brand { padding: 20px 16px 16px; border-bottom: 1px solid var(--app-border); display: flex; align-items: center; justify-content: center; }
.sidebar-brand-text { display: flex; align-items: center; gap: 10px; }
.sidebar-logo-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent;
}
.brand-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sidebar-brand-name { font-size: 18px; font-weight: 800; color: var(--app-text); line-height: 1.2; }
.sidebar-brand-sub { font-size: 11px; color: var(--app-muted); font-weight: 500; }
.sidebar-actions { padding: 12px 16px; border-bottom: 1px solid var(--app-border); display: flex; flex-direction: column; gap: 8px; }
.sidebar-nav { padding: 12px 16px; flex: 1; }
.sidebar-nav ul { display: flex; flex-direction: column; gap: 2px; }
.nav-item { border-radius: 8px; overflow: hidden; }
.nav-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: 8px;
  color: var(--app-muted); font-weight: 600; font-size: 13px;
  transition: background 0.2s, color 0.2s; cursor: pointer; width: 100%;
}
.nav-link:hover, .nav-link.active { background: rgba(67, 97, 238, 0.15); color: var(--app-accent); }
.nav-link-inner { display: flex; align-items: center; gap: 10px; }
.nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-arrow { transition: transform 0.25s; }
.nav-arrow.open { transform: rotate(90deg); }
.sub-menu { padding: 4px 0 4px 28px; display: flex; flex-direction: column; gap: 2px; }
.sub-menu li a, .sub-menu li span { display: block; padding: 7px 12px; border-radius: 6px; color: var(--app-muted); font-size: 12.5px; font-weight: 500; transition: background 0.2s, color 0.2s; }
.sub-menu li a:hover { background: rgba(67, 97, 238, 0.1); color: var(--app-accent-2); }
.sub-menu-wrapper { overflow: hidden; max-height: 0; transition: max-height 0.3s ease; }
.sub-menu-wrapper.open { max-height: 300px; }

.btn-min {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s ease;
  background: linear-gradient(135deg, var(--app-accent), #7c3aed); color: #fff; border: none; letter-spacing: 0.3px;
}
.btn-min:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4); }
.btn-ghost-min {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
  background: var(--hover-overlay); color: var(--app-text-dim); border: 1px solid var(--app-border);
}
.btn-ghost-min:hover { background: var(--hover-overlay-2); color: var(--app-text); }
.btn-success {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s ease;
  background: var(--app-success); color: #fff; border: none;
}
.btn-success:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,171,85,0.4); }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 49; }
.sidebar-overlay.visible { display: block; }

.main-content { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-height: 100vh; transition: margin-left 0.3s ease; }

.site-header {
  height: var(--header-height); background: var(--app-bg-2); border-bottom: 1px solid var(--app-border);
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; padding: 0 20px; gap: 12px;
  backdrop-filter: blur(8px);
}
.hamburger-btn { display: none; padding: 6px; border-radius: 8px; color: var(--app-text); transition: background 0.2s; }
.hamburger-btn:hover { background: var(--hover-overlay); }
.mobile-logo { display: none; align-items: center; gap: 8px; }
.mobile-logo-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent;
}
.mobile-logo-text { font-weight: 800; font-size: 15px; }
.header-spacer { flex: 1; min-width: 0; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-login-btn {
  padding: 7px 14px;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}
.header-login-btn-icon { display: none; flex-shrink: 0; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--app-text-dim); transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--hover-overlay); color: var(--app-text); }

.content-shell { padding: 24px; flex: 1; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title-group { display: flex; flex-direction: column; gap: 2px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; color: var(--app-text); }
.section-title-icon { color: var(--app-success); width: 18px; height: 18px; flex-shrink: 0; }
.section-subtitle { color: var(--app-muted); font-size: 13px; font-weight: 500; margin-top: 3px; }

.hero-slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
  background: var(--app-surface);
  height: 300px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
@media (min-width: 640px)  { .hero-slider { height: 340px; } }
@media (min-width: 768px)  { .hero-slider { height: 380px; } }
@media (min-width: 1024px) { .hero-slider { height: 420px; } }

.slider-track { display: flex; height: 100%; transition: transform 0.5s cubic-bezier(0.4,0,0.2,1); }
.slider-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #060818;
}
.slider-slide-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #060818;
  overflow: hidden;
}
.slider-slide-bg {
  user-select: none;
  pointer-events: none;
}
/* Mobile / tablet: banner phủ khung */
@media (max-width: 1023px) {
  .slider-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
  }
  .slider-overlay {
    background: linear-gradient(to top, rgba(6, 8, 24, 0.82) 0%, rgba(6, 8, 24, 0.15) 45%, transparent 68%);
  }
}
/* Desktop: poster vuông giữa, hiển thị trọn artwork */
@media (min-width: 1024px) {
  .slider-slide-bg {
    position: relative;
    width: auto;
    height: auto;
    max-height: min(82%, 320px);
    max-width: min(82%, 320px);
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 14px;
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.45),
      0 0 0 1px rgba(255, 255, 255, 0.08);
  }
  .slider-overlay {
    background: linear-gradient(to top, rgba(6, 8, 24, 0.75) 0%, transparent 55%);
  }
}
.slider-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.slider-caption {
  position: absolute;
  bottom: 28px;
  left: 28px;
  right: 60px;
  z-index: 2;
  user-select: none;
}
.slider-caption-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
.slider-caption-sub {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.slider-btn:hover { background: rgba(67, 97, 238, 0.8); }
.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }
.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 6px;
}
.slider-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.35); transition: background 0.2s, transform 0.2s; cursor: pointer; border: none;
}
.slider-dot.active { background: var(--app-accent); transform: scale(1.2); }

.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 20px; }
@media (min-width: 1024px) { .news-grid { grid-template-columns: repeat(4, 1fr); } }
a.news-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.news-card {
  background: var(--app-bg-2); border: 1px solid var(--app-border); border-radius: 12px;
  overflow: hidden; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; cursor: pointer;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); border-color: var(--app-accent); }
.news-card-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--app-surface); }
.news-card-body { padding: 12px; }
.news-card-tag { font-size: 10px; font-weight: 700; color: var(--app-success); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.news-card-title {
  font-size: 13px; font-weight: 700; color: var(--app-text); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-date { font-size: 11px; color: var(--app-muted); margin-top: 8px; }

.load-more-wrap { display: flex; justify-content: center; margin-top: 24px; }
.news-grid--list { margin-bottom: 8px; }
.news-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--app-muted);
  font-size: 14px;
  font-weight: 600;
  border: 1px dashed var(--app-border);
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.05);
}
.news-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.news-pagination-info {
  font-size: 13px;
  font-weight: 600;
  color: var(--app-muted);
}

.content-shell--news-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 48px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, color-mix(in srgb, var(--app-accent) 12%, transparent), transparent 70%),
    var(--app-bg);
}
.news-detail-fallback {
  padding: 4px 0 0;
}
.news-detail-fallback .news-empty {
  margin-top: 20px;
}
.news-detail-back {
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.news-detail-back--hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 9px 16px 9px 12px;
  font-size: 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}
.news-detail-back--hero:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateX(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}
.news-detail-back--body {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px 11px 16px;
  font-size: 14px;
  color: var(--news-accent);
  background: color-mix(in srgb, var(--news-accent) 12%, var(--app-bg-2));
  border: 1px solid color-mix(in srgb, var(--news-accent) 38%, var(--app-border));
  border-radius: 12px;
}
.news-detail-back--body:hover {
  color: #fff;
  background: var(--news-accent);
  border-color: var(--news-accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--news-accent) 45%, transparent);
}

/* Editorial: một card hero + nội dung liền khối */
.news-article--editorial {
  --news-accent: var(--app-accent);
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-article-sheet {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: min(520px, calc(100vh - var(--header-height) - 140px));
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--app-border);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.35);
  background: var(--app-bg-2);
}
[data-theme="light"] .news-article-sheet {
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}
.news-article-hero {
  position: relative;
  flex-shrink: 0;
  padding: 22px 26px 28px;
  overflow: hidden;
}
@media (min-width: 768px) {
  .news-article-hero {
    padding: 28px 36px 32px;
  }
}
.news-article-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--news-accent) 65%, #1a1040) 0%,
    color-mix(in srgb, var(--news-accent) 35%, #0a1020) 48%,
    #060818 100%
  );
}
.news-article-hero-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  width: 120%;
  height: 200%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at 50% 30%,
    color-mix(in srgb, var(--news-accent) 55%, transparent),
    transparent 55%
  );
  opacity: 0.7;
  pointer-events: none;
}
.news-article-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
}
.news-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
}
.news-article--editorial .news-article-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.news-article--editorial .news-article-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}
.news-article-date-icon {
  opacity: 0.9;
  flex-shrink: 0;
}
.news-article--editorial .news-article-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 800;
  color: #fff;
  line-height: 1.28;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}
.news-article--editorial .news-article-lead {
  margin: 0;
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}
.news-article--editorial .news-article-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 28px 26px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--app-text-dim);
  background: var(--app-bg-2);
  border-top: 1px solid color-mix(in srgb, var(--news-accent) 18%, var(--app-border));
}
.news-article-prose {
  flex: 1;
  width: 100%;
  max-width: 100%;
  font-size: 15px;
  line-height: 1.88;
  color: var(--app-text-dim);
}
.news-article-prose > p {
  max-width: 62ch;
}
.news-article-prose p {
  margin: 0 0 1.1em;
}
.news-article-prose p:last-child {
  margin-bottom: 0;
}
.news-article-prose a {
  color: var(--news-accent, var(--app-accent));
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.news-article-prose a:hover {
  opacity: 0.88;
}
.news-article-prose strong {
  color: var(--app-text);
  font-weight: 800;
}
.news-article-figure {
  margin: 1.35em 0;
  width: 100%;
  max-width: 100%;
  text-align: center;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--app-border);
  background: color-mix(in srgb, var(--app-bg) 55%, var(--app-border));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.news-article-figure:first-child {
  margin-top: 0;
}
.news-article-inline-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: clamp(200px, 42vh, 440px);
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.news-article-figcaption {
  margin-top: 0;
  padding: 10px 14px 12px;
  max-width: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--app-muted);
  line-height: 1.45;
  border-top: 1px solid color-mix(in srgb, var(--app-border) 80%, transparent);
  background: color-mix(in srgb, var(--app-bg-2) 92%, transparent);
}
.news-article-body-foot {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--app-border);
  display: flex;
  justify-content: center;
}
@media (min-width: 768px) {
  .news-article--editorial .news-article-body {
    padding: 28px 36px 30px;
  }
}

@media (max-width: 640px) {
  .main-content .content-shell--news-detail {
    padding: 12px 12px 32px;
  }
  .news-article-sheet {
    min-height: 0;
    border-radius: 16px;
  }
  .news-article-hero {
    padding: 18px 18px 22px;
  }
  .news-article--editorial .news-article-body {
    padding: 20px 18px 24px;
  }
  .news-article-inline-img {
    max-height: clamp(160px, 36vh, 300px);
  }
  .news-article--editorial .news-article-title {
    font-size: 21px;
  }
}

.giftcode-page-body {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}
.topup-shell {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}
.topup-header {
  margin-bottom: 20px;
}
.topup-page {
  width: 100%;
}
.topup-grid {
  display: grid;
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
  gap: 16px;
  align-items: start;
}
.topup-page.is-qr-ready .topup-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}
.topup-qr-panel[hidden] {
  display: none !important;
}
.topup-qr-panel {
  animation: topupQrIn 0.25s ease;
}
@keyframes topupQrIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.topup-qr-amount {
  margin: -8px 0 14px;
  font-size: 22px;
  font-weight: 800;
  color: var(--app-success);
}
.topup-panel {
  background: var(--app-bg-2);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: 22px;
}
.topup-char {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(67, 97, 238, 0.12);
  border: 1px solid rgba(67, 97, 238, 0.28);
}
.topup-char--warn {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
}
.topup-char-label {
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-muted);
}
.topup-char-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--app-text);
}
.topup-char-meta {
  font-size: 13px;
  color: var(--app-accent-2);
  font-weight: 700;
}
.topup-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--app-text-dim);
}
.topup-amount-box {
  position: relative;
}
.topup-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 72px 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--app-border);
  background: var(--app-bg);
  color: var(--app-text);
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  outline: none;
}
.topup-input:focus {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}
.topup-amount-unit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 800;
  color: var(--app-muted);
}
.topup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.topup-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--app-border);
  background: var(--app-bg);
  color: var(--app-text-dim);
  font-size: 13px;
  font-weight: 700;
}
.topup-chip:hover,
.topup-chip.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--app-accent), #7c3aed);
  color: #fff;
}
.topup-min {
  margin: 10px 0 18px;
  font-size: 12px;
  color: var(--app-muted);
}
.topup-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.topup-field {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--app-bg);
  border: 1px solid var(--app-border);
}
.topup-field--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
}
.topup-field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-muted);
  margin-bottom: 4px;
}
.topup-field-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--app-text);
  word-break: break-all;
}
.topup-memo {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 171, 85, 0.1);
  border: 1px solid rgba(0, 171, 85, 0.35);
}
.topup-memo strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--app-success);
}
.topup-copy {
  flex-shrink: 0;
}
.topup-field .topup-copy {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--app-border);
  background: var(--hover-overlay);
  color: var(--app-text-dim);
  font-size: 12px;
  font-weight: 700;
}
.topup-field .topup-copy:hover {
  color: var(--app-text);
}
.topup-qr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(67, 97, 238, 0.22), transparent 55%),
    var(--app-bg-2);
}
.topup-qr-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-accent-2);
  margin-bottom: 4px;
}
.topup-qr-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}
.topup-qr-stage {
  width: min(100%, 280px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.topup-qr-image {
  width: 100%;
  height: auto;
  display: block;
}
.topup-qr-caption {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--app-text-dim);
  max-width: 320px;
}
.topup-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  list-style: none;
}
.topup-steps p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--app-bg-2);
  border: 1px solid var(--app-border);
  color: var(--app-text-dim);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
.topup-steps span {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--app-accent), #7c3aed);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.topup-page:not(.is-qr-ready) .topup-steps {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  grid-template-columns: 1fr;
}
.topup-input::-webkit-outer-spin-button,
.topup-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.topup-input {
  -moz-appearance: textfield;
  appearance: textfield;
}
@media (max-width: 860px) {
  .topup-page.is-qr-ready .topup-grid,
  .topup-grid {
    grid-template-columns: minmax(0, 560px);
  }
  .topup-steps {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .topup-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .topup-header .section-title {
    justify-content: center;
  }
  .topup-panel {
    padding: 16px;
    border-radius: 14px;
  }
  .topup-char {
    justify-content: center;
    text-align: center;
  }
  .topup-input {
    font-size: 20px;
    padding: 13px 64px 13px 14px;
  }
  .topup-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .topup-chip {
    padding: 9px 4px;
  }
  .topup-min {
    text-align: center;
  }
  .topup-fields {
    grid-template-columns: 1fr;
  }
  .topup-field--wide {
    grid-column: auto;
  }
  .topup-memo {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .topup-memo .topup-copy {
    width: 100%;
  }
  .topup-qr-stage {
    width: min(100%, 300px);
  }
}
.giftcode-hint {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--app-border);
  background: var(--app-bg-2);
  font-size: 14px;
  line-height: 1.55;
  color: var(--app-text-dim);
}
.giftcode-hint p { margin: 0 0 8px; }
.giftcode-hint p:last-child { margin-bottom: 0; }
.giftcode-hint-sub { font-size: 13px; color: var(--app-muted); }
.giftcode-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 900px) {
  .giftcode-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.giftcode-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--app-bg-2);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  padding: 16px 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.giftcode-card:hover {
  border-color: rgba(67, 97, 238, 0.45);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}
.giftcode-card-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
}
.giftcode-card-code {
  display: block;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(67, 97, 238, 0.4);
  background: rgba(67, 97, 238, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--app-accent-2);
  word-break: break-all;
}
.giftcode-copy-btn {
  padding: 8px 14px !important;
  font-size: 12px !important;
  white-space: nowrap;
}
.giftcode-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--app-muted);
}
.giftcode-meta-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  line-height: 1.3;
}
.giftcode-meta-pill--count {
  color: var(--app-success);
  border-color: rgba(0, 171, 85, 0.25);
  background: rgba(0, 171, 85, 0.08);
}
.giftcode-rewards {
  margin: 0;
}
.giftcode-reward-chips {
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
}
.giftcode-reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 2px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--app-text);
  line-height: 1.3;
}
.giftcode-reward-chip--currency {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(67, 97, 238, 0.1);
}
.giftcode-reward-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}
.giftcode-reward-text strong {
  margin-left: 4px;
  font-weight: 800;
  color: var(--app-accent-2);
}
@media (max-width: 520px) {
  .giftcode-card-row {
    grid-template-columns: 1fr;
  }
  .giftcode-copy-btn {
    width: 100%;
    justify-content: center;
  }
}

.site-footer {
  background: var(--app-bg-2); border-top: 1px solid var(--app-border);
  padding: 16px 24px; display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px; font-size: 12px; font-weight: 600;
}
.footer-left span:first-child { color: var(--app-muted); }
.footer-left span.year { color: var(--app-accent-2); font-weight: 700; margin: 0 2px; }
.footer-left span:last-child { color: var(--app-muted); }
.footer-right span { color: var(--app-muted); }
.footer-right a { color: var(--app-accent); font-weight: 700; transition: opacity 0.2s; }
.footer-right a:hover { opacity: 0.75; }

.screen-loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--app-bg); display: grid; place-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.screen-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content { display: flex; flex-direction: column; align-items: center; gap: 0; position: relative; }
.loader-title { margin-top: 22px; font-size: 22px; font-weight: 800; letter-spacing: 1px; background: linear-gradient(90deg, var(--app-accent), var(--app-accent-2), var(--app-success)); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: shimmerText 2.5s linear infinite; }
.loader-sub { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--app-muted); letter-spacing: 0.5px; animation: fadeFlicker 1.8s ease-in-out infinite; }
.loader-bar-track { margin-top: 20px; width: 160px; height: 3px; border-radius: 99px; background: var(--hover-overlay); overflow: hidden; }
.loader-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--app-accent), var(--app-accent-2), var(--app-success)); background-size: 200% auto; animation: progressBar 1.2s ease-in-out infinite, shimmerText 1.5s linear infinite; }

@keyframes spinRing { to { transform: rotate(360deg); } }
@keyframes ringPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(67,97,238,0); } 50% { box-shadow: 0 0 20px 4px rgba(67,97,238,0.15); } }
@keyframes logoBounce { 0%, 100% { transform: translate(-50%, -55%) scale(1); } 50% { transform: translate(-50%, -60%) scale(1.08); } }
@keyframes shimmerText { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }
@keyframes fadeFlicker { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes progressBar { 0% { width: 0%; } 60% { width: 85%; } 100% { width: 100%; } }

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .hamburger-btn { display: flex; flex-shrink: 0; }
  .mobile-logo {
    display: flex;
    min-width: 0;
    flex: 1;
    max-width: min(168px, 42vw);
  }
  .mobile-logo-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .site-header { padding: 0 12px; gap: 8px; }
  .header-actions { gap: 6px; }
  .header-login-btn { padding: 7px 12px; font-size: 12px; letter-spacing: 0; }
}

@media (max-width: 420px) {
  .header-login-btn-text { display: none; }
  .header-login-btn-icon { display: block; }
  .header-login-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
  }
  .mobile-logo { max-width: min(160px, 44vw); }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.animate-fadein { animation: fadeIn 0.4s ease both; }
@keyframes iconSpin { 0% { transform: rotate(-30deg) scale(0.7); opacity: 0; } 100% { transform: rotate(0deg) scale(1); opacity: 1; } }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.visible {
  display: flex;
  animation: backdropIn 0.2s ease;
}
@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--app-bg-2); border: 1px solid var(--app-border); border-radius: 16px;
  width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  animation: modalSlideIn 0.25s cubic-bezier(0.34, 1.2, 0.64, 1); overflow: hidden;
}
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid var(--app-border); }
.modal-title { font-size: 18px; font-weight: 800; color: var(--app-text); }
.modal-close-btn {
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--app-muted); transition: background 0.2s, color 0.2s; flex-shrink: 0;
}
.modal-close-btn:hover { background: var(--hover-overlay-2); color: var(--app-text); }
.modal-form { padding: 20px 24px 8px; display: flex; flex-direction: column; gap: 12px; }
.modal-field { position: relative; display: flex; align-items: center; border: 1px solid var(--app-border); border-radius: 10px; background: var(--app-bg); transition: border-color 0.2s, box-shadow 0.2s; overflow: hidden; }
.modal-field:focus-within { border-color: var(--app-accent); box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12); }
.modal-field-icon { padding: 0 10px 0 14px; color: var(--app-muted); display: flex; align-items: center; flex-shrink: 0; pointer-events: none; }
.modal-input { flex: 1; padding: 12px 10px 12px 0; background: transparent; border: none; outline: none; color: var(--app-text); font-family: inherit; font-size: 14px; font-weight: 500; }
.modal-input::placeholder { color: var(--app-muted); font-weight: 400; }
.modal-pass-toggle { padding: 0 14px 0 8px; color: var(--app-muted); display: flex; align-items: center; transition: color 0.2s; flex-shrink: 0; }
.modal-pass-toggle:hover { color: var(--app-text); }
.modal-forgot { display: flex; justify-content: flex-end; margin-top: -4px; }
.modal-forgot-link { font-size: 12.5px; font-weight: 600; color: var(--app-accent); transition: opacity 0.2s; cursor: pointer; }
.modal-forgot-link:hover { opacity: 0.75; }
.modal-submit-btn {
  width: 100%; padding: 12px; border-radius: 10px; background: var(--app-accent);
  color: #fff; font-family: inherit; font-size: 14px; font-weight: 700; border: none; cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s; margin-top: 4px; letter-spacing: 0.3px;
}
.modal-submit-btn:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(67, 97, 238, 0.4); }
.modal-submit-btn:active { transform: translateY(0); }
.modal-footer { text-align: center; padding: 16px 24px 20px; font-size: 13px; color: var(--app-muted); font-weight: 500; }
.modal-register-link { color: var(--app-accent); font-weight: 700; transition: opacity 0.2s; cursor: pointer; }
.modal-register-link:hover { opacity: 0.75; }

.user-profile-menu { display: flex; align-items: center; gap: 8px; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--app-accent), var(--app-success));
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; color: #fff; font-size: 12px; text-transform: uppercase;
}
.user-name { font-size: 13px; font-weight: 600; color: var(--app-text); }

/* ─── User Account Button (Header) ─── */
.user-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 10px;
  background: var(--hover-overlay);
  border: 1px solid var(--app-border);
  color: var(--app-text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.user-account-btn:hover {
  background: var(--hover-overlay-2);
  color: var(--app-text);
  border-color: var(--app-accent);
  transform: translateY(-1px);
}
.user-account-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--app-accent), var(--app-success));
  color: #fff;
  flex-shrink: 0;
}
.user-account-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}
.user-account-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--app-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}
.user-account-coin {
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .user-account-name {
    max-width: 60px;
  }
  .user-account-coin {
    font-size: 10px;
  }
}

/* ─── Profile Page ─── */
.profile-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.profile-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--app-bg-2);
  border: 1px solid var(--app-border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.profile-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}
.profile-avatar-wrap > .profile-btn {
  margin-left: auto;
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--app-accent), var(--app-success));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.profile-avatar-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-username {
  font-size: 18px;
  font-weight: 800;
  color: var(--app-text);
  line-height: 1.2;
}
.profile-rank {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
}
.rank-0 {
  background: rgba(67,97,238,0.12);
  color: var(--app-accent);
}
.rank-1 {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}

.profile-divider {
  border: none;
  border-top: 1px solid var(--app-border);
  margin: 16px 0;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}
.profile-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.profile-row--gmail {
  align-items: flex-start;
}
.profile-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--app-muted);
}
.profile-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--app-text);
  text-align: right;
  word-break: break-all;
}
.profile-value--email {
  color: var(--app-accent-2);
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.profile-btn--ghost {
  background: var(--hover-overlay);
  color: var(--app-text-dim);
  border: 1px solid var(--app-border);
}
.profile-btn--ghost:hover {
  background: var(--hover-overlay-2);
  color: var(--app-text);
  border-color: var(--app-accent);
}
.profile-btn--primary {
  background: linear-gradient(135deg, var(--app-accent), #7c3aed);
  color: #fff;
  border: none;
}
.profile-btn--primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(67,97,238,0.4);
}

.profile-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
  .profile-logout-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
  }

  /* Gmail verification section */
  #verify-code-wrap {
    display: none;
    margin-top: 8px;
  }
  #send-verification-btn {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  #send-verification-btn:hover {
    background: var(--hover-overlay-2);
    border-color: var(--app-accent);
    color: var(--app-text);
  }

@media (max-width: 640px) {
  .main-content .content-shell {
    padding: 16px;
  }
  .profile-page-header {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 16px;
    gap: 10px;
  }
  .profile-page-header .section-title {
    font-size: 18px;
  }
  .profile-page-header .btn-ghost-min {
    width: 100%;
    justify-content: center;
  }
  .profile-card {
    margin: 0;
    max-width: none;
    width: 100%;
    padding: 16px;
    border-radius: 14px;
  }
  .profile-avatar-wrap {
    flex-wrap: wrap;
    gap: 12px;
  }
  .profile-avatar-wrap > .profile-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
  }
  .profile-username {
    font-size: 16px;
  }
  .profile-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 0;
  }
  .profile-row .profile-value {
    text-align: left;
  }
  .profile-row .profile-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
  }
  .profile-row--gmail .profile-field {
    width: 100%;
  }
  .profile-value--email {
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
  }
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--app-accent), var(--app-success));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
}
.user-menu-trigger:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(67, 97, 238, 0.35);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  background: var(--app-bg-2);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 300;
  animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.user-dropdown.visible {
  display: flex;
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.user-dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--app-accent), var(--app-success));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.user-dropdown-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.user-dropdown-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--app-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dropdown-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--app-accent-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--app-border);
  margin: 0;
}

.user-dropdown-body {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  gap: 12px;
}
.user-info-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--app-muted);
  white-space: nowrap;
}
.user-info-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--app-text);
  text-align: right;
  word-break: break-all;
}

.user-dropdown-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #ff4d4f;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.user-dropdown-logout:hover {
  background: rgba(255, 77, 79, 0.08);
}

.site-links-body {
  padding: 8px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow: auto;
}
.site-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-bg);
  color: inherit;
  text-decoration: none;
}
.site-link-item:hover { border-color: var(--app-accent); }
.site-link-name { font-weight: 700; font-size: 14px; }
.site-link-tag { font-size: 12px; font-weight: 700; color: var(--app-muted); flex-shrink: 0; }
.site-links-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--app-muted);
  font-size: 14px;
  font-weight: 600;
}
.site-links-empty--idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 4px 0 8px;
  padding: 36px 20px;
  border: 1px dashed var(--app-border);
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.06);
}
.site-links-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--app-border);
  background: var(--app-surface, var(--app-bg));
  color: var(--app-muted);
  opacity: 0.85;
}
.site-links-empty-text {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--app-muted);
}
