@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');
/* AU V44 · Phòng Mix Đồ Audition Online — Compact & Mobile-First Responsive */
:root {
  color-scheme: dark;
  --bg-deep: #090b11;
  --bg-canvas: #0d111a;
  --panel: rgba(18, 23, 36, 0.78);
  --panel-solid: #151b2a;
  --panel-hover: rgba(27, 35, 54, 0.88);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #f8fafc;
  --ink-secondary: #cbd5e1;
  --muted: #8492a6;
  --accent-pink: #f43f5e;
  --accent-magenta: #ec4899;
  --accent-purple: #8b5cf6;
  --accent-cyan: #00f5c4;
  --gold: #fbbf24;
  --grad-brand: linear-gradient(135deg, #f43f5e 0%, #ec4899 45%, #8b5cf6 100%);
  --grad-cyan: linear-gradient(135deg, #00f5c4 0%, #06b6d4 100%);
  --grad-card: linear-gradient(180deg, rgba(26, 33, 50, 0.72) 0%, rgba(16, 21, 33, 0.82) 100%);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  font: 13px/1.5 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 12% 10%, rgba(139, 92, 246, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 88% 5%, rgba(6, 182, 212, 0.12) 0%, transparent 35%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-canvas) 100%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 13, 20, 0.4);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Common Interactive & Font Fallback */
body, button, input, select, textarea {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
button, input, select {
  font: inherit;
}

button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(30, 38, 56, 0.75);
  color: var(--ink);
  padding: 0 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

button:hover {
  background: rgba(45, 56, 82, 0.9);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

input, select {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 18, 28, 0.85);
  color: var(--ink);
  font-size: 12px;
  transition: all 0.18s ease;
}

input:focus, select:focus {
  border-color: var(--accent-cyan);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 245, 196, 0.2);
  background: rgba(18, 24, 38, 0.95);
}

input::placeholder {
  color: rgba(148, 163, 184, 0.55);
}

:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================== TOPBAR ==================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 16, 25, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: scale(1.02);
}

.brand-mark {
  font-size: 13px;
  font-weight: 800;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--grad-brand);
  border-radius: 9px;
  transform: rotate(-4deg);
  box-shadow: 0 3px 12px rgba(244, 63, 94, 0.4);
  letter-spacing: -0.5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
}

.brand-sub {
  font-size: 8.5px;
  letter-spacing: 0.3px;
  font-weight: 600;
  color: var(--accent-cyan);
}

.domain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 9999px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.user-box {
  margin-left: auto;
}

.login-row {
  display: flex;
  align-items: center;
  background: rgba(14, 18, 28, 0.85);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 2px 3px 2px 10px;
  transition: all 0.2s ease;
}

.login-row:focus-within {
  border-color: var(--accent-magenta);
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2);
}

.input-icon {
  color: var(--accent-magenta);
  font-weight: 700;
  font-size: 13px;
  user-select: none;
}

.login-row input {
  border: none;
  background: transparent;
  width: 140px;
  height: 28px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 500;
}

.login-row input:focus {
  outline: none;
  box-shadow: none;
}

.btn-login {
  min-height: 28px;
  height: 28px;
  background: var(--grad-brand);
  border: none;
  color: #fff;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.35);
}

.btn-login:hover {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #9333ea 100%);
}

/* ==================== MAIN LAYOUT ==================== */
main {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px 36px;
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.4fr);
  gap: 20px;
  flex: 1;
}

/* Section Headings */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
}

.sparkle {
  filter: drop-shadow(0 0 4px var(--accent-cyan));
}

h1, h2 {
  font-size: 18px;
  letter-spacing: -0.4px;
  margin: 2px 0 0;
  line-height: 1.2;
  font-weight: 750;
  color: #ffffff;
}

