:root {
  /* Surfaces & Canvas (Dark - Default) */
  --bg-app: #0a0b0e;
  --bg-surface: #111318;
  --bg-surface-hover: #161920;
  --bg-surface-elevated: #1a1e26;
  --bg-surface-active: #222732;

  /* Borders (Subtle, crisp geometric Swiss lines) */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-default: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.20);
  --border-focus: var(--accent);

  /* Typography / Text Colors (High contrast, WCAG AAA/AA compliant) */
  --text-main: #f8fafc;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8492a6;
  --text-subtle: #4e5b6e;

  /* Functional Accents */
  --accent: #dc2626;
  --accent-hover: #ef4444;
  --accent-subtle: rgba(220, 38, 38, 0.12);
  --accent-crimson: var(--accent);
  --accent-crimson-subtle: var(--accent-subtle);

  --accent-green: #10b981;
  --accent-green-subtle: rgba(16, 185, 129, 0.12);

  --accent-amber: #f59e0b;
  --accent-amber-subtle: rgba(245, 158, 11, 0.12);

  --accent-blue: #38bdf8;
  --accent-blue-subtle: rgba(56, 189, 248, 0.12);

  --accent-faceit: #ff5500;
  --accent-faceit-subtle: rgba(255, 85, 0, 0.12);

  /* Geometry & Radii (Swiss style: structured, precise, clean) */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Elevation & Shadows (Crisp, flat, geometric) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.65);

  /* Transitions */
  --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 240ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Accessibility & Focus Rings */
  --focus-ring: 0 0 0 2px var(--bg-app), 0 0 0 4px var(--accent);
}

/* Light Mode Theme Support (Swiss paper-and-ink aesthetic) */
[data-theme="light"] {
  --bg-app: #f5f7fa;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f4f8;
  --bg-surface-elevated: #e8ecf2;
  --bg-surface-active: #dde3eb;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-default: rgba(0, 0, 0, 0.14);
  --border-strong: rgba(0, 0, 0, 0.24);

  --text-main: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --accent: #dc2626;
  --accent-hover: #b91c1c;
  --accent-subtle: rgba(220, 38, 38, 0.08);

  --accent-green: #059669;
  --accent-green-subtle: rgba(5, 150, 105, 0.08);

  --accent-amber: #d97706;
  --accent-amber-subtle: rgba(217, 119, 6, 0.08);

  --accent-blue: #0284c7;
  --accent-blue-subtle: rgba(2, 132, 199, 0.08);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

  --focus-ring: 0 0 0 2px var(--bg-app), 0 0 0 4px var(--accent);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Accessibility Focus States */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Prefers Reduced Motion */
@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;
  }
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding: 40px 24px 80px;
}

.app-container {
  max-width: 980px;
  margin: 0 auto;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  letter-spacing: -0.3px;
  user-select: none;
}

.logo-mark .logo-xp {
  color: var(--accent);
  font-weight: 800;
}

.logo-mark .logo-tracker {
  color: var(--text-primary);
  font-weight: 700;
}

.header h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.subtitle {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Status Dot (Minimalist) */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: transparent;
  border: none;
  cursor: default;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  transition: background-color var(--transition);
}

.status-online .status-dot {
  background-color: var(--accent-green);
}

.status-offline .status-dot {
  background-color: var(--text-subtle);
}

.status-guard .status-dot {
  background-color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-app);
  border-color: var(--text-primary);
  font-weight: 600;
}

.btn-primary:hover {
  background: #ffffff;
  color: #000000;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

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

/* Notification Banners */
.banner {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 12px;
}

.banner-warning {
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.banner-content input {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  width: 120px;
}

/* Reset Info Bar */
.reset-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.reset-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 12px;
}

.weekly-mission-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 10px;
}

.mission-tag.next-tag {
  color: var(--accent-crimson);
}

/* Animated container for account card quest pill on top of card */
.account-quest-wrapper {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin: 0;
  transform: translateY(-4px);
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.22s ease, 
              transform 0.22s ease;
  pointer-events: none;
}

.account-quest-wrapper:not(.visible) {
  display: none !important;
}

.account-quest-wrapper.visible {
  display: block;
  max-height: 48px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.account-quest-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: var(--accent-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  flex-wrap: nowrap;
  overflow: hidden;
  width: 100%;
}

.account-quest-pill.next-quest,
.account-quest-pill.current-quest {
  border-color: var(--border-default);
  background: var(--accent-subtle);
}

.quest-pill-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
  white-space: nowrap;
}

.quest-pill-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
  flex-shrink: 0;
  white-space: nowrap;
  background: var(--accent-subtle);
  color: var(--accent);
}

.account-quest-pill.next-quest .quest-pill-tag,
.account-quest-pill.current-quest .quest-pill-tag {
  background: var(--accent-subtle);
  color: var(--accent);
}

.quest-pill-weapon {
  color: var(--text-main);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.quest-weapon-icon {
  height: 14px;
  max-width: 46px;
  width: auto;
  vertical-align: middle;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
  display: inline-block;
  transition: filter 0.15s ease;
}

.quest-weapon-icon.quest-weapon-dual + .quest-weapon-icon.quest-weapon-dual {
  margin-left: -8px;
}

.account-quest-pill:hover .quest-weapon-icon {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8)) brightness(1.1);
}

.quest-pill-goal {
  color: var(--text-muted);
  font-size: 11px;
  flex-shrink: 0;
  white-space: nowrap;
}

