:root {
  color-scheme: light;
  font-family: "PingFang SC", "Helvetica Neue", "Segoe UI", sans-serif;
  
  /* 清新配色方案 */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-accent: #e2e8f0;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-hover: rgba(255, 255, 255, 0.95);
  --border: rgba(148, 163, 184, 0.2);
  --border-hover: rgba(148, 163, 184, 0.4);
  
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-bg: rgba(59, 130, 246, 0.1);
  --accent-hover: rgba(59, 130, 246, 0.15);
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: var(--text-primary);
  overflow-x: hidden;
}

body {
  position: relative;
}

.bg-gradient,
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.bg-gradient {
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.1), transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.08), transparent 50%);
}

.bg-noise {
  z-index: -1;
  opacity: 0.03;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQiIGhlaWdodD0iNjQiIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgb3BhY2l0eT0iMC4xNSI+PHJlY3Qgd2lkdGg9IjIuNSIgaGVpZ2h0PSIyLjUiIGZpbGw9IiNmZmYiLz48cmVjdCB4PSIxMiIgd2lkdGg9IjEuNSIgaGVpZ2h0PSIxLjUiIGZpbGw9IiNmZmYiLz48cmVjdCB4PSIyOC41IiB5PSIxNSIgd2lkdGg9IjEuNSIgaGVpZ2h0PSIxLjUiIGZpbGw9IiNmZmYiLz48cmVjdCB4PSIzOS41IiB5PSIzMSIgd2lkdGg9IjEuNSIgaGVpZ2h0PSIxLjUiIGZpbGw9IiNmZmYiLz48cmVjdCB4PSI1MSIgeT0iMTIuNSIgd2lkdGg9IjEuNSIgaGVpZ2h0PSIxLjUiIGZpbGw9IiNmZmYiLz48cmVjdCB4PSI1OC41IiB5PSI0NS41IiB3aWR0aD0iMS41IiBoZWlnaHQ9IjEuNSIgZmlsbD0iI2ZmZiIvPjwvZz48L3N2Zz4=');
}

/* 顶部导航栏 */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-brand h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-stats {
  display: flex;
  gap: 1rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent-bg);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.language-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.language-control__label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.language-control select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.language-control select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 语言切换器 */
.language-switcher {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-btn {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.lang-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* 屏幕导航 - 更醒目的右侧导航 */
.screen-nav {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--surface);
  padding: 1.5rem 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
}

.nav-dot {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--bg-primary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.nav-dot::before {
  content: attr(data-index);
}

.nav-dot:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
  transform: scale(1.15);
  box-shadow: var(--shadow-md);
}

.nav-dot.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  transform: scale(1.2);
  box-shadow: 0 0 0 4px var(--accent-bg);
}

.nav-label {
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.nav-dot:hover .nav-label {
  opacity: 1;
  transform: translateY(-50%) translateX(-8px);
}

.nav-dot.active .nav-label {
  opacity: 1;
  transform: translateY(-50%) translateX(-8px);
  border-color: var(--accent);
  color: var(--accent);
}

/* 主容器 */
.main {
  padding: 6rem 1rem 4rem 1rem;
  min-height: 100vh;
  overflow: hidden;
}

/* 屏幕容器 - 改为上下切换动画 */
.screen {
  position: absolute;
  top: 6rem;
  left: 1rem;
  right: 1rem;
  bottom: 4rem;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.screen.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.screen.prev {
  transform: translateY(-100%);
}

.screen-content {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(280px, 320px) 1fr;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  gap: 1.5rem;
}

/* 侧边栏 */
.screen-sidebar {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 11rem);
  overflow: hidden;
  min-width: 280px;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-header p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.sidebar-controls {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 主内容区 */
.screen-main {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 11rem);
  overflow: hidden;
  min-width: 0;
}

.main-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.main-header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.main-header p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* 表单元素 */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.field__control input,
.field__control select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.field__control input:focus,
.field__control select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

/* 标签列表 */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-button:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}

.tag-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

/* 角色网格 */
.character-grid {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  align-content: start;
}

.character-card {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.character-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--card-from, var(--accent)), var(--card-to, var(--accent-light)));
}