/* ==================== LEFT COLUMN: FITTING ROOM ==================== */
.fitting {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Gender Switch */
.gender {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  background: rgba(14, 18, 28, 0.85);
  border-radius: 9px;
  gap: 3px;
}

.gender button {
  border: 0;
  background: transparent;
  min-width: 48px;
  min-height: 28px;
  height: 28px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 6px;
  transition: all 0.18s ease;
}

.gender button span {
  font-size: 13px;
  line-height: 1;
}

.gender button[aria-pressed=true] {
  background: var(--grad-brand);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
}

.gender button[data-gender="m"][aria-pressed=true] {
  background: var(--grad-cyan);
  color: #0c1a17;
  box-shadow: 0 2px 8px rgba(0, 245, 196, 0.4);
}

/* 3D Stage Box */
.stage {
  position: relative;
  height: clamp(520px, 58vh, 600px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: 
    radial-gradient(ellipse at 50% 25%, rgba(139, 92, 246, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 82%, rgba(0, 245, 196, 0.15) 0%, rgba(139, 92, 246, 0.06) 35%, transparent 68%),
    linear-gradient(180deg, #182030 0%, #101522 100%);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  bottom: 8%;
  left: 20%;
  right: 20%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 245, 196, 0.22) 0%, rgba(139, 92, 246, 0.12) 45%, transparent 75%);
  filter: blur(10px);
  z-index: 1;
}

#avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  z-index: 2;
}

#avatar:active {
  cursor: grabbing;
}

.stage-tag {
  position: absolute;
  left: 12px;
  top: 12px;
  font-size: 9px;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: #e2e8f0;
  background: rgba(15, 20, 32, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 9px;
  border-radius: 9999px;
  z-index: 3;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 5px var(--accent-cyan);
  animation: pulse-glow 1.5s infinite;
}

#render-status {
  position: absolute;
  top: 45px;
  left: 12px;
  right: 12px;
  font-size: 11px;
  color: #e2e8f0;
  pointer-events: none;
  z-index: 3;
  text-align: center;
}

#render-status.loading {
  display: inline-block;
  margin: 0 auto;
  background: rgba(15, 20, 32, 0.85);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent-cyan);
}

/* Outfit Summary Bar - Compact */
.outfit-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  flex-wrap: wrap;
}

.summary-info {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.summary-info strong {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.parts-slots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}

.slot-chip {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  min-height: 28px;
  height: 28px;
  padding: 0 9px;
  font-size: 11px;
  border-radius: 7px;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: var(--line-strong);
}

/* Save Outfit Box - Compact */
.save-box {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.save-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-brand);
}

.save-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.save-box label {
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 600;
}

.badge-mix {
  font-size: 8px;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--accent-magenta);
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.25);
  padding: 1px 6px;
  border-radius: 5px;
}

.save-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.save-row input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 32px;
  font-size: 11.5px;
}

.btn-primary {
  background: var(--grad-brand);
  color: #ffffff;
  border: none;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 0 14px;
  min-height: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(244, 63, 94, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #9333ea 100%);
}

.save-hint {
  font-size: 10px;
  line-height: 1.45;
  color: var(--muted);
  margin: 8px 0 0;
}

#saved-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(0, 245, 196, 0.06);
  border: 1px solid rgba(0, 245, 196, 0.3);
  border-radius: 10px;
}

#saved-code[hidden] {
  display: none;
}

.code-info {
  display: flex;
  flex-direction: column;
}

#saved-code span {
  font-size: 8.5px;
  letter-spacing: 1.2px;
  color: var(--accent-cyan);
  font-weight: 700;
}

#saved-code strong {
  color: #fff;
  font-size: 18px;
  letter-spacing: 1.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-shadow: 0 0 12px rgba(0, 245, 196, 0.4);
}

.btn-copy {
  margin-left: auto;
  background: var(--grad-cyan);
  color: #0d1e19;
  border: none;
  font-size: 11px;
  font-weight: 700;
  padding: 0 12px;
  min-height: 30px;
  height: 30px;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0, 245, 196, 0.35);
}

.btn-copy:hover {
  background: linear-gradient(135deg, #34d399 0%, #22d3ee 100%);
}

/* ==================== RIGHT COLUMN: WARDROBE ==================== */
.wardrobe {
  min-width: 0;
}

.btn-collection {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  min-width: max-content !important;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 11.5px;
  padding: 0 11px;
  min-height: 30px;
  height: 30px;
  border-radius: 8px;
}

.btn-collection:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-magenta);
}