.mission-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mission-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-crimson);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mission-title {
  font-size: 12px;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.mission-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mission-goal {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.mission-xp-badge {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-green);
}

.reset-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reset-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reset-date {
  font-size: 12px;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.countdown-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.countdown-label {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.time-item {
  font-weight: 600;
  color: var(--accent-crimson);
}

/* Main Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

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

.section-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.section-header h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.2px;
  margin: 0;
}

.accounts-completion-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-green);
  line-height: 1.2;
}

.filter-opt-text {
  white-space: nowrap;
}

/* Filter Dropdown */
.filter-dropdown-container {
  position: relative;
  display: inline-block;
}

.btn-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  position: relative;
}

.btn-filter:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-filter.active-filter {
  color: var(--text-main);
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.btn-filter.active-filter::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.filter-chevron {
  transition: transform 0.2s ease;
}

.filter-dropdown-container.open .filter-chevron {
  transform: rotate(180deg);
}

.filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 165px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 4px;
  box-shadow: var(--shadow-md);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: filterMenuFadeIn 0.15s ease-out;
}

@keyframes filterMenuFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: all 0.1s ease;
}

.filter-option:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.filter-option.active {
  background: var(--accent-subtle);
  color: var(--text-main);
  font-weight: 600;
}

.filter-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.filter-dot.dot-pending {
  background: var(--accent-amber);
}

.filter-dot.dot-unverified {
  background: var(--accent);
}

.filter-dot.dot-earned {
  background: var(--accent-green);
}

/* Settings Dropdown in Top Header */
.settings-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-settings:hover,
.settings-dropdown-container.open .btn-settings {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.settings-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 220px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  box-shadow: var(--shadow-md);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: filterMenuFadeIn 0.15s ease-out;
}

.section-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-menu-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-dropdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}

.settings-dropdown-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  user-select: none;
}

.settings-menu-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

.btn-settings-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-settings-action:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  color: var(--accent);
}

.badge-banned {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  color: #ff4d4d;
  background: rgba(220, 20, 60, 0.15);
  border: 1px solid rgba(220, 20, 60, 0.4);
  border-radius: 3px;
  user-select: none;
}

/* Quest Toggle Switch in Tracked Accounts Header */
.quest-toggle-wrapper {
  display: flex;
  align-items: center;
}

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.switch-label:hover {
  color: var(--text-main);
}

.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.12);
  transition: 0.2s ease;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: #f0f1f3;
  transition: 0.2s ease;
  border-radius: 50%;
}

[data-theme="light"] .slider {
  background-color: rgba(0, 0, 0, 0.16);
}

.switch input:checked + .slider,
.switch input:checked + .slider.slider-crimson {
  background-color: var(--accent);
}

.switch input:checked + .slider:before {
  transform: translateX(14px);
}

.muted {
  font-size: 12px;
  color: var(--text-muted);
}

/* Accounts Grid */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.account-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.account-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.account-card button,
.account-card a,
.account-card input {
  cursor: pointer;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.player-details {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  background: var(--bg-surface-elevated);
  object-fit: cover;
}

.player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.player-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Steam Level Badge (Official Steam Community Styling) */
.friendPlayerLevel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  border: 2px solid #9b9b9b;
  height: 20px;
  width: 20px;
  min-width: 20px;
  text-align: center;
  cursor: default;
  color: #fff;
  vertical-align: middle;
  box-sizing: border-box;
  flex-shrink: 0;
  user-select: none;
}

.friendPlayerLevel .friendPlayerLevelNum {
  color: #ffffff;
  font-family: var(--font-mono), sans-serif;
  line-height: 1;
}

