@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Backgrounds (Layered Gray — depth via fill, NO BORDERS) */
  --bg-primary: #1A1A1A;
  --bg-secondary: #1A1A1A;
  --bg-card: #212121;
  --bg-surface: #2D2D2D;
  --bg-placeholder: #3D3D3D;

  /* Text */
  --text-primary: #FFFFFF;
  --text-secondary: #9A9A9A;
  --text-muted: #6A6A6A;
  --text-placeholder: #3D3D3D;

  /* Accent (PoE2 Gold) */
  --accent: #D4AF37;
  --accent-10: #D4AF3710;
  --accent-20: #D4AF3720;
  --accent-40: #D4AF3740;

  /* Secondary (Teal) — success, positive indicators */
  --teal: #00D4AA;
  --teal-10: #00D4AA10;
  --teal-20: #00D4AA20;
  --teal-40: #00D4AA40;

  /* Error (Red) */
  --error: #FF4444;
  --error-10: #FF444410;
  --error-40: #FF444440;

  /* Warning (Orange) */
  --warning: #FF8800;

  /* Positive / Negative */
  --positive: #00D4AA;
  --negative: #FF4444;

  /* Fonts */
  --font-heading: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Base (page background — used for floating labels) */
  --bg-base: #1A1A1A;

  /* Layout */
  --page-width: 1440px;
  --content-padding: 40px;

  /* Subtle separator for navbar/footer only */
  --separator: #2D2D2D;

  /* Legacy shadows (kept for compat) */
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  margin-top: 0;
  font-family: var(--font-heading);
}

/* =====================
   NavBar
   ===================== */
.navbar {
  height: 56px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--separator);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--content-padding);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-logo {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 16px;
  flex-shrink: 0;
}

.navbar-brand {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-primary);
  text-transform: uppercase;
  text-decoration: none;
}

.navbar-ver-badge {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 2px 6px;
  border-radius: 16px;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-toggle-btn {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  background: transparent;
  color: var(--text-muted);
  border: none;
}

.lang-toggle-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.lang-toggle-btn.active {
  color: var(--accent);
  background: var(--accent-10);
}

.navbar-cta {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--accent);
  color: #1A1A1A;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  border-radius: 16px;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: opacity 0.15s ease;
}

.navbar-cta:hover {
  opacity: 0.85;
}

/* =====================
   Footer
   ===================== */
.site-footer {
  height: 56px;
  background: var(--bg-card);
  border-top: 1px solid var(--separator);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--content-padding);
  margin-top: auto;
}

.site-footer p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
}

.site-footer span {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

/* Legacy footer (kept for compat) */
footer {
  text-align: center;
  border-top: 1px solid var(--separator);
  padding-top: 20px;
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

footer p {
  margin: 5px 0;
}

/* =====================
   Hero
   ===================== */
.hero {
  padding: 80px var(--content-padding);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 16px;
  background: var(--accent-10);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.1;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-secondary);
}

.hero-stats-divider {
  width: 1px;
  height: 16px;
  background: var(--bg-surface);
}

/* =====================
   Steps Section
   ===================== */
.steps-section {
  padding: 60px var(--content-padding);
}

.steps-section-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
}

.steps-section-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 32px;
}

.steps-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .steps-cards {
    grid-template-columns: 1fr;
  }
}

.step-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
}

.step-img-skeleton {
  background: var(--bg-surface);
  height: 180px;
}

.step-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-number {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  flex-shrink: 0;
}

.step-card-title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.step-card-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* =====================
   CTA Section
   ===================== */
.cta-section {
  padding: 80px var(--content-padding);
  text-align: center;
}

/* =====================
   Ad Slot
   ===================== */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 728px;
  height: 90px;
  margin: 0 auto;
  background: var(--bg-card);
}

/* =====================
   Buttons
   ===================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border-radius: 16px;
  transition: opacity 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-primary.btn-sm {
  padding: 8px 16px;
  font-size: 11px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: none;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border-radius: 16px;
  transition: background 0.15s ease;
}

.btn-ghost:hover {
  background: var(--bg-placeholder);
}

/* Legacy cta-button */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border-radius: 16px;
  transition: opacity 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cta-button:hover {
  opacity: 0.85;
  transform: none;
  box-shadow: none;
}