.pill-count {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  background: var(--accent-magenta);
  color: #fff;
  padding: 1px 6px;
  border-radius: 9999px;
}

.pill-count:empty {
  display: none;
}

/* Category Tabs - Horizontal Swipable */
.categories-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  margin-bottom: 10px;
}

.categories-nav::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex-shrink: 0;
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.category-tab:hover {
  background: rgba(35, 45, 70, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.category-tab[aria-pressed=true] {
  background: var(--grad-brand);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(244, 63, 94, 0.35);
}

/* Filters Bar - Compact */
.filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(110px, 0.8fr) minmax(150px, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  font-size: 11px;
  pointer-events: none;
  opacity: 0.65;
}

.search-box input {
  width: 100%;
  padding-left: 28px;
  height: 32px;
  font-size: 11.5px;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 4px;
}

.price-range input {
  flex: 1;
  width: 100%;
  height: 32px;
  font-size: 11.5px;
}

.price-sep {
  color: var(--muted);
  font-weight: 700;
}

.sort-box select {
  width: 100%;
  height: 32px;
  font-size: 11.5px;
  cursor: pointer;
  font-weight: 600;
}

/* List Meta */
.list-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0 8px;
  padding: 0 2px;
}

.total-badge {
  font-weight: 700;
  color: var(--ink-secondary);
}

.meta-tip {
  font-size: 10.5px;
  color: rgba(203, 213, 225, 0.55);
}

/* Item Cards Grid - Compact */
.items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-height: 200px;
}

.empty-msg {
  grid-column: 1 / -1;
  padding: 36px 16px;
  text-align: center;
  background: rgba(18, 23, 36, 0.5);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
}

.empty-msg span {
  font-size: 24px;
  display: block;
  margin-bottom: 8px;
}

.empty-msg p {
  margin: 0;
  font-size: 12.5px;
}

/* Individual Item Card - Compact */
.item {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--grad-card);
  border-radius: 11px;
  padding: 7px 8px;
  text-align: left;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 185px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.item:hover {
  background: var(--panel-hover);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(168, 85, 247, 0.2);
}

/* Equipped Card Highlight */
.item[aria-pressed=true] {
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 245, 196, 0.3), inset 0 0 10px rgba(0, 245, 196, 0.08);
  background: linear-gradient(180deg, rgba(16, 36, 42, 0.85) 0%, rgba(12, 24, 32, 0.95) 100%);
}

.item[aria-pressed=true]::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan), 0 0 14px rgba(0, 245, 196, 0.7);
  z-index: 5;
}

/* Compact Thumbnail Wrap */
.item-thumb-wrap {
  width: 100%;
  height: 95px;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 50%, #262e42 0%, #121622 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.35);
}

.item-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.item:hover .item-thumb-wrap img {
  transform: scale(1.04);
}

.item-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.item-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  min-height: 28px;
}

.item-code {
  font-size: 9.5px;
  color: var(--accent-cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.2px;
  opacity: 0.85;
}

.item-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 4px;
}

.item-source {
  font-size: 8.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 4px;
  border-radius: 3px;
}

.price {
  font-size: 11px;
  font-weight: 750;
  color: var(--gold);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.price-cur {
  font-size: 9px;
  font-weight: 600;
  color: rgba(251, 191, 36, 0.8);
}

.price-free {
  font-size: 10px;
  color: var(--accent-cyan);
}

/* Pagination - Compact */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.btn-page {
  min-height: 30px;
  height: 30px;
  padding: 0 12px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.btn-page:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line-strong);
}

.page-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  background: rgba(14, 18, 28, 0.85);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 7px;
}

/* ==================== DIALOG & MODAL ==================== */
dialog {
  width: min(600px, 94vw);
  max-height: 85vh;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(16, 21, 33, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--ink);
  padding: 18px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

dialog::backdrop {
  background: rgba(5, 8, 14, 0.8);
  backdrop-filter: blur(6px);
}

dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.btn-close {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.btn-close:hover {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-pink);
  border-color: var(--accent-pink);
}

.collection-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 2px;
}

.saved {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(18, 24, 38, 0.65);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
}