/* Tier 0 - 99 circles */
.friendPlayerLevel.lvl_0  { border-color: #9b9b9b; }
.friendPlayerLevel.lvl_10 { border-color: #c02942; }
.friendPlayerLevel.lvl_20 { border-color: #d95b43; }
.friendPlayerLevel.lvl_30 { border-color: #fecc23; }
.friendPlayerLevel.lvl_40 { border-color: #467a3c; }
.friendPlayerLevel.lvl_50 { border-color: #4e8ddb; }
.friendPlayerLevel.lvl_60 { border-color: #7652c9; }
.friendPlayerLevel.lvl_70 { border-color: #c252c9; }
.friendPlayerLevel.lvl_80 { border-color: #542437; }
.friendPlayerLevel.lvl_90 { border-color: #997c52; }

/* 100+ Base Sprite Styling */
.friendPlayerLevel.lvl_100, .friendPlayerLevel.lvl_200,
.friendPlayerLevel.lvl_300, .friendPlayerLevel.lvl_400,
.friendPlayerLevel.lvl_500, .friendPlayerLevel.lvl_600,
.friendPlayerLevel.lvl_700, .friendPlayerLevel.lvl_800,
.friendPlayerLevel.lvl_900, .friendPlayerLevel.lvl_1000,
.friendPlayerLevel.lvl_1100, .friendPlayerLevel.lvl_1200,
.friendPlayerLevel.lvl_1300, .friendPlayerLevel.lvl_1400,
.friendPlayerLevel.lvl_1500, .friendPlayerLevel.lvl_1600,
.friendPlayerLevel.lvl_1700, .friendPlayerLevel.lvl_1800,
.friendPlayerLevel.lvl_1900, .friendPlayerLevel.lvl_2000 {
  border: none;
  border-radius: 0;
  background-repeat: no-repeat;
  background-position: 0 0;
  font-size: 10px;
  height: 22px;
  width: 22px;
  min-width: 22px;
  line-height: 22px;
  text-shadow: 1px 1px 2px #000;
  background-size: 22px auto;
}

/* Offsets for 22px scaled sprites: frame height is 22px */
.friendPlayerLevel.lvl_plus_10 { background-position: 0 -22px; }
.friendPlayerLevel.lvl_plus_20 { background-position: 0 -44px; }
.friendPlayerLevel.lvl_plus_30 { background-position: 0 -66px; }
.friendPlayerLevel.lvl_plus_40 { background-position: 0 -88px; }
.friendPlayerLevel.lvl_plus_50 { background-position: 0 -110px; }
.friendPlayerLevel.lvl_plus_60 { background-position: 0 -132px; }
.friendPlayerLevel.lvl_plus_70 { background-position: 0 -154px; }
.friendPlayerLevel.lvl_plus_80 { background-position: 0 -176px; }
.friendPlayerLevel.lvl_plus_90 { background-position: 0 -198px; }

/* 100+ Image Assets (Steam Fastly CDN) */
.friendPlayerLevel.lvl_100 { background-image: url('https://community.fastly.steamstatic.com/public/shared/images/community/levels_hexagons.png'); }
.friendPlayerLevel.lvl_200 { background-image: url('https://community.fastly.steamstatic.com/public/shared/images/community/levels_shields.png'); }
.friendPlayerLevel.lvl_300 { background-image: url('https://community.fastly.steamstatic.com/public/shared/images/community/levels_books.png'); }
.friendPlayerLevel.lvl_400 { background-image: url('https://community.fastly.steamstatic.com/public/shared/images/community/levels_chevrons.png'); }
.friendPlayerLevel.lvl_500 { background-image: url('https://community.fastly.steamstatic.com/public/shared/images/community/levels_circle2.png'); }
.friendPlayerLevel.lvl_600 { background-image: url('https://community.fastly.steamstatic.com/public/shared/images/community/levels_angle.png'); }
.friendPlayerLevel.lvl_700 { background-image: url('https://community.fastly.steamstatic.com/public/shared/images/community/levels_flag.png'); }
.friendPlayerLevel.lvl_800 { background-image: url('https://community.fastly.steamstatic.com/public/shared/images/community/levels_wings.png'); }
.friendPlayerLevel.lvl_900 { background-image: url('https://community.fastly.steamstatic.com/public/shared/images/community/levels_arrows.png'); }
.friendPlayerLevel.lvl_1000 { background-image: url('https://community.fastly.steamstatic.com/public/shared/images/community/levels_crystals.png'); }

.player-id {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges */
.badge-drop {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  border: 1px solid transparent;
  user-select: none;
  transition: opacity var(--transition);
}

.badge-drop:hover {
  opacity: 0.85;
}

.badge-drop.earned {
  background: var(--accent-green-subtle);
  color: var(--accent-green);
  border-color: rgba(16, 185, 129, 0.25);
}

.badge-drop.pending {
  background: var(--accent-amber-subtle);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.25);
}

.badge-drop.unverified {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: rgba(220, 38, 38, 0.25);
}

/* Medals Strip */
.medals-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 2px 0;
}

.medal-item {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  flex-shrink: 0;
}

.medal-item:hover {
  transform: translateY(-2px) scale(1.12);
  border-color: var(--border-strong);
}

.medal-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.medal-more-btn {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: all var(--transition);
  flex-shrink: 0;
}

.medal-more-btn:hover {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Account Premier Row (CS2 / Leetify Authentic Style) */
.account-premier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  user-select: none;
}

.premier-stat-box {
  display: flex;
  align-items: center;
  gap: 7px;
}

.premier-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.premier-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

/* Player Commendations Row (Under Medals, Above Premier ELO) */
.player-commendations-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 0;
  margin-top: -2px;
  user-select: none;
}

.commendation-inline-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.commendation-svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.commendation-inline-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1;
}

.player-id-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* Authentic CS2 / Leetify Premier Rating Badge */
.cs-rating {
  display: inline-flex;
  align-items: center;
  isolation: isolate;
  font-size: 21px; /* Badge scale */
  position: relative;
  vertical-align: middle;
  line-height: 1;
}

.cs-rating .vertical-lines {
  width: 0.53125em;
  height: 1em;
  z-index: 1;
  flex-shrink: 0;
}

.cs-rating .label-outer {
  margin-left: -0.25em;
  border: 0.0625em solid transparent;
  border-radius: 0.12em;
  transform: skew(-10deg);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.7em;
  min-width: 2.7em;
  box-sizing: border-box;
  height: 1em;
  padding: 0 0.2em;
  font-family: 'Poppins', var(--font-display, system-ui, sans-serif);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.cs-rating .label-wrapper {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  width: 100%;
  height: 0.54em;
  line-height: 1;
}

.cs-rating .label-large {
  font-size: 0.5416em;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cs-rating .label-small {
  font-size: 0.4583em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cs-rating .label-unranked {
  font-size: 0.58em;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

/* Color tier mappings matching CS2 in-game and Leetify */
.cs-rating.--tier-0 .vertical-lines path { fill: #b1c4d9; }
.cs-rating.--tier-0 .label-outer { background-color: #2c2f37; border-color: rgba(177, 196, 217, 0.6); color: #eef2f7; }

.cs-rating.--tier-1 .vertical-lines path { fill: #5e98d9; }
.cs-rating.--tier-1 .label-outer { background-color: #061c36; border-color: rgba(94, 152, 217, 0.6); color: #8bc1ff; }

.cs-rating.--tier-2 .vertical-lines path { fill: #4c6aff; }
.cs-rating.--tier-2 .label-outer { background-color: #060e37; border-color: rgba(76, 106, 255, 0.6); color: #8a9dfe; }

.cs-rating.--tier-3 .vertical-lines path { fill: #8847ff; }
.cs-rating.--tier-3 .label-outer { background-color: #180638; border-color: rgba(136, 71, 255, 0.6); color: #b48bff; }

.cs-rating.--tier-4 .vertical-lines path { fill: #d32ce6; }
.cs-rating.--tier-4 .label-outer { background-color: #320638; border-color: rgba(211, 44, 230, 0.6); color: #f177ff; }

.cs-rating.--tier-5 .vertical-lines path { fill: #eb4b4b; }
.cs-rating.--tier-5 .label-outer { background-color: #380606; border-color: rgba(235, 75, 75, 0.6); color: #ff8686; }

.cs-rating.--tier-6 .vertical-lines path { fill: #ffd700; }
.cs-rating.--tier-6 .label-outer { background-color: #383006; border-color: rgba(255, 215, 0, 0.6); color: #ffdf35; }

.cs-rating.--tier-unranked .vertical-lines path { fill: #4b4b58; }
.cs-rating.--tier-unranked .label-outer { background-color: #1a1a22; border-color: rgba(255, 255, 255, 0.08); color: #6e6e80; }

/* Progress Section */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.progress-labels strong {
  color: var(--text-main);
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 5px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-fill.complete {
  background: var(--accent-green);
}

.progress-subtext {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* Card Footer */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-subtle);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-icon:hover {
  color: var(--text-main);
}

.btn-icon:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-icon.danger:hover {
  color: var(--accent-hover);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-icon {
  animation: spin 0.8s linear infinite;
  transform-origin: center center;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.empty-state h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 12px;
  max-width: 400px;
  margin: 0 auto 16px auto;
}

/* Modal Overlay & Windows */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

#medals-modal,
#profile-modal {
  z-index: 300;
}

#xp-calc-modal {
  z-index: 400;
}

#single-medal-modal {
  z-index: 1200;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 20px 22px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}

.btn-close:hover {
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input[type="text"] {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.helper-text {
  font-size: 11px;
  color: var(--text-subtle);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* Modal Medals Grid */
.modal-medal-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: background-color 0.12s ease;
}

.modal-medal-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

.modal-medal-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.modal-medal-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.25;
}

/* Expanded Account Profile Modal (Widescreen Rectangle Layout) */
.profile-modal-dialog {
  max-width: 890px;
  width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 24px;
}

.profile-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.profile-modal-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-shrink: 0;
}

.profile-modal-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.profile-modal-avatar-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  overflow: hidden;
  flex-shrink: 0;
}

.profile-modal-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-modal-titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile-modal-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.profile-modal-quest-slot {
  display: inline-flex;
  align-items: center;
}

.profile-modal-quest-slot .account-quest-pill {
  width: auto;
  min-width: 250px;
  max-width: 440px;
  padding: 6px 14px;
  font-size: 12.5px;
  gap: 12px;
  border-radius: var(--radius-sm);
  background: rgba(220, 20, 60, 0.08);
  border: 1px solid rgba(220, 20, 60, 0.35);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  line-height: 1.2;
}

.profile-modal-quest-slot .quest-pill-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 2.5px 6px;
  letter-spacing: 0.5px;
  border-radius: 4px;
}

.profile-modal-quest-slot .quest-pill-weapon {
  font-size: 12px;
  font-weight: 700;
}

.profile-modal-quest-slot .quest-weapon-icon {
  height: 18px;
  width: auto;
}

.profile-modal-quest-slot .quest-pill-goal {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.profile-modal-links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-wrap: wrap;
}

.profile-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.profile-link:hover {
  color: var(--accent);
}

.profile-link-sep {
  color: var(--border-subtle);
}

.profile-steamid {
  color: var(--text-subtle);
}

.profile-xp-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.profile-xp-header {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.profile-xp-subtext {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Two-Column Layout: Thinner Ranks on Left, Leetify Stats on Right */
.profile-two-columns {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.profile-ranks-col {
  width: 205px;
  min-width: 195px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-stats-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stats-box-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Leetify Widget Header */
.leetify-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.leetify-widget-player-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.3px;
}

.leetify-attribution-box {
  display: flex;
  align-items: center;
}

.leetify-link-container {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.leetify-mark-banner {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.leetify-view-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: underline;
  transition: color var(--transition);
}

.leetify-view-link:hover {
  color: var(--text-primary);
}

/* 5-Column Stats Grid */
.leetify-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px 10px;
}

.stat-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-header {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-info-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  cursor: help;
  line-height: 1;
  user-select: none;
  transition: color var(--transition);
  padding: 0 1px;
}

.stat-info-badge:hover {
  color: var(--text-primary);
}

.stat-value {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: -0.2px;
  line-height: 1.1;
}

.stat-val-amber {
  color: var(--accent-amber) !important;
}

.stat-val-red {
  color: var(--accent) !important;
}

/* Medals Section (Below player stats) */
.profile-medals-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.profile-medals-title-group {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.profile-medals-count {
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  letter-spacing: 0.3px;
}

.profile-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.6px !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
  height: 16px !important;
  line-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.profile-ranks-col .profile-section-title,
.profile-stats-col .profile-section-title {
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.6px !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
  height: 16px !important;
  line-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.profile-ranks-col .profile-section-title span,
.profile-stats-col .profile-section-title span {
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  color: inherit !important;
  text-transform: inherit !important;
  line-height: inherit !important;
}

.profile-medals-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) rgba(0, 0, 0, 0.22);
}

.profile-medals-grid::-webkit-scrollbar {
  width: 6px;
}

.profile-medals-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}

.profile-medals-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.profile-medals-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.26);
}

.profile-medals-grid .medal-item {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 6px;
  padding: 3px;
}

/* Thinner Ranks Table */
.ranks-table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--bg-surface-elevated);
  transition: height 0.14s ease-out;
}

.ranks-table-container::-webkit-scrollbar {
  width: 6px;
}

.ranks-table-container::-webkit-scrollbar-track {
  background: var(--bg-surface-elevated);
  border-left: 1px solid var(--border-subtle);
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.ranks-table-container::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

.ranks-table-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.ranks-table {
  width: 100%;
  border-collapse: collapse;
}

.ranks-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.ranks-table th.th-mode {
  text-align: left;
}

.ranks-table th.th-rank {
  text-align: right;
}

.ranks-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
}

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

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

.ranks-table td {
  padding: 6px 10px;
  vertical-align: middle;
}

.rank-mode-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 24px;
}

.rank-mode-icon {
  width: 26px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.rank-mode-wm {
  width: 26px;
  height: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.5px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
}

.rank-badge-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.rank-skillgroup-img {
  height: 20px;
  width: auto;
  max-width: 50px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
}

.rank-faceit-img {
  height: 20px;
  width: 20px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
}

/* Compact Premier & Unranked Rating Badges in Ranks Table */
.ranks-table .cs-rating {
  font-size: 17.5px;
  line-height: 1;
}

.ranks-table .cs-rating .vertical-lines {
  height: 1.15em;
  width: 0.6em;
}

.ranks-table .cs-rating .label-outer {
  height: 1.15em;
  width: 2.55em;
  min-width: 2.55em;
  padding: 0 0.18em;
  border-radius: 2px;
}

.ranks-table .cs-rating .label-large {
  font-size: 0.62em;
}

.ranks-table .cs-rating .label-small {
  font-size: 0.52em;
}

.ranks-table .cs-rating .label-unranked {
  font-size: 0.70em;
}

@media (max-width: 768px) {
  .profile-two-columns {
    flex-direction: column;
  }
  .profile-ranks-col {
    width: 100%;
  }
  .ranks-table-container {
    max-height: 280px;
  }
  .leetify-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Steam Login Gateway & User Profile Bar
   ========================================================================== */

.login-gateway {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 480px;
  padding: 40px 16px;
}

.login-gateway-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}

.login-gateway-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.login-gateway-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.login-gateway-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.btn-steam-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #171a21;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  width: 100%;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-steam-login:hover {
  background: #2a475e;
  border-color: #66c0f4;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-steam-login svg {
  flex-shrink: 0;
}

.login-gateway-footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-subtle);
}

/* Header User Profile Bar */
.header-actions-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-user-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 6px 4px 10px;
}

.auth-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  object-fit: cover;
  background: var(--bg-surface-elevated);
}

.auth-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-role-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
}

.auth-role-badge.role-admin {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.auth-role-badge.role-user {
  background: var(--accent-blue-subtle);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Admin View Switcher */
.admin-view-toggle {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.admin-view-toggle .view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition);
}

.admin-view-toggle .view-btn:hover {
  color: var(--text-main);
}

.admin-view-toggle .view-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
}

.btn-danger, .btn-secondary.danger {
  color: var(--accent);
  border-color: var(--accent-subtle);
}

.btn-danger:hover, .btn-secondary.danger:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--text-primary);
}

/* ==========================================================================
   Invite Codes & Account Activation
   ========================================================================== */

.invite-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.input-invite {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-main);
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-invite:focus {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 14px;
}

.invite-error {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--accent-subtle);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius-sm);
  color: var(--accent-hover);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

/* Invites Admin Modal */
.modal-invites {
  max-width: 680px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.invites-modal-body {
  overflow-y: auto;
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.invites-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.invites-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.invites-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.invites-list-used {
  max-height: 180px;
}

.invite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: border-color var(--transition);
}

.invite-item:hover {
  border-color: var(--border-strong);
}

.invite-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.invite-code-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
  letter-spacing: 0.5px;
}

.invite-meta {
  font-size: 11px;
  color: var(--text-subtle);
  display: flex;
  gap: 8px;
  align-items: center;
}

.invite-tag-len {
  background: var(--border-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
}

.invite-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.invite-item-used {
  opacity: 0.65;
  background: var(--bg-surface);
}

.invite-empty-text {
  font-size: 12px;
  color: var(--text-subtle);
  text-align: center;
  padding: 18px 0;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Show Details Button & Games Needed Calculator Modal
   ========================================================================== */

.btn-show-details {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

.btn-show-details:hover {
  background: var(--bg-surface-active);
  color: var(--text-main);
  border-color: var(--border-strong);
  transform: translateY(-0.5px);
}

.modal-xp-calc {
  max-width: 680px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.xp-calc-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.xp-calc-player-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-full);
  padding: 2px 10px;
}

.xp-calc-body {
  overflow-y: auto;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Summary Card */
.xp-calc-summary-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  flex-wrap: wrap;
}

.xp-calc-summary-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.xp-calc-summary-val-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0;
}

.xp-calc-needed-val {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  letter-spacing: -1px;
}

.xp-calc-needed-unit {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.xp-calc-subnote {
  font-size: 12px;
  color: var(--text-subtle);
}

.xp-calc-summary-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.xp-calc-boost-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.xp-calc-boost-pill.boost-active {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
}

.xp-calc-boost-pill.boost-warn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
}

.xp-calc-boost-pill.boost-off {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.xp-calc-boost-pill.boost-danger {
  background: var(--accent-subtle);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: var(--accent-hover);
}

.xp-calc-boost-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.xp-calc-boost-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Quest Progress Box */
.xp-calc-quest-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.xp-calc-quest-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.xp-calc-section-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 3px;
  display: block;
}

.xp-calc-quest-desc {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.xp-calc-quest-deduction {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-subtle);
  background: var(--bg-surface-elevated);
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.xp-calc-quest-deduction.has-bonus {
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

.xp-slider-container {
  padding: 6px 4px 10px;
}

.xp-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--slider-pct, 0%), var(--border-subtle) var(--slider-pct, 0%), var(--border-subtle) 100%);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  margin-bottom: 12px;
  transition: background var(--transition-fast);
}

.xp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--accent);
  border: 2px solid var(--bg-surface);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.xp-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--accent-hover);
}

.xp-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--accent);
  border: 2px solid var(--bg-surface);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.xp-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  background: var(--accent-hover);
}

.xp-slider::-moz-range-progress {
  background-color: var(--accent);
  height: 6px;
  border-radius: var(--radius-full);
}

.xp-slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.xp-slider-ticks .tick {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  color: var(--text-subtle);
  cursor: pointer;
  transition: color var(--transition-fast);
  min-width: 50px;
  text-align: center;
}

.xp-slider-ticks .tick .tick-title {
  font-weight: 600;
}

.xp-slider-ticks .tick .tick-xp {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.xp-slider-ticks .tick.active {
  color: var(--text-main);
}

.xp-slider-ticks .tick.active .tick-title {
  color: var(--accent);
}

.xp-slider-ticks .tick.active .tick-xp {
  color: var(--accent-green);
  font-weight: 600;
}

/* Games Section */
.xp-calc-games-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xp-calc-games-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.xp-calc-games-header h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.xp-calc-games-note {
  font-size: 11px;
  color: var(--text-subtle);
}

.xp-calc-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.xp-game-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color var(--transition-fast);
}

.xp-game-card:hover {
  border-color: var(--border-strong);
}

.xp-game-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.xp-game-icon-wrap.comp-icon {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.xp-game-icon-wrap.wingman-icon {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.xp-game-icon-wrap.dm-icon {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.xp-game-icon-wrap.casual-icon {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.xp-game-content {
  flex: 1;
  min-width: 0;
}

.xp-game-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.xp-game-count-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 4px;
}

.xp-game-count {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  line-height: 1;
}

.xp-game-subcount {
  font-size: 20px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  line-height: 1;
}

.xp-game-count-unit,
.xp-game-sep {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.xp-game-sep {
  margin: 0 1px;
}

.xp-game-desc {
  font-size: 11px;
  color: var(--text-subtle);
  line-height: 1.3;
}

.xp-calc-complete-msg {
  padding: 14px 16px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  color: var(--accent-green);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 600px) {
  .xp-calc-cards-grid {
    grid-template-columns: 1fr;
  }
  .xp-calc-summary-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .xp-calc-summary-right {
    align-items: flex-start;
  }
}

/* ==========================================================================
   Profile Checker Page (steamcommunity.ceo & /profile/:target)
   ========================================================================== */

.profile-checker-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 16px 60px 16px;
}

.profile-checker-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.profile-navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.profile-brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--accent-subtle);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: var(--accent);
  line-height: 1.2;
}

.profile-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 420px;
}

.profile-search-input {
  flex: 1;
  height: 34px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12.5px;
  padding: 0 12px;
  outline: none;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.profile-search-input::placeholder {
  color: var(--text-subtle);
}

.profile-search-input:hover {
  border-color: var(--border-default);
}

.profile-search-input:focus {
  border-color: var(--accent);
  background: var(--bg-surface-hover);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.profile-search-btn {
  height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent-subtle);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.profile-search-btn svg {
  color: var(--accent);
  transition: color var(--transition-fast);
}

.profile-search-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.profile-search-btn:hover svg {
  color: #ffffff;
}

.profile-state-card {
  text-align: center;
  padding: 64px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.profile-empty-card {
  border-style: dashed;
}

.profile-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px auto;
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-error-card {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 24px;
}

.profile-header-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.profile-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.profile-avatar-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  flex-shrink: 0;
  overflow: hidden;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: block;
}

.profile-avatar-level {
  position: absolute;
  bottom: -6px;
  right: -6px;
}

.profile-identity-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-display-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.profile-cheater-flag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: #ff4d5a;
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: var(--radius-xs);
  padding: 2px 7px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: help;
}

.profile-links-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.profile-id-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.profile-id-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
}

.profile-link-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.profile-link-btn svg {
  opacity: 0.7;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.profile-link-btn:hover {
  color: var(--text-primary);
  border-color: rgba(220, 38, 38, 0.45);
  background: var(--accent-subtle);
}

.profile-link-btn:hover svg {
  opacity: 1;
  color: var(--accent);
  transform: translate(1px, -1px);
}

/* Minimalist Swiss Profile Header Stats (Columnar) */
.profile-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.header-steam-bans {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-ban-text,
.header-ban-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius-xs);
  color: #ff4d5a;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 7px;
  margin: 0;
  line-height: 1.2;
}

.profile-header-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 0;
}

.profile-stat-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.profile-stat-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  line-height: 1;
}

.profile-stat-val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  white-space: nowrap;
  line-height: 1;
  display: flex;
  align-items: center;
  min-height: 22px;
}

.profile-stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border-subtle);
  flex-shrink: 0;
}

/* Natural CS2 Rating scaling in Header (matches main page proportions) */
.profile-stat-val .cs-rating {
  font-size: 20px;
  line-height: 1;
}

/* Main Two-Column Profile Layout */
.profile-checker-wrapper .profile-two-columns {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.profile-checker-wrapper .profile-ranks-col {
  width: 296px;
  min-width: 284px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 20px;
}

.profile-checker-wrapper .profile-stats-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-section-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

/* Section Title with Crimson Accent Indicator */
.profile-checker-wrapper .profile-section-title {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.7px !important;
  color: var(--text-secondary) !important;
  text-transform: uppercase !important;
  height: 16px !important;
  line-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.profile-checker-wrapper .profile-section-title::before {
  content: '';
  display: inline-block;
  width: 2px;
  height: 11px;
  background: var(--accent);
  border-radius: 1px;
  flex-shrink: 0;
}

/* 2-Column Ranks Grid Panel */
.profile-ranks-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.profile-ranks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.profile-rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  min-height: 42px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
}

.profile-rank-item:nth-child(odd) {
  border-right: 1px solid var(--border-subtle);
}

.profile-rank-item:nth-last-child(1),
.profile-rank-item:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
}

.profile-rank-item:hover {
  background: var(--bg-surface-hover);
}

.profile-rank-item .rank-mode-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 24px;
  min-height: 24px;
  flex-shrink: 0;
}

.profile-rank-item .rank-mode-icon {
  width: 25px;
  height: 23px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.profile-rank-item .rank-mode-wm {
  width: 25px;
  height: 21px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  letter-spacing: 0.3px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-rank-item .rank-badge-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

/* Unified Rank Badge Scaling inside 2-Column Ranks Grid */
.profile-rank-item .rank-skillgroup-img {
  width: 56px;
  height: 23px;
  max-width: none;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.profile-rank-item .rank-faceit-img {
  width: 23px;
  height: 23px;
  max-width: none;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.profile-rank-item .cs-rating {
  font-size: 19.5px;
  line-height: 1;
}

/* Profile Stats Box Refinement */
.profile-checker-wrapper .stats-box-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  gap: 14px;
}

.profile-checker-wrapper .leetify-widget-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-checker-wrapper .leetify-widget-player-name {
  font-size: 16px;
  font-weight: 700;
}

.profile-checker-wrapper .leetify-mark-banner {
  height: 28px;
}

/* Rank History – Premier Seasons Cards */
.rank-history-section {
  margin-bottom: 24px;
}

.rank-history-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.season-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition-fast);
}

.season-card:hover {
  border-color: var(--border-default);
}

.season-card.season-card-empty {
  opacity: 0.72;
}

.season-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.season-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.season-card-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 1px 6px;
}

.season-card-ratings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.season-rating-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.season-rating-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* Natural CS2 Rating scaling in Season Cards */
.season-card .cs-rating {
  font-size: 19.5px;
  line-height: 1;
}

.season-unranked-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  background: var(--bg-surface-elevated);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-subtle);
  font-size: 10px;
  font-family: var(--font-mono);
}

