/* ============================================
   R6 分析器 - STATS.CC 风格设计
   大气背景 + 深色遮罩 + 极简UI + 金色点缀
   ============================================ */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/Inter-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/Inter-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/Inter-700.woff2') format('woff2');
}

:root {
  --bg-dark: #0a0a0b;
  --bg-card: rgba(20, 20, 22, 0.9);
  --bg-input: rgba(30, 30, 35, 0.8);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);

  --accent-gold: #c9a227;
  --accent-gold-hover: #e0b832;

  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(201, 162, 39, 0.5);

  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.6);

  --font-main: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================
   基础重置
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   背景效果
   ============================================ */

.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* R6 风格的战术背景 - 使用渐变模拟 */
  background:
    radial-gradient(ellipse at 20% 30%, rgba(30, 40, 50, 0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(40, 35, 30, 0.5) 0%, transparent 50%),
    linear-gradient(180deg, #0d0d10 0%, #15151a 50%, #0a0a0c 100%);
  z-index: -2;
}

/* 添加网格纹理 */
.bg-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: -1;
}

/* ============================================
   页面容器
   ============================================ */

.page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px 120px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}


/* 左上角固定：微信 / 爱发电按钮 */
.qr-buttons-fixed {
  position: absolute;
  left: 20px;
  top: 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  z-index: 30;
}

.qr-fixed-btn {
  padding: 8px 14px;
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.qr-fixed-btn:hover {
  color: var(--accent-gold);
  border-color: rgba(201, 162, 39, 0.4);
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.08) 0%, rgba(201, 162, 39, 0.02) 100%);
  transform: translateY(-1px);
}

.qr-fixed-btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qr-fixed-icon {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

/* 二维码弹窗 */
.qr-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.qr-modal-overlay.hidden {
  pointer-events: none;
  opacity: 0;
}

.qr-modal {
  position: relative;
  padding: 20px 24px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  max-width: min(320px, calc(100vw - 48px));
}

.qr-modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.qr-modal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.qr-modal-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  padding-right: 28px;
}

.qr-modal-image {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: 8px;
  margin: 0 auto;
}

/* ============================================
   头部 Logo
   ============================================ */

.main-header {
  text-align: center;
  margin-bottom: 28px;
}

body.landing-centered .main-header {
  margin-top: auto;
}

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

.logo-container {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  animation: fadeInDown 0.8s ease-out;
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

.logo-text {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--text-primary);
}

.logo-assistant-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ============================================
   搜索区域
   ============================================ */

.search-section {
  text-align: center;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

body.landing-centered .search-section {
  margin-bottom: auto;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-title {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 20px;
  color: var(--text-primary);
}

.main-subtitle {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  margin: 0 0 48px;
  letter-spacing: 0.05em;
}

.mode-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 4px;
}

.mode-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-tab:hover {
  color: var(--text-primary);
}

.mode-tab.is-active {
  background: rgba(201, 162, 39, 0.2);
  color: var(--accent-gold-hover);
}

.mode-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mode-panel {
  width: 100%;
}


/* ============================================
   搜索表单
   ============================================ */

.search-form {
  max-width: 560px;
  margin: 0 auto;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.search-bar:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 0 30px rgba(201, 162, 39, 0.15);
}

.search-bar input {
  flex: 1;
  padding: 16px 20px;
  font-size: 16px;
  font-family: var(--font-main);
  font-weight: 400;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
}

.search-bar input:hover,
.search-bar input:focus,
.search-bar input:active {
  background: transparent !important;
  color: var(--text-primary);
}

/* Keep dark style when browser autocomplete/datalist state is applied */
.search-bar input:-webkit-autofill,
.search-bar input:-webkit-autofill:hover,
.search-bar input:-webkit-autofill:focus,
.search-bar input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text-primary);
  caret-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px rgba(30, 30, 35, 0.8) inset;
  transition: background-color 9999s ease-out 0s;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gold);
  border: none;
  border-radius: 8px;
  color: var(--bg-dark);
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-btn:hover {
  background: var(--accent-gold-hover);
  transform: scale(1.05);
}

.search-btn:active {
  transform: scale(0.95);
}

.search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.search-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.history-trigger-btn {
  width: 40px;
  height: 40px;
  margin-right: 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.history-trigger-btn:hover {
  color: var(--accent-gold);
  border-color: rgba(239, 185, 72, 0.35);
  background: rgba(239, 185, 72, 0.08);
}

.history-trigger-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.id-history-popover {
  position: fixed;
  z-index: 180;
  min-width: 240px;
  max-height: 300px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(24, 27, 37, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.58);
}

.id-history-list {
  display: grid;
  gap: 4px;
  max-height: 236px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(239, 185, 72, 0.68) rgba(255, 255, 255, 0.08);
}

.id-history-list::-webkit-scrollbar {
  width: 10px;
}

.id-history-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.id-history-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(239, 185, 72, 0.82), rgba(201, 162, 39, 0.7));
  border-radius: 999px;
  border: 2px solid rgba(19, 22, 32, 0.92);
}

.id-history-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(247, 197, 88, 0.92), rgba(214, 173, 54, 0.82));
}

.id-history-empty {
  padding: 10px 12px;
  text-align: left;
  color: var(--text-muted);
  font-size: 13px;
}

.id-history-section {
  display: grid;
  gap: 4px;
}

.id-history-section + .id-history-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(212, 175, 55, 0.14);
}

.id-history-section-title {
  padding: 2px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(243, 225, 168, 0.78);
  text-transform: uppercase;
}

