/**
 * 主样式文件
 * 定义全局样式、布局和通用组件
 */

/* ========== 全局样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 主题颜色 - Racing Garage Theme */
  --color-primary: #FF3D00;
  --color-secondary: #00E5FF;
  --color-warning: #FFD600;
  --color-success: #00FF41;
  --color-background: #0A0E14;
  --color-text: #E8E8E8;
  --color-card-bg: #151B26;
  --color-border: #2A3441;
  
  /* 字体 */
  --font-main: 'Segoe UI', 'Roboto', Arial, sans-serif;
  --font-display: 'Impact', 'Arial Black', sans-serif;
  --font-mono: 'Consolas', 'Monaco', monospace;
  
  /* 间距 */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* 圆角 */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  
  /* 阴影 - Game UI Depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 20px rgba(255, 61, 0, 0.3);
  --shadow-glow-blue: 0 0 20px rgba(0, 229, 255, 0.3);
  
  /* 过渡 */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* 边框 */
  --border-width: 2px;
  --border-glow: inset 0 0 0 1px rgba(255, 61, 0, 0.3);
}

body {
  font-family: var(--font-main);
  background: 
    linear-gradient(135deg, rgba(10, 14, 20, 0.95) 0%, rgba(21, 27, 38, 0.9) 50%, rgba(10, 14, 20, 0.95) 100%),
    radial-gradient(circle at 20% 50%, rgba(255, 61, 0, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(0, 229, 255, 0.05) 0%, transparent 50%),
    #0A0E14;
  background-attachment: fixed;
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 61, 0, 0.02) 2px,
      rgba(255, 61, 0, 0.02) 4px
    );
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

/* Vignette effect */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
  z-index: 1;
}

body > * {
  position: relative;
  z-index: 2;
}

/* ========== 应用容器 ========== */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== 头部 ========== */
.app-header {
  background: linear-gradient(180deg, rgba(21, 27, 38, 0.95) 0%, rgba(10, 14, 20, 0.8) 100%);
  backdrop-filter: blur(10px);
  padding: var(--spacing-sm) var(--spacing-lg);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(255, 61, 0, 0.2);
  border-bottom: 2px solid rgba(255, 61, 0, 0.3);
  position: relative;
}

.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--color-primary) 50%, 
    transparent 100%
  );
  opacity: 0.5;
}

.app-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

/* ========== 主内容区 ========== */
.app-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: var(--spacing-lg);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding-bottom: var(--spacing-sm);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, transparent 100%);
  box-shadow: 0 0 10px var(--color-primary);
}

.section-title::before {
  content: '▶';
  margin-right: var(--spacing-sm);
  color: var(--color-secondary);
  animation: blink 2s ease-in-out infinite;
}

/* ========== 底部 ========== */
.app-footer {
  background: 
    linear-gradient(180deg, rgba(10, 14, 20, 0.85) 0%, rgba(21, 27, 38, 0.9) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  padding: var(--spacing-xl);
  border-top: 2px solid rgba(255, 61, 0, 0.3);
  box-shadow: 
    0 -8px 32px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 61, 0, 0.2),
    0 0 40px rgba(255, 61, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* Glass reflection effect */
.app-footer::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(0deg, 
    rgba(255, 255, 255, 0.05) 0%, 
    transparent 100%
  );
  pointer-events: none;
}

/* Bottom accent line */
.app-footer::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--color-primary) 50%, 
    transparent 100%
  );
  opacity: 0.6;
}

/* ========== 属性汇总面板 ========== */
.attribute-panel {
  max-width: 1400px;
  margin: 0 auto;
}

.attribute-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.attribute-item-panel {
  background: linear-gradient(135deg, rgba(21, 27, 38, 0.9) 0%, rgba(10, 14, 20, 0.95) 100%);
  border: 2px solid rgba(42, 52, 65, 0.8);
  border-radius: var(--radius-sm);
  padding: var(--spacing-lg);
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.6);
}

.attribute-item-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--color-success) 50%, 
    transparent 100%
  );
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.attribute-item-panel:hover {
  border-color: var(--color-success);
  transform: translateY(-4px);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 255, 65, 0.3),
    0 0 20px rgba(0, 255, 65, 0.2);
}

.attribute-item-panel:hover::before {
  opacity: 1;
}

.attribute-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(232, 232, 232, 0.7);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-mono);
}

.attribute-value-display {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-success);
  font-family: var(--font-mono);
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
  animation: valueGlow 2s ease-in-out infinite;
}

@keyframes valueGlow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.8);
  }
}