/* FACEIT Statistics Panel */
.faceit-section {
  margin-bottom: 24px;
}

#faceit-container {
  width: 100%;
}

.faceit-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.faceit-header-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.faceit-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px 10px;
}

.faceit-profile-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.faceit-profile-link:hover {
  color: var(--text-primary);
  border-color: rgba(220, 38, 38, 0.45);
  background: var(--accent-subtle);
}

.faceit-unlinked-box {
  text-align: center;
  padding: 20px 16px;
  color: var(--text-muted);
  font-size: 12px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-subtle);
}

.faceit-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  vertical-align: middle;
  line-height: 1.2;
}

.faceit-badge-ban {
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(220, 38, 38, 0.45);
  color: #ff4d5a;
}

@media (max-width: 920px) {
  .profile-header-right {
    width: 100%;
    align-items: flex-start;
  }
  .header-steam-bans {
    justify-content: flex-start;
  }
  .profile-checker-wrapper .profile-two-columns {
    flex-direction: column;
  }
  .profile-checker-wrapper .profile-ranks-col {
    width: 100%;
    position: static;
  }
  .rank-history-grid {
    grid-template-columns: 1fr;
  }
  .faceit-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .profile-header-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 20px;
    gap: 16px;
  }
  .profile-header-stats {
    width: 100%;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
    gap: 14px;
  }
  .profile-stat-divider {
    display: none;
  }
}