.id-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
}

.id-history-row-suggestion {
  grid-template-columns: minmax(0, 1fr);
}

.id-history-pick {
  border: 0;
  background: transparent;
  color: var(--text-primary);
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.id-history-pick:hover,
.id-history-pick:focus-visible {
  outline: none;
  background: rgba(212, 175, 55, 0.12);
  color: #f3e1a8;
  box-shadow: inset 2px 0 0 rgba(212, 175, 55, 0.85);
}

.id-history-icon {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.9);
  position: relative;
  flex: 0 0 14px;
}

.id-history-icon::before {
  content: "";
  position: absolute;
  width: 1px;
  height: 4px;
  left: 6px;
  top: 2px;
  background: rgba(212, 175, 55, 0.95);
}

.id-history-icon::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 1px;
  left: 6px;
  top: 6px;
  background: rgba(212, 175, 55, 0.95);
}

.id-history-text {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.id-history-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.id-history-subtext {
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.id-history-icon-suggestion {
  border-color: rgba(98, 206, 173, 0.88);
  background: rgba(98, 206, 173, 0.14);
}

.id-history-icon-suggestion::before {
  width: 6px;
  height: 1px;
  left: 3px;
  top: 6px;
  background: rgba(98, 206, 173, 0.95);
}

.id-history-icon-suggestion::after {
  width: 3px;
  height: 3px;
  left: 8px;
  top: 3px;
  border-top: 1px solid rgba(98, 206, 173, 0.95);
  border-right: 1px solid rgba(98, 206, 173, 0.95);
  background: transparent;
  transform: rotate(45deg);
}

.id-history-info {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.id-history-info.is-error {
  color: #ffb3b3;
  background: rgba(255, 107, 107, 0.08);
}

.id-history-remove {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.id-history-remove:hover,
.id-history-remove:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: #ff8c8c;
}

.id-history-clear {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 9px 8px 4px;
  text-align: center;
  cursor: pointer;
  transition: color 0.18s ease;
}

.id-history-clear:hover,
.id-history-clear:focus-visible {
  outline: none;
  color: var(--accent-gold);
}

.compare-players-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.compare-input {
  margin-bottom: 0;
}

.swap-btn {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.swap-btn:hover {
  border-color: var(--border-hover);
  color: var(--accent-gold);
}

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

.compare-submit-row {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.compare-submit-btn {
  min-width: 180px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--accent-gold);
  color: var(--bg-dark);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.compare-submit-btn:hover {
  background: var(--accent-gold-hover);
}

.compare-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 选项栏 */
.options-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.option-item {
  flex: 1;
  max-width: 140px;
}

.option-item-language {
  display: none;
}

.option-item-segmented {
  flex: 1.4;
  max-width: 240px;
}

.option-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  text-align: center;
  transition: all 0.2s ease;
}

.option-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.option-select:hover {
  border-color: var(--border-hover);
}

.option-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.option-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(var(--segment-count, 3), minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(20, 24, 38, 0.95), rgba(22, 24, 34, 0.95));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.segmented-control.is-disabled {
  opacity: 0.6;
}

.segment-btn {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.segment-btn:hover {
  border-color: rgba(239, 185, 72, 0.35);
  color: var(--text-primary);
  background: rgba(239, 185, 72, 0.1);
}

.segment-btn.is-active {
  border-color: var(--accent-gold);
  background: linear-gradient(180deg, rgba(239, 185, 72, 0.27), rgba(239, 185, 72, 0.16));
  color: #f6d274;
  box-shadow: 0 0 0 1px rgba(239, 185, 72, 0.2);
}

.segment-btn:disabled {
  cursor: not-allowed;
}

.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropdown.season-dropdown {
  width: 140px;
}

.dropdown-trigger {
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(20, 24, 38, 0.96), rgba(21, 23, 34, 0.96));
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 700;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.dropdown-trigger:hover {
  border-color: rgba(239, 185, 72, 0.45);
  box-shadow: 0 0 0 1px rgba(239, 185, 72, 0.15);
}

.dropdown-trigger:focus-visible {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(239, 185, 72, 0.2);
}

.dropdown-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-caret {
  color: var(--accent-gold);
  transition: transform 0.18s ease;
}

.custom-dropdown.is-open .dropdown-caret {
  transform: rotate(180deg);
}

.custom-dropdown.is-disabled .dropdown-trigger {
  opacity: 0.6;
  cursor: not-allowed;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  min-width: 210px;
  width: max-content;
  max-width: min(320px, 100vw - 24px);
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(239, 185, 72, 0.48);
  background: rgba(19, 22, 32, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  display: none;
}

.season-dropdown .dropdown-menu {
  left: 0;
  right: auto;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

.custom-dropdown.is-open .dropdown-menu {
  display: block;
}

.dropdown-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d4d8e2;
  text-align: left;
  padding: 9px 11px;
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
  background: #efb948;
  color: #121212;
  outline: none;
}

.dropdown-item.is-active {
  background: rgba(239, 185, 72, 0.22);
  color: #f6d274;
}

.model-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.model-option {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.model-option:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.model-option.is-active {
  border-color: rgba(239, 185, 72, 0.9);
  box-shadow: 0 0 0 1px rgba(239, 185, 72, 0.24), 0 8px 18px rgba(0, 0, 0, 0.22);
  background: rgba(239, 185, 72, 0.1);
}

.model-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.model-option img {
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
}

.model-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.model-option.is-disabled:hover {
  border-color: var(--border-color);
  transform: none;
  box-shadow: none;
}

/* 调试选项 */
.debug-options {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.debug-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.debug-toggle:hover {
  color: var(--text-secondary);
}

.debug-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-slider {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.debug-toggle input:checked + .toggle-slider {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.debug-toggle input:checked + .toggle-slider::after {
  left: 18px;
  background: var(--bg-dark);
}

/* 状态信息 */
.status-area {
  min-height: 24px;
}

.status-msg {
  font-size: 13px;
  color: var(--accent-gold);
  margin: 0;
}

.error-msg {
  font-size: 13px;
  color: #ff4757;
  margin: 4px 0 0;
}

/* ============================================
   结果区域
   ============================================ */

.result-section {
  margin-top: 80px;
  animation: fadeIn 0.5s ease-out;
}

.compare-summary {
  margin-bottom: 22px;
}

.match-list {
  display: grid;
  gap: 12px;
  margin: 14px auto 0;
  width: 100%;
  max-width: 800px;
  padding-inline: 0;
}

.match-day-group {
  display: grid;
  gap: 10px;
}

.match-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 0;
}

.match-day-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.match-day-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: #f0f4ff;
}

.match-day-count {
  min-width: 36px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d9e2f1;
  font-size: 20px;
  font-weight: 700;
}

.match-day-metrics {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px;
}

.match-day-metric {
  color: #dce4f3;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.match-day-wl {
  color: #dce4f3;
}

.match-day-win {
  color: #63e9b2;
}

.match-day-loss {
  color: #f06d74;
}

.match-day-sep {
  color: #c6d0e3;
}

.match-day-cards {
  display: grid;
  gap: 12px;
}

.match-list-toolbar {
  width: 100%;
  max-width: 800px;
  margin: 10px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #aeb7ca;
  font-size: 13px;
}

.match-list-count {
  font-weight: 600;
}

.match-list-toggle-btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: #eaf0ff;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
}

.match-list-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.match-list-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.match-card {
  border: 1px solid rgba(124, 134, 155, 0.38);
  border-radius: 12px;
  padding: 14px 16px;
  background: linear-gradient(100deg, rgba(27, 30, 38, 0.92), rgba(21, 23, 29, 0.96));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}
.match-card.is-expanded {
  border-color: rgba(201, 162, 39, 0.62);
}

.match-card.is-analysis-active {
  border-color: rgba(224, 184, 50, 0.82);
  box-shadow: 0 0 0 1px rgba(224, 184, 50, 0.45), 0 14px 30px rgba(0, 0, 0, 0.28);
}

.match-card.is-win {
  border-color: rgba(46, 191, 138, 0.52);
}

.match-card.is-loss {
  border-color: rgba(216, 84, 95, 0.52);
}

.match-card.is-analysis-active,
.match-card.is-analysis-active.is-win,
.match-card.is-analysis-active.is-loss {
  border-color: rgba(224, 184, 50, 0.82);
  box-shadow: 0 0 0 1px rgba(224, 184, 50, 0.45), 0 14px 30px rgba(0, 0, 0, 0.28);
}

.match-main {
  display: grid;
  grid-template-columns:
    minmax(0, 1.35fr)
    minmax(0, 0.72fr)
    minmax(0, 0.8fr)
    minmax(0, 0.95fr)
    minmax(0, 0.6fr)
    minmax(0, 0.7fr)
    minmax(0, 0.6fr)
    auto;
  align-items: center;
  gap: 10px;
}

.match-left {
  min-width: 0;
  grid-column: 1;
}

.match-title {
  margin: 0 0 6px;
  color: #f0f4ff;
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-time {
  margin: 0;
  color: #aeb7ca;
  font-size: 14px;
}

.match-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #d8dee9;
  grid-column: 2;
}

.match-score-arrow {
  font-size: 0.9em;
}

.match-score-value {
  font-variant-numeric: tabular-nums;
}

.match-score.is-win {
  color: #35d6a2;
}

.match-score.is-loss {
  color: #f06d74;
}

.match-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.metric-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8f9cb2;
  font-weight: 700;
}

.metric-value {
  color: #f4f7ff;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.match-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  align-content: center;
  justify-content: center;
  min-height: 34px;
  justify-self: center;
  grid-column: 3;
}

.match-highlights.is-empty {
  display: none;
}

.match-rank-col {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  justify-self: center;
  grid-column: 4;
}

.match-rank-col.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.match-rank-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rank-name {
  display: none;
}

.rank-main {
  font-size: 18px;
  font-weight: 800;
  color: #f3f7ff;
}

.rank-delta {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 1px 7px;
  font-size: 14px;
  font-weight: 700;
}

.rank-delta.is-plus {
  color: #63e9b2;
  border-color: rgba(99, 233, 178, 0.55);
  background: rgba(99, 233, 178, 0.08);
}

.rank-delta.is-minus {
  color: #f06d74;
  border-color: rgba(240, 109, 116, 0.55);
  background: rgba(240, 109, 116, 0.08);
}

.rank-delta.is-neutral {
  color: #cbd5e7;
  border-color: rgba(203, 213, 231, 0.3);
  background: rgba(203, 213, 231, 0.06);
}

.match-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  border: 1px solid;
  white-space: nowrap;
}

.match-tag.is-positive {
  color: #d9be66;
  border-color: rgba(217, 190, 102, 0.55);
  background: rgba(217, 190, 102, 0.08);
}

.match-tag.is-lost {
  color: #f06d74;
  border-color: rgba(240, 109, 116, 0.55);
  background: rgba(240, 109, 116, 0.08);
}

.match-tag.is-empty {
  color: #8f9cb2;
  border-color: rgba(143, 156, 178, 0.35);
  background: rgba(143, 156, 178, 0.08);
}

.match-action-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  grid-column: 8;
}

.match-expand-indicator {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: #d7e2f8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.match-expand-indicator svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.match-card.is-expanded .match-expand-indicator {
  transform: rotate(180deg);
  background: rgba(224, 184, 50, 0.12);
  border-color: rgba(224, 184, 50, 0.48);
}

.match-metric-kd {
  grid-column: 5;
}

.match-metric-kda {
  grid-column: 6;
}

.match-metric-hs {
  grid-column: 7;
}

.analyze-match-btn {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
}

.analyze-match-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.analyze-match-btn:disabled {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.2);
  color: #c8cfdb;
  opacity: 0.7;
  cursor: not-allowed;
}

.match-detail-panel {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.match-detail-loading,
.match-detail-error,
.match-detail-empty {
  color: #c5cede;
  font-size: 13px;
  padding: 6px 2px;
}

.match-detail-error {
  color: #ff6c78;
}

.match-detail-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(170, 184, 212, 0.62) rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.match-detail-scroll::-webkit-scrollbar {
  height: 10px;
}

.match-detail-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.match-detail-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(99, 233, 178, 0.78), rgba(117, 134, 167, 0.78));
  border-radius: 999px;
  border: 2px solid rgba(14, 16, 22, 0.92);
}

.match-detail-table {
  width: max-content;
  min-width: max(100%, 920px);
  border-collapse: collapse;
  table-layout: auto;
}

.match-detail-table th,
.match-detail-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 9px 8px;
  font-size: 12px;
  color: #eaf0ff;
  text-align: center;
  vertical-align: middle;
}

.match-detail-table th.col-rank,
.match-detail-table td.col-rank {
  min-width: 64px;
}

.match-detail-table th.col-player,
.match-detail-table td.col-player {
  min-width: 148px;
}

.match-detail-table th.col-kda,
.match-detail-table td.col-kda {
  min-width: 98px;
}

.match-detail-table th.col-kd,
.match-detail-table td.col-kd {
  min-width: 66px;
}

.match-detail-table th.col-season_map_kd,
.match-detail-table td.col-season_map_kd {
  min-width: 90px;
}

.match-detail-table th.col-season_kd,
.match-detail-table td.col-season_kd {
  min-width: 82px;
}

.match-detail-table th.col-stack,
.match-detail-table td.col-stack {
  min-width: 78px;
}

.stack-party {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 20px;
  padding: 0 8px;
  border-radius: 3px;
  color: #e4ebf8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 3px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.stack-party-1 { border-left-color: #5cc8ff; }
.stack-party-2 { border-left-color: #66d49f; }
.stack-party-3 { border-left-color: #f2b06c; }
.stack-party-4 { border-left-color: #f07d86; }
.stack-party-5 { border-left-color: #b8a7ff; }

.match-detail-table th {
  color: #9dacc7;
  letter-spacing: 0.04em;
  font-weight: 700;
  text-transform: uppercase;
  white-space: pre-line;
  line-height: 1.25;
}

.match-detail-table td.is-peaks > div {
  line-height: 1.45;
  white-space: nowrap;
}
.peak-rank-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.match-detail-table td.is-peaks.is-peaks-icons .peak-rank-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  position: relative;
}
.peak-rank-icon {
  width: 20px;
  height: 20px;
}

.match-detail-table tr.team-0 td {
  background-color: rgba(53, 214, 162, 0.06);
}

.match-detail-table tr.team-1 td {
  background-color: rgba(240, 109, 116, 0.06);
}

.match-detail-table th:first-child,
.match-detail-table td.is-player {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 4;
  text-align: left;
  padding-left: 12px;
  padding-right: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(90deg, rgba(16, 18, 24, 0.98), rgba(16, 18, 24, 0.96) 78%, rgba(16, 18, 24, 0.78));
  box-shadow: 12px 0 14px rgba(6, 8, 12, 0.4);
}

.match-detail-table th:first-child {
  z-index: 5;
}

.rank-cell {
  white-space: nowrap;
}
.rank-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rank-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
}

.rank-pos-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  color: #f5f7ff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

.rank-fallback {
  display: none;
  color: #d9e2f1;
  font-size: 12px;
}

.search-bar input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 980px) {
  .match-list {
    max-width: 100%;
    padding-inline: 6px;
    gap: 10px;
    text-align: left;
    min-width: 0;
  }

  .match-day-group,
  .match-day-cards {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .match-day-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-inline: 4px;
  }

  .match-day-title {
    font-size: 16px;
  }

  .match-day-count {
    min-width: 28px;
    height: 24px;
    font-size: 15px;
  }

  .match-day-metrics {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
    row-gap: 6px;
  }

  .match-day-metric {
    font-size: 12px;
    font-weight: 700;
  }

  .match-day-wl {
    font-size: 14px;
  }

  .match-card {
    position: relative;
    padding: 12px 12px 10px;
    border-radius: 12px;
    border-color: rgba(124, 134, 155, 0.28);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .match-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 4px;
    background: rgba(143, 156, 178, 0.58);
  }

  .match-card.is-win::before {
    background: rgba(99, 233, 178, 0.92);
    box-shadow: 0 0 12px rgba(99, 233, 178, 0.28);
  }

  .match-card.is-loss::before {
    background: rgba(240, 109, 116, 0.92);
    box-shadow: 0 0 12px rgba(240, 109, 116, 0.25);
  }

  .match-main {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "left rank"
      "score kd"
      "kda hs"
      "tags action";
    gap: 6px 10px;
    align-items: start;
  }

  .match-left {
    grid-area: left;
    min-width: 0;
    text-align: left;
  }

  .match-title {
    margin-bottom: 4px;
    font-size: 15px;
    line-height: 1.25;
  }

  .match-time {
    font-size: 12px;
    color: #8f9cb2;
  }

  .match-rank-col {
    grid-area: rank;
    justify-self: end;
    min-height: auto;
    justify-content: flex-end;
    gap: 5px;
  }

  .match-rank-meta {
    gap: 4px;
  }

  .rank-name {
    display: none;
  }

  .rank-main {
    font-size: 15px;
    line-height: 1;
  }

  .rank-delta {
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 6px;
  }

  .match-score {
    grid-area: score;
    justify-self: start;
    font-size: 26px;
    font-weight: 900;
    padding: 0;
    border-radius: 0;
    background: transparent;
    line-height: 1;
  }

  .match-score.is-win {
    color: #63e9b2;
    background: transparent;
  }

  .match-score.is-loss {
    color: #ff7c84;
    background: transparent;
  }

  .match-score-arrow {
    font-size: 0.62em;
  }

  .match-highlights {
    grid-area: tags;
    min-height: 0;
    justify-self: start;
    justify-content: flex-start;
    align-content: flex-start;
    gap: 5px;
  }

  .match-tag {
    padding: 1px 8px;
    font-size: 12px;
  }

  .match-metric {
    align-items: flex-start;
    gap: 1px;
    text-align: left;
  }

  .match-metric-kd {
    grid-area: kd;
  }

  .match-metric-kda {
    grid-area: kda;
  }

  .match-metric-hs {
    grid-area: hs;
  }

  .metric-label {
    font-size: 10px;
    letter-spacing: 0.02em;
    color: #8290a7;
    font-weight: 700;
  }

  .match-metric-kda .metric-value {
    font-size: 19px;
    line-height: 1.15;
  }

  .match-metric-kd .metric-value,
  .match-metric-hs .metric-value {
    font-size: 18px;
    line-height: 1.15;
  }

  .match-action-wrap {
    grid-area: action;
    justify-content: flex-end;
    align-self: center;
    gap: 6px;
  }

  .analyze-match-btn {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    font-size: 13px;
    color: #fff;
    font-weight: 700;
    line-height: 1.1;
  }

  .analyze-match-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }

  .analyze-match-btn:disabled {
    background: rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.2);
    color: #c8cfdb;
    opacity: 0.7;
  }

  .match-expand-indicator {
    width: 24px;
    height: 24px;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
  }

  .match-detail-panel {
    margin-top: 10px;
    padding-top: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .match-detail-scroll {
    margin-inline: 0;
    padding-bottom: 2px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .match-detail-table {
    min-width: 804px;
  }

  .match-detail-table th:first-child,
  .match-detail-table td.is-player {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    min-width: 106px;
    text-align: left;
    padding-left: 10px;
    padding-right: 12px;
    z-index: 4;
    background: linear-gradient(90deg, rgba(16, 18, 24, 0.98), rgba(16, 18, 24, 0.96) 78%, rgba(16, 18, 24, 0.72));
    box-shadow: 8px 0 12px rgba(5, 7, 10, 0.34);
  }

  .match-detail-table th:first-child {
    z-index: 5;
  }
}

.compare-overview {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

.compare-overview-main {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
}

.compare-overview-meta {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

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

.compare-kpi-col {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
}

.compare-kpi-col h3 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.compare-kpi-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.compare-kpi-item:last-child {
  margin-bottom: 0;
}

.compare-dimensions {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
}

.compare-dimensions-title {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.compare-dimensions table {
  font-size: 12px;
}

.compare-dimensions .dim-winner-a td {
  color: #8bd48b;
}

.compare-dimensions .dim-winner-b td {
  color: #f2a4a4;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* KPI 网格 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}

.kpi {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.kpi:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.kpi .name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.kpi .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

/* 分析容器 */
.analysis-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.analysis-context {
  margin: -8px 0 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.analysis-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

.analysis-text h1,
.analysis-text h2,
.analysis-text h3,
.analysis-text h4,
.analysis-text h5,
.analysis-text h6 {
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5em 0 0.75em;
}

.analysis-text h1 { font-size: 1.5em; }
.analysis-text h2 { font-size: 1.25em; }
.analysis-text h3 { font-size: 1.1em; }

.analysis-text p {
  margin: 0.75em 0;
}

.analysis-text ul {
  margin: 0.75em 0;
  padding-left: 24px;
}

.analysis-text li {
  margin: 0.4em 0;
}

.analysis-text code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent-gold);
}

.analysis-text a {
  color: var(--accent-gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.analysis-text a:hover {
  border-bottom-color: var(--accent-gold);
}

.analysis-text strong {
  font-weight: 600;
  color: var(--accent-gold);
}

.share-actions {
  margin: -4px 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.share-btn {
  border: 1px solid var(--accent-gold);
  background: transparent;
  color: var(--accent-gold);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  background: rgba(201, 162, 39, 0.14);
}

.share-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.share-status {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.share-status-error {
  color: #ff4757;
}

/* 反馈卡片 */
.feedback-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin-bottom: 24px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.feedback-content {
  padding: 24px 32px 28px;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feedback-rating-block {
  text-align: left;
}

.feedback-title {
  margin: 0 0 6px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}

.feedback-label {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.feedback-subtitle {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.feedback-score-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.feedback-score-btn {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  opacity: 0.72;
  min-height: 36px;
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.feedback-score-btn:hover {
  border-color: var(--accent-gold);
  opacity: 1;
  color: #f6d274;
}

.feedback-score-btn.is-active {
  border-color: var(--accent-gold);
  background: var(--accent-gold);
  color: var(--bg-dark);
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(239, 185, 72, 0.35), 0 8px 18px rgba(0, 0, 0, 0.2);
}

.feedback-score-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.feedback-followup {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.feedback-group {
  text-align: left;
}

.feedback-choice {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
  margin: 6px 0;
  cursor: pointer;
}

.feedback-choice input {
  margin-right: 8px;
}

.feedback-reason-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.feedback-reason-col {
  display: grid;
  gap: 8px;
}

.feedback-col-title {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.feedback-priority-list {
  display: grid;
  gap: 8px;
}

.feedback-option-card {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(124, 134, 155, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-option-card:hover {
  border-color: rgba(239, 185, 72, 0.45);
  background: rgba(239, 185, 72, 0.08);
}

.feedback-option-card.is-positive {
  border-color: rgba(82, 181, 210, 0.35);
  background: rgba(82, 181, 210, 0.08);
}

.feedback-option-card.is-negative {
  border-color: rgba(198, 122, 122, 0.35);
  background: rgba(198, 122, 122, 0.08);
}

.feedback-option-card.is-selected {
  border-color: var(--accent-gold);
  background: rgba(239, 185, 72, 0.16);
  box-shadow: 0 0 0 1px rgba(239, 185, 72, 0.22);
}

.feedback-form.is-locked .feedback-option-card {
  cursor: not-allowed;
  opacity: 0.75;
}

.feedback-priority-choice {
  border-color: rgba(124, 134, 155, 0.38);
  background: rgba(255, 255, 255, 0.02);
}

.feedback-group textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--font-main);
  outline: none;
}

.feedback-group textarea:focus {
  border-color: var(--accent-gold);
}

.feedback-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.feedback-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#feedback-submit {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent-gold);
  color: var(--bg-dark);
  font-weight: 600;
  cursor: pointer;
}

#feedback-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#feedback-submit.is-success {
  background: #5dbd7c;
  color: #0f1512;
}

.feedback-status {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.feedback-status-error {
  color: #ff4757;
}

/* 原始数据 */
.raw-data {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

.raw-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.raw-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.toggle-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.raw-data[open] .toggle-icon {
  transform: rotate(180deg);
}

.raw-content {
  padding: 0 32px 32px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-weight: 600;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ============================================
   底部
   ============================================ */

.main-footer {
  margin-top: auto;
  padding-top: 60px;
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-sep {
  color: var(--border-color);
}

/* ============================================
   工具类
   ============================================ */

.hidden {
  display: none !important;
}

.share-capture-shell {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 880px;
  pointer-events: none;
  z-index: -10;
}

.share-capture-sheet {
  width: 880px;
  background:
    radial-gradient(circle at 10% 0%, rgba(201, 162, 39, 0.16) 0, transparent 32%),
    radial-gradient(circle at 90% 100%, rgba(201, 162, 39, 0.16) 0, transparent 40%),
    #0f1014;
  color: #f8f8f8;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.share-capture-header {
  margin-bottom: 24px;
}

.share-capture-brand {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.08em;
  font-size: 12px;
}

.share-capture-title {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0.04em;
}

.share-capture-date {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.share-capture-context {
  margin: 10px 0 0;
  color: #e0b832;
  font-size: 13px;
  line-height: 1.5;
}

.share-capture-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.share-capture-kpis.is-compare {
  display: block;
}

.share-capture-kpis.is-compare .share-compare-summary {
  width: 100%;
}

.share-capture-kpis .kpi {
  background: rgba(255, 255, 255, 0.04);
}

.share-capture-kpis .share-compare-summary .compare-summary {
  margin: 0;
}

.share-capture-kpis .share-compare-summary .compare-overview,
.share-capture-kpis .share-compare-summary .compare-kpi-col,
.share-capture-kpis .share-compare-summary .compare-dimensions {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.share-capture-kpis .share-compare-summary .compare-kpis {
  grid-template-columns: 1fr 1fr;
}

.share-capture-analysis {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px;
  line-height: 1.8;
}

.share-capture-analysis h1,
.share-capture-analysis h2,
.share-capture-analysis h3,
.share-capture-analysis h4,
.share-capture-analysis h5,
.share-capture-analysis h6 {
  margin: 1.2em 0 0.6em;
}

.share-capture-analysis p:first-child,
.share-capture-analysis h1:first-child,
.share-capture-analysis h2:first-child,
.share-capture-analysis h3:first-child {
  margin-top: 0;
}

.share-capture-analysis a {
  color: #e0b832;
  text-decoration: none;
}

.share-capture-analysis strong {
  color: #e0b832;
  font-weight: 700;
}

.share-capture-footer {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
}

.share-capture-footer-title {
  margin: 0 0 8px;
  color: #e0b832;
  font-size: 15px;
  font-weight: 600;
}

.share-capture-footer-url {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  word-break: break-all;
}

.share-capture-qr {
  width: 164px;
  height: 164px;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
}

/* ============================================
   响应式
   ============================================ */

@media (max-width: 640px) {
  .qr-buttons-fixed {
    left: 12px;
    top: 8px;
    flex-direction: row;
    gap: 6px;
  }

  .page-container {
    padding: 40px 16px 80px;
  }

  .main-header {
    padding-top: 52px;
    margin-bottom: 18px;
  }

  .qr-fixed-btn {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 9px;
  }

  .qr-fixed-btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .qr-fixed-icon {
    width: 22px;
    height: 22px;
  }

  body.landing-centered .main-header {
    margin-top: 24px;
  }

  body.landing-centered .search-section {
    margin-bottom: 0;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
  }

  .logo-text {
    font-size: 18px;
    letter-spacing: 0.18em;
  }

  .logo-assistant-title {
    font-size: 12px;
  }

  .main-title {
    font-size: 18px;
  }

  .main-subtitle {
    font-size: 13px;
  }

  .search-form {
    max-width: 100%;
  }

  .options-bar {
    flex-direction: column;
  }

  .option-item {
    max-width: 100%;
  }

  .custom-dropdown.season-dropdown {
    width: 100%;
  }

  .compare-players-grid {
    grid-template-columns: 1fr;
  }

  .swap-btn {
    width: 100%;
  }

  .debug-options {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .kpi {
    padding: 11px 8px;
    border-radius: 10px;
  }

  .kpi .name {
    font-size: 10px;
    letter-spacing: 0.03em;
    margin-bottom: 5px;
  }

  .kpi .value {
    font-size: 17px;
    line-height: 1.15;
  }

  .compare-kpis {
    grid-template-columns: 1fr;
  }

  .analysis-container,
  .feedback-content,
  .raw-content {
    padding: 20px;
  }

  .feedback-score-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .feedback-reason-layout {
    grid-template-columns: 1fr;
  }

  .share-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .raw-toggle {
    padding: 16px 20px;
  }
}

@media (max-width: 400px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .kpi {
    padding: 10px 6px;
  }

  .kpi .value {
    font-size: 15px;
  }

  .match-score {
    font-size: 24px;
  }

  .match-metric-kda .metric-value {
    font-size: 18px;
  }

  .match-metric-kd .metric-value,
  .match-metric-hs .metric-value {
    font-size: 16px;
  }
}

/* Auth UI */
.auth-nav {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
}

.auth-link {
  color: #edf3ff;
  text-decoration: none;
  font-weight: 600;
  background: rgba(11, 16, 26, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 14px;
  line-height: 1.1;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.auth-link:hover {
  transform: translateY(-1px);
  background: rgba(16, 23, 36, 0.82);
  border-color: rgba(255, 255, 255, 0.24);
}

.auth-link:focus-visible {
  outline: 2px solid rgba(201, 162, 39, 0.95);
  outline-offset: 3px;
}

.auth-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(11, 16, 26, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.auth-icon-link:hover {
  transform: translateY(-1px);
  background: rgba(16, 23, 36, 0.82);
  border-color: rgba(255, 255, 255, 0.24);
}

.auth-icon-link:focus-visible {
  outline: 2px solid rgba(201, 162, 39, 0.95);
  outline-offset: 3px;
}

.auth-nav-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.22);
  transform-origin: center;
}

@media (max-width: 900px) {
  .auth-nav {
    top: 12px;
    right: 12px;
  }

  .auth-icon-link {
    width: 46px;
    height: 46px;
    padding: 3px;
  }

  .auth-link {
    padding: 9px 12px;
    font-size: 14px;
  }
}

/* ============================================
   认证页面 (登录/注册) - 与主页风格一致
   ============================================ */

.auth-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-main);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-logo .logo-icon {
  width: 36px;
  height: 36px;
  color: var(--accent-gold);
}

.auth-logo .logo-text {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.auth-card {
  width: min(92vw, 460px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
}

.auth-subtitle {
  margin: 0 0 20px;
  color: var(--text-secondary);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.auth-form input {
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.auth-form input::placeholder {
  color: var(--text-muted);
}

.auth-form button {
  margin-top: 6px;
  border: none;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-hover) 100%);
  color: #0a0a0b;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: filter 0.2s, transform 0.1s;
}

.auth-form button:hover {
  filter: brightness(1.1);
}

.auth-form button:active {
  transform: scale(0.98);
}

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

.auth-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: #8ee4a8;
  font-size: 14px;
}

.auth-status.auth-status-error {
  color: #ff6b6b;
}

.auth-footer-link {
  margin: 16px 0 0;
  color: var(--text-secondary);
  text-align: center;
}

.auth-footer-link a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer-link a:hover {
  text-decoration: underline;
}

.auth-card-wide {
  width: min(92vw, 520px);
}

.auth-title-main {
  text-align: center;
}

.auth-code-target {
  text-align: center;
  color: var(--text-secondary);
  margin: 6px 0 14px;
  font-size: 14px;
}

.auth-code-target strong {
  color: var(--text-primary);
}

.auth-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.auth-secondary-btn {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-secondary-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.auth-secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.account-settings-actions {
  margin-top: 14px;
}

.account-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

#account-email-input[readonly] {
  color: var(--text-muted);
  cursor: default;
}

.account-settings-shell {
  width: min(1140px, calc(100vw - 48px));
  min-height: min(730px, calc(100vh - 48px));
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background:
    radial-gradient(circle at top left, rgba(73, 96, 181, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(103, 64, 162, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(16, 18, 27, 0.96), rgba(13, 15, 22, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34), 0 8px 24px rgba(40, 69, 153, 0.12);
  position: relative;
  z-index: 1;
}

.account-settings-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.34;
}

.account-settings-sidebar,
.account-settings-main {
  position: relative;
  z-index: 1;
}

.account-settings-sidebar {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 28px 18px 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(11, 13, 20, 0.82), rgba(9, 11, 18, 0.68));
}

.account-settings-brand-wrap {
  display: grid;
  gap: 4px;
}

.account-settings-brand {
  font-size: 22px;
  font-weight: 700;
  color: #f6f7fb;
}

.account-settings-brand-sub {
  color: rgba(200, 206, 223, 0.66);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.account-settings-nav {
  display: grid;
  gap: 6px;
}

.account-settings-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px 10px 16px;
  border-radius: 12px;
  color: #d1d7e6;
  text-decoration: none;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.account-settings-nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background-color 0.22s ease, box-shadow 0.22s ease;
}

.account-settings-nav-item:hover {
  transform: translateX(1px);
  background: rgba(255, 255, 255, 0.04);
  color: #eef1f9;
}

.account-settings-nav-item.is-active {
  color: #f3d58b;
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(243, 213, 139, 0.14);
}

.account-settings-nav-item.is-active::before {
  background: linear-gradient(180deg, rgba(243, 213, 139, 1), rgba(124, 156, 255, 0.9));
  box-shadow: 0 0 16px rgba(124, 156, 255, 0.22);
}

.account-settings-nav-icon {
  width: 18px;
  height: 18px;
  color: currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}

.account-settings-nav-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.account-settings-home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.account-settings-home-link:hover {
  color: var(--accent-gold);
  transform: translateX(-1px);
}

.account-settings-home-icon {
  font-size: 14px;
}

.account-settings-main {
  padding: 40px;
  display: flex;
  align-items: flex-start;
}

.account-settings-panel {
  width: 100%;
  max-width: 780px;
  background: linear-gradient(180deg, rgba(31, 34, 46, 0.96), rgba(24, 27, 37, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26), 0 6px 18px rgba(46, 74, 154, 0.12);
}

.account-settings-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}

.account-settings-eyebrow {
  margin: 0 0 8px;
  color: rgba(174, 183, 202, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-settings-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.12;
  color: #fbfcff;
}

.account-settings-panel-subtitle {
  margin: 8px 0 0;
  color: rgba(201, 208, 224, 0.76);
  font-size: 14px;
  line-height: 1.5;
}

.account-settings-section {
  padding: 18px 18px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.account-settings-section + .account-settings-section {
  margin-top: 18px;
}

.account-settings-section-form {
  margin-top: 26px;
}

.account-settings-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.account-settings-section-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.account-settings-section-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a8c1ff;
  background: linear-gradient(180deg, rgba(85, 112, 201, 0.16), rgba(82, 58, 151, 0.18));
  border: 1px solid rgba(136, 159, 235, 0.14);
  flex: 0 0 34px;
}

.account-settings-section-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.account-settings-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #f3f6fd;
}

.account-settings-section-copy {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(185, 193, 210, 0.7);
}

.account-settings-info-value {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.account-settings-form {
  display: grid;
  gap: 10px;
}

.account-search-bar {
  margin-bottom: 0;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(11, 14, 22, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.account-search-bar:focus-within {
  border-color: rgba(124, 156, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(88, 117, 211, 0.12);
}

.account-search-bar input {
  min-width: 0;
}

.account-search-bar .history-trigger-btn {
  margin-right: 2px;
}

.account-settings-form-actions {
  display: flex;
  justify-content: flex-end;
}

.account-settings-card-footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.account-save-btn {
  min-width: 74px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(124, 156, 255, 0.4);
  border-radius: 10px;
  background: rgba(87, 112, 193, 0.06);
  color: #c9d7ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.account-save-btn:hover {
  background: rgba(87, 112, 193, 0.16);
  border-color: rgba(143, 171, 255, 0.65);
  color: #eef3ff;
  transform: translateY(-1px);
}

.account-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid rgba(255, 107, 107, 0.26);
  background: rgba(120, 31, 31, 0.1);
  color: #ff9d9d;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.account-logout-btn:hover {
  background: rgba(140, 38, 38, 0.18);
  border-color: rgba(255, 107, 107, 0.4);
  transform: translateY(-1px);
}

.account-settings-status {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .account-settings-shell {
    width: min(100vw - 24px, 760px);
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .account-settings-sidebar {
    gap: 16px;
    padding: 20px 18px 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .account-settings-main {
    padding: 18px;
  }

  .account-settings-panel {
    padding: 20px;
  }

  .account-settings-panel-head {
    margin-bottom: 22px;
  }

  .account-settings-title {
    font-size: 28px;
  }

}

@media (max-width: 560px) {
  .account-settings-shell {
    width: calc(100vw - 16px);
    border-radius: 14px;
  }

  .account-settings-sidebar {
    padding: 16px 14px 12px;
  }

  .account-settings-main {
    padding: 12px;
  }

  .account-settings-panel {
    padding: 16px;
  }

  .account-settings-section {
    padding: 16px;
  }

  .account-search-bar {
    padding: 3px;
  }

  .account-search-bar input {
    padding: 14px 16px;
  }

  .account-save-btn {
    min-width: 64px;
    font-size: 13px;
  }

  .account-settings-panel-head {
    margin-bottom: 18px;
  }

  .account-settings-title {
    font-size: 24px;
  }
}

/* 认证页面的隐藏类 */
.auth-page .hidden {
  display: none !important;
}