.saved:hover {
  border-color: var(--line-strong);
  background: rgba(24, 32, 50, 0.75);
}

.saved-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.saved-code-title {
  color: var(--accent-cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0.8px;
}

.saved-desc {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

.saved-actions {
  display: flex;
  gap: 8px;
  margin-top: 3px;
}

.btn-preview {
  min-height: 28px;
  height: 28px;
  padding: 0 11px;
  font-size: 11px;
  background: var(--grad-brand);
  border: none;
  color: #fff;
}

.btn-copy-card {
  min-height: 28px;
  height: 28px;
  padding: 0 11px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

/* ==================== TOAST NOTIFICATION ==================== */
#toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(15px);
  padding: 8px 18px;
  background: rgba(16, 25, 38, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f1f5f9;
  border: 1px solid rgba(0, 245, 196, 0.4);
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  max-width: min(90vw, 500px);
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 245, 196, 0.25);
  display: none;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#toast.visible {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==================== RESPONSIVE BREAKPOINTS (MOBILE-FIRST) ==================== */
@media (max-width: 1200px) {
  main {
    padding: 14px 16px 30px;
    gap: 16px;
    grid-template-columns: minmax(290px, 0.75fr) minmax(0, 1fr);
  }
  .items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .topbar {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto !important;
    gap: 8px 10px !important;
    padding: 8px 12px !important;
    align-items: center !important;
  }
  .topbar-left {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
  }
  .brand {
    gap: 8px !important;
  }
  .brand-mark {
    width: 32px !important;
    height: 32px !important;
    font-size: 12.5px !important;
  }
  .brand-title {
    font-size: 13.5px !important;
  }
  .brand-sub {
    font-size: 8px !important;
    letter-spacing: 0.2px !important;
  }
  .topbar-right {
    display: contents !important;
  }
  #open-collection {
    grid-column: 2 !important;
    grid-row: 1 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    margin: 0 !important;
    justify-self: end !important;
  }
  .user-box {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    margin: 0 !important;
  }
  .login-row {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
  }
  .login-row input {
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
    font-size: 12px !important;
  }
  .btn-login {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 0 12px !important;
    font-size: 12px !important;
  }
  main {
    display: flex;
    flex-direction: column;
    padding: 10px 12px 28px;
    gap: 14px;
  }
  .fitting {
    gap: 6px;
  }
  .stage {
    height: 520px;
  }
  .eyebrow {
    display: none;
  }
  .save-box {
    padding: 8px 10px;
  }
  .save-hint {
    display: none;
  }
  .section-head {
    min-height: auto;
    margin-bottom: 4px;
  }
  h1 {
    font-size: 15px;
  }
  h2 {
    font-size: 14.5px;
  }
  .categories-nav {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 6px;
  }
  .category-tab {
    padding: 0 10px;
    font-size: 11.5px;
    min-height: 30px;
    height: 30px;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
  }
  .search-box {
    grid-column: 1 / -1;
  }
  .items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .item-thumb-wrap {
    height: 85px;
  }
  .item {
    min-height: 160px;
    padding: 6px 7px;
  }
  .meta-tip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}




/* Save hint with Night Star gift icon */
.save-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 8px;
}

.hint-gift-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(236, 72, 153, 0.4));
}

.hint-gift-text strong {
  color: #fbbf24;
}

/* Collection list items with thumbnail on right */
.saved {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.saved:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.saved-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.saved-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.saved-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
}

.saved-badge.owned {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.saved-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.saved-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}

.saved-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(0, 245, 196, 0.08);
  border: 1px solid rgba(0, 245, 196, 0.22);
  padding: 3px 9px;
  border-radius: 6px;
  width: fit-content;
}

.counter-num {
  color: var(--accent-cyan);
  font-weight: 700;
}

.counter-hint {
  color: #94a3b8;
  font-size: 10px;
}