@media (max-width: 540px) {
  .profile-search-form {
    max-width: 100%;
    width: 100%;
  }
  .profile-checker-wrapper .leetify-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   CS2 Chicken / Egg Tracker Card
   ============================================================ */
.pet-card,
.chicken-lightbox {
  --chicken-border: rgba(220, 38, 38, 0.52);
  --chicken-bg-glow: rgba(220, 38, 38, 0.22);
  --chicken-bg-soft: rgba(220, 38, 38, 0.13);
  --chicken-grad-start: #b91c1c;
  --chicken-grad-end: #ef4444;
  --chicken-text-dark: #f87171;
  --chicken-text-light: #dc2626;
  --chicken-text: var(--chicken-text-dark);
}

[data-theme="light"] .pet-card,
[data-theme="light"] .chicken-lightbox {
  --chicken-text: var(--chicken-text-light);
}

.pet-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
  transition: border-color var(--transition);
}

.pet-card:hover {
  border-color: var(--border-default);
}

.pet-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.pet-identity-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.pet-icon-box {
  width: 54px;
  height: 54px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at 50% 58%, var(--chicken-bg-glow) 0%, var(--bg-surface-elevated) 84%);
  border: 1.5px solid var(--chicken-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  appearance: none;
  outline: none;
}

.pet-icon-clickable {
  cursor: zoom-in;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), border-color 200ms ease, box-shadow 200ms ease;
}