.attribute-warnings {
  margin-top: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.warning-message {
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.15) 0%, rgba(21, 27, 38, 0.9) 100%);
  border: 2px solid var(--color-warning);
  border-radius: var(--radius-sm);
  padding: var(--spacing-lg);
  color: var(--color-warning);
  font-weight: 700;
  font-family: var(--font-display);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 
    0 4px 16px rgba(255, 214, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: warningPulse 2s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.warning-message::before {
  content: '⚠';
  position: absolute;
  left: var(--spacing-lg);
  font-size: 1.5rem;
  animation: warningBlink 1s ease-in-out infinite;
}

@keyframes warningPulse {
  0%, 100% {
    box-shadow: 
      0 4px 16px rgba(255, 214, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 
      0 4px 24px rgba(255, 214, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

@keyframes warningBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.success-message {
  background: linear-gradient(135deg, rgba(0, 255, 65, 0.15) 0%, rgba(21, 27, 38, 0.9) 100%);
  border: 2px solid var(--color-success);
  border-radius: var(--radius-sm);
  padding: var(--spacing-lg);
  color: var(--color-success);
  font-weight: 700;
  font-family: var(--font-display);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 
    0 4px 16px rgba(0, 255, 65, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: successGlow 2s ease-in-out infinite;
  position: relative;
}

.success-message::before {
  content: '✓';
  position: absolute;
  left: var(--spacing-lg);
  font-size: 1.5rem;
  font-weight: 900;
}

@keyframes successGlow {
  0%, 100% {
    box-shadow: 
      0 4px 16px rgba(0, 255, 65, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 
      0 4px 24px rgba(0, 255, 65, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

/* ========== 按钮 ========== */
.btn {
  padding: var(--spacing-md) var(--spacing-xl);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #D32F00 100%);
  color: white;
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(255, 61, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #FF5722 0%, var(--color-primary) 100%);
  box-shadow: 0 6px 20px rgba(255, 61, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #0097A7 100%);
  color: white;
  border-color: var(--color-secondary);
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #00E5FF 0%, var(--color-secondary) 100%);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-reset {
  background: linear-gradient(135deg, rgba(42, 52, 65, 0.8) 0%, rgba(21, 27, 38, 0.9) 100%);
  color: var(--color-warning);
  border-color: var(--color-warning);
  box-shadow: 0 4px 12px rgba(255, 214, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-reset:hover {
  background: linear-gradient(135deg, rgba(42, 52, 65, 1) 0%, rgba(21, 27, 38, 1) 100%);
  color: #FFF;
  box-shadow: 0 6px 20px rgba(255, 214, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ========== 卡片 ========== */
.card {
  background: linear-gradient(135deg, rgba(21, 27, 38, 0.95) 0%, rgba(10, 14, 20, 0.9) 100%);
  border: 2px solid rgba(42, 52, 65, 0.8);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all var(--transition-normal);
  position: relative;
  backdrop-filter: blur(10px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-md);
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 61, 0, 0.3), rgba(0, 229, 255, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
  border-color: rgba(255, 61, 0, 0.5);
}

.card:hover::before {
  opacity: 1;
}

/* ========== 模态框 ========== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: linear-gradient(135deg, rgba(21, 27, 38, 0.98) 0%, rgba(10, 14, 20, 0.98) 100%);
  border: 3px solid rgba(255, 61, 0, 0.6);
  border-radius: var(--radius-md);
  padding: var(--spacing-xl);
  max-width: 550px;
  width: 90%;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(255, 61, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  animation: modalSlideIn var(--transition-normal);
  backdrop-filter: blur(10px);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--color-primary) 50%, 
    transparent 100%
  );
}

.modal-close {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  font-size: 2rem;
  cursor: pointer;
  color: rgba(232, 232, 232, 0.6);
  transition: all var(--transition-fast);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(42, 52, 65, 0.5);
  border: 2px solid transparent;
}

.modal-close:hover {
  color: var(--color-primary);
  background: rgba(255, 61, 0, 0.2);
  border-color: var(--color-primary);
  transform: rotate(90deg);
  box-shadow: 0 0 15px rgba(255, 61, 0, 0.5);
}

.modal-message {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xl);
  text-align: center;
  line-height: 1.6;
  color: var(--color-text);
  font-family: var(--font-main);
}

.modal-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
}

/* ========== 工具类 ========== */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

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

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

.text-warning {
  color: var(--color-warning);
}

.text-success {
  color: var(--color-success);
}

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

/* ========== 滚动条样式 ========== */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 14, 20, 0.8);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(42, 52, 65, 0.6);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(255, 61, 0, 0.6) 0%, rgba(211, 47, 0, 0.8) 100%);
  border-radius: var(--radius-sm);
  border: 2px solid rgba(10, 14, 20, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(255, 61, 0, 0.8) 0%, rgba(211, 47, 0, 1) 100%);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 10px rgba(255, 61, 0, 0.5);
}

::-webkit-scrollbar-corner {
  background: rgba(10, 14, 20, 0.8);
}

/* ========== 加载动画 ========== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ========== 选中状态 ========== */
.selected {
  border-color: var(--color-primary) !important;
  box-shadow: 
    0 8px 24px rgba(255, 61, 0, 0.6) !important,
    0 0 30px rgba(255, 61, 0, 0.5) !important,
    inset 0 0 20px rgba(255, 61, 0, 0.2) !important;
}

.highlighted {
  background: linear-gradient(135deg, rgba(255, 61, 0, 0.2) 0%, rgba(21, 27, 38, 0.95) 100%) !important;
}

/* ========== 禁用状态 ========== */
.disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* ========== 错误状态 ========== */
.error {
  border-color: var(--color-warning) !important;
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}


/* ========== 装备 Tooltip ========== */
.equipment-tooltip {
  position: fixed;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(42, 42, 42, 0.98) 100%);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  max-width: 300px;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  animation: tooltipFadeIn 0.2s ease-out;
}

.equipment-tooltip.hidden {
  display: none;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.tooltip-header {
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid rgba(255, 69, 0, 0.3);
}

.tooltip-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.tooltip-type {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tooltip-attributes {
  margin: var(--spacing-sm) 0;
}

.tooltip-attribute {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.9rem;
}

.tooltip-attr-name {
  color: var(--color-text-secondary);
  margin-right: var(--spacing-sm);
}

.tooltip-attr-value {
  color: var(--color-success);
  font-weight: bold;
}

.tooltip-description {
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.tooltip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--spacing-sm);
}

.tooltip-tag {
  display: inline-block;
  background: rgba(255, 69, 0, 0.2);
  color: var(--color-primary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  border: 1px solid rgba(255, 69, 0, 0.3);
}


/* ========== 装备配置区域头部 ========== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.section-header .header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.total-price-display {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.15) 0%, rgba(255, 152, 0, 0.1) 100%);
  border: 2px solid rgba(255, 214, 0, 0.5);
  border-radius: var(--radius-md);
  box-shadow: 0 0 15px rgba(255, 214, 0, 0.2);
}

.price-label {
  font-size: 0.9rem;
  color: rgba(232, 232, 232, 0.8);
  font-family: var(--font-mono);
}

.price-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-warning);
  font-family: var(--font-mono);
  text-shadow: 0 0 10px rgba(255, 214, 0, 0.5);
}

/* ========== 装备知识库面板 ========== */
.glossary-panel {
  background: linear-gradient(135deg, rgba(21, 27, 38, 0.9) 0%, rgba(10, 14, 20, 0.95) 100%);
  border: 2px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.glossary-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.glossary-tabs {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(42, 52, 65, 0.6);
  padding-bottom: var(--spacing-sm);
}

.glossary-tab {
  padding: var(--spacing-sm) var(--spacing-md);
  background: transparent;
  border: none;
  color: rgba(232, 232, 232, 0.6);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: var(--radius-sm);
  position: relative;
}

.glossary-tab:hover {
  color: var(--color-text);
  background: rgba(0, 229, 255, 0.1);
}

.glossary-tab.active {
  color: var(--color-secondary);
  background: rgba(0, 229, 255, 0.15);
}

.glossary-tab.active::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-secondary);
}

.glossary-content {
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
  padding: var(--spacing-md);
  background: rgba(10, 14, 20, 0.5);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(42, 52, 65, 0.4);
}

/* 知识库内容样式 */
.glossary-item {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid rgba(42, 52, 65, 0.4);
}

.glossary-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.glossary-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-xs);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.glossary-item-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: rgba(255, 61, 0, 0.2);
  border: 1px solid rgba(255, 61, 0, 0.4);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
}

.glossary-item-desc {
  font-size: 0.85rem;
  color: rgba(232, 232, 232, 0.7);
  line-height: 1.5;
}

.glossary-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-sm);
}

.glossary-comparison-item {
  padding: var(--spacing-sm);
  background: rgba(21, 27, 38, 0.5);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(42, 52, 65, 0.6);
}

.glossary-comparison-label {
  font-size: 0.75rem;
  color: rgba(232, 232, 232, 0.5);
  margin-bottom: var(--spacing-xs);
}

.glossary-comparison-value {
  font-size: 0.85rem;
  color: var(--color-text);
  font-weight: 600;
}

/* 移动端知识库优化 */
@media (max-width: 767px) {
  .glossary-panel {
    padding: var(--spacing-md);
  }
  
  .glossary-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  .glossary-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .glossary-content {
    max-height: 150px;
  }
  
  .total-price-display {
    width: 100%;
    justify-content: center;
  }
}


/* ========== START RACE 按钮 ========== */
.start-race-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-md);
  background: linear-gradient(135deg, #ff3d00 0%, #ff6f00 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 15px rgba(255, 61, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.start-race-btn:hover {
  transform: scale(1.05);
  box-shadow: 
    0 6px 25px rgba(255, 61, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.start-race-btn:active {
  transform: scale(0.98);
}

.race-btn-icon {
  font-size: 1rem;
}

.race-btn-text {
  font-size: 0.85rem;
  font-weight: 800;
  color: white;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-reset {
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: 0.85rem;
}

/* ========== 浮动提示 ========== */
.floating-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: var(--spacing-lg) var(--spacing-xl);
  background: linear-gradient(135deg, rgba(255, 61, 0, 0.9) 0%, rgba(255, 111, 0, 0.9) 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-align: center;
  z-index: 10000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: toastFloat 2s ease-out forwards;
  pointer-events: none;
}

@keyframes toastFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -60%);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -80%);
  }
}

/* ========== F1 发车灯 ========== */
.race-lights-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20000;
}

.race-lights-container {
  display: flex;
  gap: 20px;
}

.race-light {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 4px solid #333;
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.8),
    0 0 10px rgba(0, 0, 0, 0.5);
  transition: all 0.15s ease;
}

.race-light.on {
  background: radial-gradient(circle at 30% 30%, #ff4444 0%, #cc0000 50%, #990000 100%);
  box-shadow: 
    inset 0 0 20px rgba(255, 100, 100, 0.5),
    0 0 30px rgba(255, 0, 0, 0.8),
    0 0 60px rgba(255, 0, 0, 0.4);
}

.race-light.off-flash {
  background: #1a1a1a;
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.8),
    0 0 10px rgba(0, 0, 0, 0.5);
}

.race-start-text {
  margin-top: 40px;
  font-size: 5rem;
  font-weight: 900;
  color: #00ff00;
  font-family: var(--font-mono);
  text-shadow: 
    0 0 20px rgba(0, 255, 0, 0.8),
    0 0 40px rgba(0, 255, 0, 0.5),
    0 0 80px rgba(0, 255, 0, 0.3);
  animation: goTextPulse 0.5s ease-in-out infinite;
}

@keyframes goTextPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ========== 紧总确认弹窗 ========== */
.wetsuit-confirm {
  text-align: center;
  max-width: 350px;
}

.wetsuit-message {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
}

.btn-danger {
  background: linear-gradient(135deg, #ff3d00 0%, #d32f2f 100%);
  border-color: #ff3d00;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #ff6f00 0%, #e53935 100%);
  box-shadow: 0 0 20px rgba(255, 61, 0, 0.5);
}

/* ========== 紧总动画 ========== */
.jinzong-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25000;
}

.jinzong-content {
  text-align: center;
  animation: jinzongBounce 0.5s ease-out;
}

@keyframes jinzongBounce {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.jinzong-gif {
  font-size: 8rem;
  margin-bottom: var(--spacing-lg);
  animation: jinzongSpin 1s ease-in-out infinite;
}

@keyframes jinzongSpin {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

.jinzong-text {
  font-size: 3rem;
  font-weight: 900;
  color: #00bcd4;
  font-family: var(--font-mono);
  text-shadow: 
    0 0 20px rgba(0, 188, 212, 0.8),
    0 0 40px rgba(0, 188, 212, 0.5);
}

/* ========== 移动端适配 ========== */
@media (max-width: 1023px) {
  .app-main {
    grid-template-columns: 1fr 1.5fr;
  }
  
  .app-header {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
  }
  
  .app-title {
    font-size: 1.3rem;
  }
  
  .header-actions {
    gap: var(--spacing-sm);
  }
  
  .start-race-btn {
    padding: var(--spacing-xs) var(--spacing-md);
  }
  
  .race-btn-text {
    font-size: 0.8rem;
  }
}

@media (max-width: 767px) {
  .app-main {
    grid-template-columns: 1fr;
  }
  
  .race-light {
    width: 50px;
    height: 50px;
  }
  
  .race-lights-container {
    gap: 10px;
  }
  
  .race-start-text {
    font-size: 3rem;
  }
  
  .jinzong-gif {
    font-size: 5rem;
  }
  
  .jinzong-text {
    font-size: 2rem;
  }
}