.btn-extend {
  min-height: 28px;
  height: 28px;
  padding: 0 11px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(236, 72, 153, 0.14);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-extend:hover {
  background: rgba(236, 72, 153, 0.3);
  border-color: var(--accent-magenta);
  color: #fff;
}

.saved-thumb-wrap {
  width: 78px;
  height: 105px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #1e2638 0%, #0d111a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.saved-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.saved-thumb.loading-snap {
  opacity: 0.6;
}

/* Gift guide banner */
.gift-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.85) 0%, rgba(15, 23, 42, 0.92) 100%);
  border: 1px solid rgba(236, 72, 153, 0.35);
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.15);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.gift-banner-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(236, 72, 153, 0.5));
}

.gift-banner-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.gift-banner-title strong {
  color: #fbbf24;
}

.gift-banner-sub {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* Extend modal dialog */
.extend-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 10px;
}

.extend-gift-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(236, 72, 153, 0.3);
  padding: 12px;
  border-radius: 10px;
}

.extend-gift-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(236, 72, 153, 0.5));
}

.extend-gift-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.extend-gift-name {
  font-size: 13px;
  color: #fff;
}

.extend-gift-price {
  font-size: 11.5px;
  color: #fbbf24;
  font-weight: 700;
}

.extend-gift-benefit {
  font-size: 11px;
  color: #cbd5e1;
}

.extend-gift-benefit strong {
  color: var(--accent-cyan);
}

.extend-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 9px;
}

.step-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  color: #cbd5e1;
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.highlight-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 245, 196, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
}


/* Pinned collection header & big gift image guide */
.collection-header-pinned {
  position: sticky;
  top: 0;
  background: #111726;
  z-index: 10;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.gift-guide-box {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(236, 72, 153, 0.45);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  margin-bottom: 4px;
}

.gift-guide-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #f472b6;
  background: rgba(236, 72, 153, 0.18);
  padding: 2px 8px;
  border-radius: 5px;
  margin-bottom: 10px;
}

.gift-guide-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gift-guide-big-img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 14px rgba(236, 72, 153, 0.65));
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: 12px;
  padding: 4px;
}

.gift-guide-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.gift-guide-headline {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.gift-guide-headline strong {
  color: #fbbf24;
}

.gift-guide-steps {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.guide-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.35;
}

.guide-step-item.guide-step-has-links {
  align-items: flex-start;
}

.guide-step-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-live-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-live-channel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9.5px;
  border-radius: 9999px;
  font-size: 10.5px;
  white-space: nowrap;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.22) 0%, rgba(139, 92, 246, 0.28) 100%);
  border: 1px solid rgba(236, 72, 153, 0.55);
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.2);
  transition: all 0.18s ease;
}

.btn-live-channel:hover {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
}

.guide-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Footer disclaimer and styling */
.footer {
  text-align: center;
  border-top: 1px solid var(--line);
  padding: 24px 20px 28px;
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(10, 14, 22, 0.75);
  margin-top: 36px;
  line-height: 1.8;
}

.footer-content {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-line {
  margin: 0;
}

.footer-link {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #fff;
}

.footer-copy {
  margin-top: 8px;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

/* Account Confirmation Modal */
dialog.account-dialog {
  width: min(400px, 92vw);
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(0, 245, 255, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.78), 0 0 28px rgba(139, 92, 246, 0.22);
}

.account-modal-card {
  position: relative;
  padding: 26px 22px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.account-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.account-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.18) 0%, rgba(244, 63, 94, 0.24) 100%);
  border: 1px solid rgba(0, 245, 255, 0.4);
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.2);
  margin-bottom: 14px;
}

.account-modal-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.account-modal-name {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  word-break: break-word;
}

.account-modal-handle {
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  word-break: break-all;
}

.account-modal-note {
  margin: 12px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 10px;
  padding: 8px 12px;
  width: 100%;
}

.account-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
}

.account-modal-btn-switch {
  min-height: 38px;
  height: 38px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 10px;
}

.account-modal-btn-ok {
  min-height: 38px;
  height: 38px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
}

/* Footer Download Button */
.footer-btn-wrap {
  margin: 10px 0 6px;
}

.btn-download-vtc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 1px solid var(--accent-pink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.25);
  transition: all 0.22s ease;
}

.btn-download-vtc:hover {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.45);
}

.btn-download-vtc:active {
  transform: translateY(0);
}