.pet-icon-clickable:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 16px var(--chicken-bg-glow);
}

.pet-icon-clickable:active {
  transform: scale(0.97);
}

.pet-icon-clickable:focus-visible {
  box-shadow: var(--focus-ring);
}

.pet-skin-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.pet-icon-clickable:hover .pet-skin-img {
  transform: scale(1.08);
}

.pet-title-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.pet-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pet-card-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-family: var(--font-mono);
}

.pet-name-main {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.pet-stage-badge {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.4px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
}

.pet-stage-badge.pet-stage-themed {
  color: var(--chicken-text);
  background: var(--chicken-bg-soft);
  border-color: var(--chicken-border);
}

.pet-stage-badge.stage-unlinked {
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
}

.pet-breed-pill {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 1px 7px;
  border-radius: var(--radius-xs);
}

.pet-empty-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.pet-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pet-meta-item {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.pet-meta-item + .pet-meta-item::before {
  content: "•";
  margin-right: 10px;
  color: var(--text-subtle);
}

.pet-meta-pill {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  cursor: help;
}

.pet-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pet-account-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 11px;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
}

.pet-account-select:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.pet-connect-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pet-connect-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.pet-connect-pill.copied {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: var(--accent-green-subtle);
}

.pet-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pet-refresh-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.pet-refresh-btn.spinning svg {
  animation: spin 0.6s linear infinite;
}

/* 4-Stage Stepper */
.pet-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  gap: 8px;
}