/* =====================
   Badges
   ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.badge-green {
  color: var(--teal);
  background: var(--teal-10);
}

.badge-slot {
  color: var(--text-secondary);
  background: var(--bg-surface);
}

/* =====================
   Page Header (Dashboard/Compare)
   ===================== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 20px 0;
}

.page-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.page-subtitle {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* =====================
   Equip + Stats Row (horizontal split)
   ===================== */
.equip-stats-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.equip-stats-row .equip-section {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.stat-card-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 900px) {
  .equip-stats-row {
    flex-direction: column;
    gap: 16px;
  }
}

/* Main Skill Badge */
.main-skill-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
}

.main-skill-label {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent);
  text-transform: uppercase;
  flex-shrink: 0;
}

.main-skill-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-skill-icon {
  flex-shrink: 0;
  border-radius: 4px;
  image-rendering: auto;
}

.main-skill-name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Support Gems */
.support-gems {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.support-gem-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.gem-tag-icon {
  flex-shrink: 0;
  border-radius: 2px;
  image-rendering: auto;
}

.triggered-gem-tag {
  color: #6CB4EE;
  border: 1px solid rgba(108, 180, 238, 0.25);
}

/* =====================
   Stat Cards (Dashboard)
   ===================== */
.stat-card-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-card-lg {
  position: relative;
  background: var(--bg-card);
  padding: 20px 16px;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.stat-card-lg.highlighted,
.stat-card-lg.stat-card-highlight {
  background: var(--bg-surface);
  border-color: rgba(212, 175, 55, 0.3);
}

.stat-card-lg .stat-label-sm {
  position: absolute;
  top: -9px;
  left: 14px;
  padding: 0 8px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  background: var(--bg-base);
  text-transform: uppercase;
}

.stat-card-lg.stat-card-highlight .stat-label-sm {
  color: var(--warning);
}

.stat-card-lg .stat-label,
.stat-label-sm {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.stat-card-lg .stat-value,
.stat-value-lg {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text-primary);
}

.stat-value-green {
  color: var(--teal) !important;
}

.stat-card-lg .stat-sub,
.stat-sub {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-secondary);
}

/* Legacy stat-card */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  transition: background 0.15s ease;
}

.stat-card:hover {
  background: var(--bg-surface);
}

.stat-card .stat-label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.stat-card .stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 700;
}

/* =====================
   Delta Cards
   ===================== */
.delta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .delta-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.delta-card {
  position: relative;
  background: var(--bg-card);
  padding: 20px 16px;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.delta-card.delta-positive {
  border-color: rgba(63, 185, 80, 0.3);
  background: rgba(63, 185, 80, 0.04);
}

.delta-card.delta-negative {
  border-color: rgba(248, 81, 73, 0.3);
  background: rgba(248, 81, 73, 0.04);
}

.delta-card.delta-cost {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.04);
}

.delta-card-label {
  position: absolute;
  top: -9px;
  left: 14px;
  padding: 0 8px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  background: var(--bg-base);
}

.delta-card.delta-positive .delta-card-label { color: var(--positive); }
.delta-card.delta-negative .delta-card-label { color: var(--error); }
.delta-card.delta-cost .delta-card-label { color: var(--warning); }

.delta-card .stat-value-lg { font-size: 26px; }
.delta-card .stat-sub { display: block; margin-top: 2px; font-size: 13px; }

.delta-card .delta-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -1px;
}

.delta-card .delta-value.positive {
  color: var(--positive);
}

.delta-card .delta-value.negative {
  color: var(--negative);
}

/* =====================
   History Table
   ===================== */
.dashboard-header {
  display: flex;
  justify-content: flex-end;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 20px;
  max-width: var(--page-width);
  margin: 0 auto;
}

.dashboard-content-wrap {
  max-width: var(--page-width);
  margin: 0 auto;
  padding-left: 160px;
  padding-right: 160px;
}

@media (max-width: 1200px) {
  .dashboard-content-wrap {
    padding-left: 0;
    padding-right: 0;
  }
}