.character-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.character-card[data-selected="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.character-card__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.character-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.character-card__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.character-card__subtitle {
  margin: 0.25rem 0 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.character-card__initial {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
}

.character-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.character-card__body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.tag-chip {
  padding: 0.25rem 0.75rem;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 500;
}

.character-intro {
  font-style: italic;
  color: var(--text-muted);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.character-card__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.character-card__action {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.character-card__action:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* 兼容性列表 */
.compatibility__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.compatibility__button {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.compatibility__button:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
}

.compatibility__button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* 兼容性详情 */
.compatibility__details {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.compatibility__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.compatibility__results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.compatibility-card {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.compatibility-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.compatibility-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.compatibility-card__name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.score-badge {
  padding: 0.5rem 1rem;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.score-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--score-width, 0%);
  background: linear-gradient(90deg, var(--accent-bg), transparent);
  transition: width 0.3s ease;
}

.synergy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.compatibility-card__notes {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 模拟器 */
.simulator__section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.simulator__section h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.simulator__stats,
.simulator__aptitudes,
.simulator__extras {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.simulator__stat-badge {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.25rem;
}

.simulator__reset {
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.simulator__reset:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.simulator__results {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.simulator__score-card {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.simulator__score-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.simulator__score-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.simulator__score-unit {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
}

.simulator__tier {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.simulator__tier-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
}

.simulator__tier-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.simulator__breakdown {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.simulator__breakdown h3 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.simulator__breakdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.simulator__breakdown li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.simulator__breakdown li span:last-child {
  color: var(--accent);
  font-weight: 600;
}

.simulator__hint {
  margin: 1rem 0 0 0;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* 通用元素 */
.catalog-count {
  padding: 0.5rem 1rem;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
}

.empty-state::before {
  content: "🔍";
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* 新功能模块样式 */
.character-list {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 1rem;
}

.character-item {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-primary);
}

.character-item:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.character-item.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.guide-placeholder,
.inheritance-placeholder,
.support-placeholder {
  padding: 3rem 2rem;
  text-align: center;
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  margin: 2rem;
}

.guide-placeholder h3,
.inheritance-placeholder h3,
.support-placeholder h3 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 1.5rem;
}

.guide-placeholder ul,
.inheritance-placeholder ul,
.support-placeholder ul {
  text-align: left;
  max-width: 400px;
  margin: 1rem auto;
  padding: 0;
  list-style: none;
}

.guide-placeholder li,
.inheritance-placeholder li,
.support-placeholder li {
  padding: 0.4rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 动态缩放 - 当内容过多时自动缩小 */
.guide-card.compact,
.inheritance-card.compact,
.support-card.compact {
  font-size: 0.9rem;
}

.guide-card.compact .guide-section {
  margin: 0.75rem 0;
}

.guide-card.compact .support-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}

.guide-card.compact .inheritance-stats {
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.5rem;
}

.guide-card.compact .stat-item {
  padding: 0.5rem;
}

.guide-card.compact .stat-value {
  font-size: 1.1rem;
}

.guide-card.compact .support-item {
  padding: 0.5rem;
  font-size: 0.75rem;
}

.guide-card.compact .support-item h5 {
  font-size: 0.75rem;
}

.guide-card.compact .support-item p {
  font-size: 0.65rem;
}

.guide-card.compact .support-item small {
  font-size: 0.6rem;
}

.calculate-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1.5rem;
}

.calculate-btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.calculate-btn:disabled {
  background: var(--text-light);
  cursor: not-allowed;
  transform: none;
}

.training-guide-content,
.inheritance-results,
.support-recommendations {
  flex: 1;
  padding: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.guide-card,
.inheritance-card,
.support-card {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 0;
  transition: all 0.3s ease;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.guide-card:hover,
.inheritance-card:hover,
.support-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.guide-card h3,
.inheritance-card h3,
.support-card h3 {
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.guide-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.guide-header h3 {
  margin: 0;
  flex: 1;
}

.character-quick-select {
  flex-shrink: 0;
  min-width: 180px;
}

.character-quick-select select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.character-quick-select select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.character-quick-select select:hover {
  border-color: var(--accent);
}

.guide-section {
  margin: 1rem 0;
  flex-shrink: 0;
}

.guide-section h4 {
  margin: 0 0 0.5rem 0;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}

.guide-card > p {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.support-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.support-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.support-item img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.support-item h5 {
  margin: 0 0 0.25rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.support-item p {
  margin: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.support-item small {
  font-size: 0.65rem;
  line-height: 1.3;
}

.inheritance-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.stat-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* 动画 */
.character-card {
  animation: fadeInUp 0.3s ease-out;
}

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

.compatibility-card {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .screen-content {
    grid-template-columns: minmax(260px, 300px) 1fr;
    gap: 1rem;
  }
  
  .screen-sidebar {
    min-width: 260px;
  }
}

@media (max-width: 1024px) {
  .screen-content {
    grid-template-columns: minmax(240px, 280px) 1fr;
    padding: 0 0.5rem;
    gap: 1rem;
  }
  
  .screen-sidebar {
    min-width: 240px;
  }
  
  .nav-content {
    padding: 1rem;
  }
  
  .screen-nav {
    right: 1rem;
  }
}

@media (max-width: 768px) {
  .main {
    padding: 6rem 0.5rem 4rem 0.5rem;
  }
  
  .screen {
    top: 6rem;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 4rem;
  }
  
  .screen-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0;
  }
  
  .screen-sidebar {
    height: auto;
    max-height: 35vh;
    min-height: 300px;
    min-width: auto;
  }
  
  .screen-main {
    height: auto;
    min-height: 55vh;
    flex: 1;
  }
  
  .nav-content {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    padding: 0.75rem;
  }
  
  .nav-brand {
    justify-content: center;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .nav-stats {
    justify-content: center;
  }
  
  .screen-nav {
    position: static;
    flex-direction: row;
    justify-content: center;
    padding: 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    margin: 0 0.5rem;
    border-radius: var(--radius-lg);
    transform: none;
    top: auto;
    right: auto;
  }
  
  .nav-label {
    position: static;
    opacity: 1;
    transform: none;
    margin-left: 0.5rem;
    box-shadow: none;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 0.75rem;
  }
  
  .nav-dot {
    width: auto;
    height: auto;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
  }
  
  .nav-dot::before {
    display: none;
  }
  
  .character-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .main {
    padding: 5rem 0.25rem 3rem 0.25rem;
  }
  
  .screen {
    top: 5rem;
    left: 0.25rem;
    right: 0.25rem;
    bottom: 3rem;
  }
  
  .nav-content {
    padding: 0.5rem;
  }
  
  .nav-brand h1 {
    font-size: 1.25rem;
  }
  
  .nav-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .stat-pill {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .screen-content {
    gap: 0.75rem;
  }
  
  .screen-sidebar {
    max-height: 30vh;
    min-height: 250px;
  }
  
  .screen-main {
    min-height: 60vh;
  }
  
  .sidebar-controls,
  .main-header {
    padding: 0.75rem;
  }
  
  .sidebar-header {
    padding: 1rem;
  }
  
  .sidebar-header h2 {
    font-size: 1.1rem;
  }
  
  .sidebar-header p {
    font-size: 0.8rem;
  }
  
  /* 移动端内容优化 */
  .training-guide-content,
  .inheritance-results,
  .support-recommendations {
    padding: 0.5rem;
  }
  
  .guide-card,
  .inheritance-card,
  .support-card {
    padding: 0.75rem;
    font-size: 0.8rem;
  }
  
  .guide-card h3,
  .inheritance-card h3,
  .support-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }
  
  .guide-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .character-quick-select {
    min-width: auto;
    width: 100%;
  }
  
  .character-quick-select select {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
  }
  
  .guide-section {
    margin: 0.5rem 0;
  }
  
  .guide-section h4 {
    font-size: 0.85rem;
    margin-bottom: 0.375rem;
  }
  
  .support-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.375rem;
  }
  
  .inheritance-stats {
    grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
    gap: 0.375rem;
  }
  
  .support-item {
    padding: 0.375rem;
    font-size: 0.65rem;
  }
  
  .support-item h5 {
    font-size: 0.7rem;
    margin-bottom: 0.125rem;
  }
  
  .support-item p {
    font-size: 0.6rem;
  }
  
  .support-item small {
    font-size: 0.55rem;
  }
  
  .stat-item {
    padding: 0.375rem;
  }
  
  .stat-value {
    font-size: 0.9rem;
  }
  
  .stat-label {
    font-size: 0.6rem;
  }
  
  .calculate-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .field__control input,
  .field__control select {
    padding: 0.625rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .field__label {
    font-size: 0.8rem;
  }
  
  .character-item {
    padding: 0.625rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .tag-button {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .screen-nav {
    padding: 0.75rem;
    margin: 0 0.25rem;
  }
  
  .nav-dot {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .nav-label {
    font-size: 0.7rem;
  }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
  .main {
    padding: 4.5rem 0.125rem 2.5rem 0.125rem;
  }
  
  .screen {
    top: 4.5rem;
    left: 0.125rem;
    right: 0.125rem;
    bottom: 2.5rem;
  }
  
  .nav-content {
    padding: 0.375rem;
  }
  
  .nav-brand h1 {
    font-size: 1.1rem;
  }
  
  .screen-sidebar {
    max-height: 25vh;
    min-height: 200px;
  }
  
  .screen-main {
    min-height: 65vh;
  }
  
  .support-grid {
    grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
  }
  
  .inheritance-stats {
    grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
  }
  
  .guide-card,
  .inheritance-card,
  .support-card {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
  
  .support-item {
    padding: 0.25rem;
    font-size: 0.6rem;
  }
  
  .stat-item {
    padding: 0.25rem;
  }
  
  .stat-value {
    font-size: 0.8rem;
  }
  
  .stat-label {
    font-size: 0.55rem;
  }
}