.pet-step {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.pet-step-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-muted);
}

.pet-step.completed .pet-step-dot {
  background: var(--chicken-bg-soft);
  border-color: var(--chicken-border);
  color: var(--chicken-text);
}

.pet-step.current .pet-step-dot {
  background: var(--chicken-bg-soft);
  border-color: var(--chicken-border);
  color: var(--chicken-text);
  box-shadow: 0 0 0 3px var(--chicken-bg-soft);
}

.pet-step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.pet-step.completed .pet-step-label {
  color: var(--text-secondary);
}

.pet-step.current .pet-step-label {
  color: var(--text-primary);
  font-weight: 700;
}

.pet-step-connector {
  flex: 1;
  height: 2px;
  background: var(--border-subtle);
  min-width: 14px;
  border-radius: 2px;
}

.pet-step-connector.completed {
  background: linear-gradient(90deg, var(--chicken-grad-start), var(--chicken-grad-end));
}

/* Metrics Grid (Growth Progress & Hunger Countdown) */
.pet-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.pet-metric-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pet-metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pet-metric-label-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pet-metric-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pet-metric-sub {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.pet-hunger-badge {
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.4px;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.pet-hunger-badge.badge-green {
  color: var(--accent-green);
  background: var(--accent-green-subtle);
  border-color: rgba(16, 185, 129, 0.3);
}

.pet-hunger-badge.badge-amber {
  color: var(--accent-amber);
  background: var(--accent-amber-subtle);
  border-color: rgba(245, 158, 11, 0.3);
}

.pet-hunger-badge.badge-crimson {
  color: var(--accent);
  background: var(--accent-subtle);
  border-color: rgba(220, 38, 38, 0.35);
}

.pet-metric-timer {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.pet-metric-timer.timer-chicken-theme {
  color: var(--chicken-text);
}

.pet-metric-timer.timer-green {
  color: var(--accent-green);
}

.pet-metric-timer.timer-blue {
  color: var(--accent-blue);
}

.pet-metric-timer.timer-amber {
  color: var(--accent-amber);
}

.pet-metric-timer.timer-crimson {
  color: var(--accent);
}

.pet-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

[data-theme="light"] .pet-progress-track {
  background: rgba(0, 0, 0, 0.08);
}

.pet-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.35s ease;
}

.pet-progress-fill.fill-chicken-theme {
  background: linear-gradient(90deg, var(--chicken-grad-start), var(--chicken-grad-end));
}

.pet-progress-fill.fill-blue {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.pet-progress-fill.fill-green {
  background: linear-gradient(90deg, #059669, #10b981);
}

.pet-progress-fill.fill-amber {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.pet-progress-fill.fill-crimson {
  background: linear-gradient(90deg, #b91c1c, #ef4444);
}

/* Expanded Chicken / Egg Lightbox Modal */
.chicken-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 7, 10, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chicken-lightbox.open {
  opacity: 1;
}

.chicken-lightbox.closing {
  opacity: 0;
}

.chicken-lightbox-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--bg-surface);
  border: 1.5px solid var(--chicken-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg), 0 0 42px var(--chicken-bg-glow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: scale(0.84) translateY(14px);
  opacity: 0;
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), opacity 220ms ease;
}

.chicken-lightbox.open .chicken-lightbox-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.chicken-lightbox.closing .chicken-lightbox-card {
  transform: scale(0.90) translateY(8px);
  opacity: 0;
}

.chicken-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: all var(--transition-fast);
}

.chicken-lightbox-close:hover {
  color: var(--text-primary);
  border-color: var(--chicken-border);
  background: var(--bg-surface-hover);
}

.chicken-lightbox-stage-frame {
  width: 100%;
  height: 270px;
  border-radius: var(--radius-md);
  border: 1px solid var(--chicken-border);
  background: radial-gradient(circle at 50% 56%, var(--chicken-bg-glow) 0%, var(--bg-surface-elevated) 78%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow: hidden;
}

.chicken-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55));
  transform: scale(0.92);
  transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chicken-lightbox.open .chicken-lightbox-img {
  transform: scale(1);
}

.chicken-lightbox-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
}

.chicken-lightbox-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chicken-lightbox-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.chicken-lightbox-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 720px) {
  .pet-metrics-grid {
    grid-template-columns: 1fr;
  }
  .pet-stepper-row {
    overflow-x: auto;
  }
}