.dashboard-main {
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

@media (max-width: 1200px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

.dashboard-content {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1200px) {
  .dashboard-content {
    grid-template-columns: 300px 1fr;
  }
}

@media (max-width: 992px) {
  .dashboard-content {
    grid-template-columns: 1fr;
  }
}

.build-summary {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
  position: sticky;
  top: 76px;
}

.build-summary h2 {
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.selected-skill {
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 15px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.selected-skill strong {
  color: var(--accent);
  text-transform: uppercase;
}

.selected-skill span {
  color: var(--text-primary);
  font-weight: bold;
}

.history-section h2 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 1.1rem;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

.history-table-wrapper {
  margin-bottom: 20px;
}

.history-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.history-table-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.sort-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.sort-btn {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: none;
  border-radius: 16px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.sort-btn:hover {
  color: var(--text-primary);
  background: var(--bg-placeholder);
}

.sort-btn.active {
  color: var(--accent);
  background: var(--accent-10);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.history-header h2 {
  margin: 0;
}

.history-guide {
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
}

.history-guide p {
  margin: 4px 0;
}

.table-wrapper {
  overflow-x: auto;
}

.table-scroll-hint {
  display: none;
  text-align: center;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 0;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
}

.history-table th {
  background: var(--bg-surface);
  color: var(--text-secondary);
  padding: 12px 20px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.history-table td {
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--bg-surface);
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.history-table tbody tr:hover {
  background: var(--bg-surface);
}

.history-table .positive {
  color: var(--positive);
}

.history-table .negative {
  color: var(--negative);
}

.history-table .warning {
  color: var(--warning);
}

.history-table .item-name {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
}

.history-table .base-type {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.history-table .empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
  font-size: 12px;
}

.history-table .detail-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
}

.history-table .detail-link:hover {
  text-decoration: underline;
}

/* Rarity colors */
.rarity-rare { color: #ff0; }
.rarity-magic { color: #8888ff; }
.rarity-unique { color: #af6025; }
.rarity-normal { color: #c8c8c8; }

/* =====================
   Expired Page
   ===================== */
.expired-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 112px);
  padding: 40px;
  text-align: center;
  gap: 24px;
}

.expired-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--error-10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.expired-page h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.expired-page p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
  max-width: 480px;
}

/* Legacy expired */
.expired {
  max-width: 600px;
  margin: 60px auto;
  text-align: center;
  padding: 40px;
  background: var(--bg-card);
  border-radius: 16px;
}

.expired h2 {
  color: var(--negative);
  margin-bottom: 20px;
}

.expired p {
  margin-bottom: 30px;
  color: var(--text-secondary);
}

.retry-btn {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 10px 24px;
  border-radius: 16px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
  background: var(--accent-10);
}

.retry-btn:hover {
  background: var(--accent-20);
}

/* =====================
   Privacy Page
   ===================== */
.privacy-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px var(--content-padding);
}

.privacy-page h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 32px;
}

.privacy-page section {
  margin-bottom: 32px;
}

.privacy-page h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.privacy-page p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Privacy (template classes) */
.privacy-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px var(--content-padding);
}

.privacy-content {
  display: flex;
  flex-direction: column;
}

.privacy-date {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.privacy-section {
  margin-bottom: 32px;
}

.privacy-section-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.privacy-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.privacy-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.privacy-list li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
}

.privacy-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

/* =====================
   Feedback Button & Modal
   ===================== */
.feedback-section {
  text-align: center;
  margin: 30px 0;
}

.feedback-btn {
  background: var(--accent-10);
  color: var(--accent);
  border: none;
  padding: 8px 20px;
  border-radius: 16px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}

.feedback-btn:hover {
  background: var(--accent-20);
}

.dlg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dlg-overlay.active {
  display: flex;
}

.dlg-box {
  background: var(--bg-card);
  border-radius: 16px;
  width: 480px;
  max-width: 90%;
  overflow: hidden;
}

.dlg-header {
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dlg-title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.dlg-desc {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.dlg-header-text h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.dlg-header-text p {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.dlg-dismiss {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.dlg-dismiss:hover {
  color: var(--text-primary);
}

.dlg-body {
  padding: 24px;
}

.dlg-box h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.dlg-box label,
.form-label {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
  margin-top: 12px;
}

.dlg-box input,
.dlg-box textarea,
.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg-surface);
  border: none;
  border-radius: 16px;
  color: var(--text-primary);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 12px;
  transition: box-shadow 0.15s ease;
}

.dlg-box input:focus,
.dlg-box textarea:focus,
.form-input:focus,
.form-textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-40);
}

.dlg-box textarea,
.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.dlg-counter {
  text-align: right;
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

.dlg-foot {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dlg-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.dlg-cancel {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: none;
  padding: 8px 20px;
  border-radius: 16px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.dlg-cancel:hover {
  color: var(--text-primary);
  background: var(--bg-placeholder);
}

.dlg-submit {
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  padding: 8px 20px;
  border-radius: 16px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: opacity 0.15s ease;
}

.dlg-submit:hover {
  opacity: 0.85;
}

.dlg-result {
  margin-top: 12px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 11px;
}

.dlg-result.success {
  color: var(--positive);
}

.dlg-result.error {
  color: var(--negative);
}


/* =====================
   Compare Page
   ===================== */
.compare-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px var(--content-padding);
}

.compare-back {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 20px;
  font-size: 11px;
  transition: color 0.15s ease;
}

.compare-back:hover {
  color: var(--accent);
}

.compare-item-info {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.compare-item-info h2 {
  margin-bottom: 8px;
}

.compare-item-info p {
  color: var(--text-muted);
  margin: 0;
  font-size: 12px;
}

.compare-summary {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.compare-summary .big-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.compare-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
}

.compare-card h3 {
  margin-bottom: 15px;
  font-size: 1rem;
  padding-bottom: 10px;
}

.compare-stat {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--bg-surface);
  font-size: 12px;
}

.compare-stat:last-child {
  border-bottom: none;
}

.compare-stat .stat-name {
  color: var(--text-muted);
}

.compare-stat .stat-val {
  color: var(--text-primary);
  font-weight: 600;
}

/* Language switch (legacy) */
.lang-switch {
  margin-top: 8px;
}

.lang-switch a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 2px 6px;
  transition: color 0.15s ease;
}

.lang-switch a:hover {
  color: var(--accent);
}

/* Landing (legacy) */
.landing {
  max-width: 800px;
  margin: 40px auto;
  text-align: center;
  padding: 40px;
  background: var(--bg-card);
  border-radius: 16px;
}

.landing h2 {
  color: var(--text-primary);
  font-size: 2rem;
  margin-bottom: 30px;
}

.steps {
  text-align: left;
  margin: 0 auto 40px;
  counter-reset: landing-step;
  list-style: none;
  padding: 0;
  max-width: 600px;
}

.steps li {
  position: relative;
  padding-left: 50px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.steps li::before {
  counter-increment: landing-step;
  content: counter(landing-step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 16px;
  text-align: center;
  line-height: 30px;
  font-weight: 700;
  font-size: 13px;
}

@media (max-width: 768px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero {
    padding: 48px 24px;
  }

  .navbar {
    padding: 0 16px;
  }

  .navbar-brand {
    font-size: 12px;
  }

  .navbar-ver-badge {
    display: none;
  }

  .site-footer {
    padding: 0 16px;
    height: auto;
    min-height: 56px;
    flex-direction: column;
    gap: 4px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .table-scroll-hint {
    display: block;
  }

  .page-header {
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-main {
    padding: 24px 20px;
  }

  .dashboard-content-wrap {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 992px) {
  .stat-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-main {
    padding: 16px 12px;
  }

  .stat-card-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-card-lg {
    padding: 14px 10px;
  }

  .stat-card-lg .stat-value,
  .stat-value-lg {
    font-size: 20px;
  }

  .delta-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .delta-card .delta-value,
  .delta-card .stat-value-lg {
    font-size: 20px;
  }

  .history-table th,
  .history-table td {
    padding: 10px 8px;
    font-size: 11px;
  }

  .page-title {
    font-size: 22px;
  }

  .compare-page {
    padding: 16px 12px;
  }

  .compare-card {
    padding: 16px;
  }

  .sort-controls {
    gap: 4px;
  }

  .sort-btn {
    padding: 5px 10px;
    font-size: 10px;
  }
}

/* =====================
   Equipped Items Grid
   ===================== */
.equip-section {
  margin-bottom: 20px;
}

.equip-section-title {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Character silhouette grid (pobb.in style — 8 columns) */
.equip-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-areas:
    "weapon weapon .      helm   helm   .      offhand offhand"
    "weapon weapon .      helm   helm   .      offhand offhand"
    "weapon weapon ring3  body   body   amulet offhand offhand"
    "weapon weapon ring1  body   body   ring2  offhand offhand"
    ".      gloves gloves body   body   boots  boots   ."
    ".      gloves gloves belt   belt   boots  boots   .";
  gap: 6px;
}

/* Base slot */
.equip-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid #2D2D2D;
  min-width: 0;
  min-height: 0;
}

.equip-slot-empty {
  opacity: 0.35;
}

/* --- Size: Large (Weapon / Off-hand / Body Armour) --- */
.equip-slot-lg .equip-slot-icon-wrap {
  width: 80px;
  height: 80px;
}
.equip-slot-lg .equip-slot-icon {
  width: 80px;
  height: 80px;
}
.equip-slot-lg .equip-slot-placeholder {
  width: 80px;
  height: 80px;
}
.equip-slot-lg .equip-slot-name {
  font-size: 11px;
}

/* --- Size: Medium (Helmet / Gloves / Boots / Belt) --- */
.equip-slot-md .equip-slot-icon-wrap {
  width: 56px;
  height: 56px;
}
.equip-slot-md .equip-slot-icon {
  width: 56px;
  height: 56px;
}
.equip-slot-md .equip-slot-placeholder {
  width: 56px;
  height: 56px;
}
.equip-slot-md .equip-slot-name {
  font-size: 11px;
}

/* --- Size: Small (Ring / Amulet) --- */
.equip-slot-sm .equip-slot-icon-wrap {
  width: 40px;
  height: 40px;
}
.equip-slot-sm .equip-slot-icon {
  width: 40px;
  height: 40px;
}
.equip-slot-sm .equip-slot-placeholder {
  width: 40px;
  height: 40px;
}
.equip-slot-sm .equip-slot-name {
  font-size: 10px;
}
.equip-slot-sm .equip-slot-base {
  display: none;
}

/* Shared icon styles */
.equip-slot-icon-wrap {
  flex-shrink: 0;
}

.equip-slot-icon {
  image-rendering: pixelated;
  border-radius: 4px;
  object-fit: scale-down;
}

.equip-slot-placeholder {
  background: var(--bg-surface);
  border-radius: 4px;
}

.equip-slot-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
  width: 100%;
  margin-top: 4px;
}

.equip-slot-label {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.equip-slot-name {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.equip-slot-base {
  font-family: var(--font-body);
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.equip-slot-empty-text {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--text-muted);
}

/* Responsive: tablet — 2-column simple grid */
@media (max-width: 768px) {
  .equip-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "weapon  offhand"
      "helm    body"
      "amulet  belt"
      "ring1   ring2"
      "ring3   ring3"
      "gloves  boots";
    gap: 6px;
  }

  .equip-slot {
    flex-direction: row;
    text-align: left;
    padding: 10px;
    gap: 8px;
  }

  .equip-slot-info {
    align-items: flex-start;
    margin-top: 0;
  }

  .equip-slot-lg .equip-slot-icon-wrap,
  .equip-slot-lg .equip-slot-icon,
  .equip-slot-lg .equip-slot-placeholder,
  .equip-slot-md .equip-slot-icon-wrap,
  .equip-slot-md .equip-slot-icon,
  .equip-slot-md .equip-slot-placeholder {
    width: 44px;
    height: 44px;
  }

  .equip-slot-sm .equip-slot-icon-wrap,
  .equip-slot-sm .equip-slot-icon,
  .equip-slot-sm .equip-slot-placeholder {
    width: 36px;
    height: 36px;
  }

  .equip-slot-sm .equip-slot-base {
    display: block;
  }
}

@media (max-width: 480px) {
  .equip-grid {
    gap: 4px;
  }

  .equip-slot {
    padding: 8px;
    gap: 6px;
  }

  .equip-slot-lg .equip-slot-icon-wrap,
  .equip-slot-lg .equip-slot-icon,
  .equip-slot-lg .equip-slot-placeholder,
  .equip-slot-md .equip-slot-icon-wrap,
  .equip-slot-md .equip-slot-icon,
  .equip-slot-md .equip-slot-placeholder {
    width: 36px;
    height: 36px;
  }

  .equip-slot-sm .equip-slot-icon-wrap,
  .equip-slot-sm .equip-slot-icon,
  .equip-slot-sm .equip-slot-placeholder {
    width: 28px;
    height: 28px;
  }
}

/* Item image cell */
.item-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.item-icon {
  flex-shrink: 0;
  image-rendering: pixelated;
  border-radius: 2px;
}
.item-text {
  display: flex;
  flex-direction: column;
}
