/**
 * 股票投资报告生成平台 - 主样式
 * 设计理念: 卡片流 + 现代科技感 + 沉浸式体验
 */

/* ===== CSS变量 ===== */
:root {
  /* 主色调 */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-color: #667eea;
  --primary-dark: #5a6fd6;
  --accent-color: #764ba2;

  /* 背景色 */
  --bg-dark: #0a0a0f;
  --bg-card: rgba(20, 20, 30, 0.8);
  --bg-card-hover: rgba(30, 30, 45, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.05);

  /* 文字颜色 */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);

  /* 语义色 */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;

  /* 边框 */
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(102, 126, 234, 0.5);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);

  /* 动画 */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* 字体 */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== 重置样式 ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 背景粒子效果 ===== */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
}

/* ===== 主容器 ===== */
.container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ===== 首页区域 ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

/* 头部Logo */
.header {
  text-align: center;
  margin-bottom: 40px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.logo-icon {
  font-size: 32px;
}

.logo-text {
  font-size: 28px;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* 主标题区域 */
.hero-content {
  text-align: center;
  max-width: 600px;
  width: 100%;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 40px;
}

/* ===== 搜索卡片 ===== */
.search-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-normal);
}

.search-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

/* 搜索框 */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  transition: var(--transition-normal);
}

.search-box:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.search-icon {
  padding: 12px 16px;
  font-size: 18px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  padding: 12px 0;
  outline: none;
}

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

.clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 16px;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition-fast);
}

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

/* 搜索下拉框 */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: var(--shadow-lg);
}

.search-dropdown.active {
  display: block;
}

.dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: var(--bg-card-hover);
}

.dropdown-item .stock-code {
  font-weight: 600;
  color: var(--primary-color);
  min-width: 70px;
}

.dropdown-item .stock-name {
  flex: 1;
}

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

.dropdown-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
}

/* 选中的股票 */
.selected-stock {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
}

.selected-icon {
  font-size: 24px;
}

.selected-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.selected-code {
  font-weight: 600;
  color: var(--primary-color);
}

.selected-name {
  color: var(--text-secondary);
  font-size: 14px;
}

.change-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.change-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 热门搜索 */
.hot-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.hot-label {
  color: var(--text-muted);
  font-size: 14px;
}

.hot-tag {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.hot-tag:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-primary);
}

/* 生成按钮 */
.generate-btn {
  width: 100%;
  background: var(--primary-gradient);
  border: none;
  color: var(--text-primary);
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

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

/* 流程指示 */
.process-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.step-num {
  width: 24px;
  height: 24px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.flow-arrow {
  color: var(--text-muted);
}

/* 免责声明 */
.disclaimer {
  margin-top: auto;
  padding-top: 40px;
  text-align: center;
}

.disclaimer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
}

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

/* 同步按钮 */
.sync-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition-fast);
}

.sync-btn:hover {
  background: var(--primary-gradient);
  border-color: var(--primary-color);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.sync-btn:active {
  transform: translateY(0);
}

.sync-icon {
  font-size: 14px;
}

.sync-btn.syncing .sync-icon {
  animation: rotate 1s linear infinite;
}

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

  to {
    transform: rotate(360deg);
  }
}

/* ===== 加载区域 ===== */
.loading-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.loading-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  backdrop-filter: blur(20px);
}

.loading-icon {
  font-size: 64px;
  margin-bottom: 24px;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.loading-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 32px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 进度条 */
.progress-bar {
  background: var(--bg-glass);
  border-radius: 10px;
  height: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

/* 加载步骤 */
.loading-steps {
  text-align: left;
  margin-bottom: 32px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.step-item:last-child {
  border-bottom: none;
}

.step-status {
  font-size: 16px;
}

.step-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.step-item.active .step-label {
  color: var(--text-primary);
}

.step-item.completed .step-status {
  color: var(--success-color);
}

.cancel-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 12px 32px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.cancel-btn:hover {
  border-color: var(--danger-color);
  color: var(--danger-color);
}

/* ===== 报告区域 ===== */
.report-section {
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.back-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.header-actions {
  display: flex;
  gap: 12px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-gradient);
  border: none;
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition-fast);
}

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

.action-btn.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.action-btn.secondary:hover {
  border-color: var(--primary-color);
  box-shadow: none;
}

.action-btn.primary {
  background: var(--primary-gradient);
}

/* 报告容器 */
.report-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

/* 报告标题卡片 */
.report-title-card {
  background: var(--primary-gradient);
  padding: 40px 32px;
  text-align: center;
}

.report-main-title {
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stock-icon {
  font-size: 32px;
}

.stock-code {
  font-weight: 400;
  opacity: 0.8;
}

.report-subtitle {
  font-size: 16px;
  opacity: 0.8;
  margin-top: 8px;
}

.report-meta {
  margin-top: 16px;
  font-size: 14px;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-divider {
  opacity: 0.5;
}

/* 投资建议摘要 */
.summary-card {
  margin: 24px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.summary-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.summary-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.summary-item {
  text-align: center;
  padding: 16px;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
}

.item-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.item-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

.summary-item.recommendation .item-value {
  color: var(--success-color);
}

/* 报告正文 */
.report-content {
  padding: 32px;
}

.report-content h1,
.report-content h2,
.report-content h3 {
  color: var(--text-primary);
  margin-top: 32px;
  margin-bottom: 16px;
}

.report-content h1 {
  font-size: 24px;
}

.report-content h2 {
  font-size: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.report-content h3 {
  font-size: 16px;
}

.report-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.report-content ul,
.report-content ol {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
}

.report-content li {
  margin-bottom: 8px;
}

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

.report-content blockquote {
  border-left: 3px solid var(--primary-color);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.report-content code {
  background: var(--bg-glass);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

.report-content pre {
  background: var(--bg-glass);
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 16px 0;
}

/* 报告底部 */
.report-footer {
  padding: 32px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-glass);
}

.footer-disclaimer {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.footer-disclaimer p {
  color: var(--text-secondary);
  font-size: 12px;
  margin: 0;
}

.footer-disclaimer p:first-child {
  color: var(--warning-color);
  font-weight: 600;
  margin-bottom: 8px;
}

.footer-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===== 弹窗 ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.modal-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal-message {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-btn {
  background: var(--primary-gradient);
  border: none;
  color: var(--text-primary);
  padding: 12px 40px;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-btn:hover {
  transform: translateY(-2px);
}

/* ===== 2025科技感卡片式布局 ===== */

/* 报告分析卡片 */
.report-card {
  background: linear-gradient(135deg, rgba(20, 20, 35, 0.9) 0%, rgba(30, 30, 50, 0.8) 100%);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.report-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.report-card:hover {
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow:
    0 8px 32px rgba(102, 126, 234, 0.15),
    0 0 40px rgba(102, 126, 234, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

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

/* 卡片延迟动画 */
.report-card:nth-child(1) {
  animation-delay: 0.1s;
}

.report-card:nth-child(2) {
  animation-delay: 0.2s;
}

.report-card:nth-child(3) {
  animation-delay: 0.3s;
}

.report-card:nth-child(4) {
  animation-delay: 0.4s;
}

.report-card:nth-child(5) {
  animation-delay: 0.5s;
}

.report-card:nth-child(6) {
  animation-delay: 0.6s;
}

.report-card:nth-child(7) {
  animation-delay: 0.7s;
}

.report-card:nth-child(8) {
  animation-delay: 0.8s;
}

/* 卡片标题 */
.report-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.report-card-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.report-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* 分栏网格系统 */
.report-grid {
  display: grid;
  gap: 16px;
  margin: 16px 0;
}

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

.report-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.report-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 数据指标卡片 */
.metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.metric-card:hover {
  background: rgba(102, 126, 234, 0.08);
  border-color: rgba(102, 126, 234, 0.3);
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.metric-value.positive {
  color: var(--success-color);
}

.metric-value.negative {
  color: var(--danger-color);
}

.metric-value.neutral {
  color: var(--warning-color);
}

.metric-change {
  font-size: 12px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.metric-change.up {
  color: var(--success-color);
}

.metric-change.down {
  color: var(--danger-color);
}

/* 进度条指示器 */
.progress-indicator {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-indicator-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 3px;
  transition: width 1s ease-out;
}

/* 标签徽章 */
.report-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.report-badge.badge-buy {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success-color);
}

.report-badge.badge-sell {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger-color);
}

.report-badge.badge-hold {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--warning-color);
}

.report-badge.badge-info {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--info-color);
}

/* 高亮数值 */
.highlight-value {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(102, 126, 234, 0.15);
  border-radius: 6px;
  font-weight: 600;
  color: var(--primary-color);
}

/* 列表增强 */
.report-card ul,
.report-card ol {
  padding-left: 0;
  list-style: none;
}

.report-card li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.report-card li::before {
  content: '✦';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-color);
  font-size: 12px;
}

/* 引用块增强 */
.report-card blockquote {
  background: rgba(102, 126, 234, 0.08);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: 16px 0;
  font-style: normal;
}

.report-card blockquote p {
  margin: 0;
  color: var(--text-secondary);
}

/* 分隔线 */
.report-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
  margin: 24px 0;
}

/* 风险/机会提示卡片 */
.alert-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-md);
  margin: 16px 0;
}

.alert-card.alert-risk {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.alert-card.alert-opportunity {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.alert-card.alert-info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.alert-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.alert-risk .alert-title {
  color: var(--danger-color);
}

.alert-opportunity .alert-title {
  color: var(--success-color);
}

.alert-info .alert-title {
  color: var(--info-color);
}

/* 动画关键帧 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowPulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
  }

  50% {
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.4);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* 闪光效果 */
.shimmer-effect {
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.1) 50%,
      transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ===== 响应式 ===== */
/* ===== 移动端样式 (苹果风格) ===== */
@media (max-width: 768px) {

  /* 全局样式 - iOS风格浅色背景 */
  body {
    background: #f5f5f7;
  }

  .bg-particles {
    display: none;
    /* 移除粒子效果，更简洁 */
  }

  /* Logo - 简化设计 */
  .logo {
    gap: 8px;
  }

  .logo-icon {
    font-size: 28px;
  }

  .logo-text {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    background: none;
    -webkit-text-fill-color: initial;
  }

  .tagline {
    color: #86868b;
    font-size: 13px;
    letter-spacing: 0.5px;
  }

  /* 主标题 - iOS风格 */
  .hero-title {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    background: none;
    -webkit-text-fill-color: initial;
    line-height: 1.2;
    margin-bottom: 8px;
  }

  .hero-subtitle {
    font-size: 17px;
    color: #86868b;
    margin-bottom: 32px;
  }

  /* 搜索卡片 - iOS白色卡片 */
  .search-card {
    background: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    backdrop-filter: none;
  }

  .search-card:hover {
    border-color: transparent;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  }

  /* 搜索框 - iOS风格 */
  .search-box {
    background: #f5f5f7;
    border: none;
    border-radius: 12px;
    padding: 0;
    min-height: 44px;
  }

  .search-box:focus-within {
    border-color: transparent;
    box-shadow: none;
  }

  .search-icon {
    padding: 12px 12px;
    font-size: 16px;
    opacity: 0.6;
  }

  .search-input {
    font-size: 17px;
    color: #1d1d1f;
    padding: 12px 0;
  }

  .search-input::placeholder {
    color: #86868b;
  }

  .clear-btn {
    padding: 12px 12px;
    color: #86868b;
  }

  /* 搜索下拉 - iOS卡片风格 */
  .search-dropdown {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    margin-top: 8px;
  }

  .dropdown-item {
    padding: 14px 16px;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease;
  }

  .dropdown-item:hover {
    background: #f5f5f7;
  }

  .dropdown-item:active {
    background: #e8e8ed;
  }

  .dropdown-item .stock-code {
    color: #007AFF;
    font-weight: 600;
    font-size: 15px;
  }

  .dropdown-item .stock-name {
    color: #1d1d1f;
    font-size: 15px;
  }

  .dropdown-item .stock-industry {
    color: #86868b;
    font-size: 13px;
  }

  .dropdown-empty {
    color: #86868b;
  }

  /* 选中的股票 - iOS风格 */
  .selected-stock {
    background: rgba(0, 122, 255, 0.08);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 12px;
  }

  .selected-code {
    color: #007AFF;
  }

  .selected-name {
    color: #1d1d1f;
  }

  .change-btn {
    background: transparent;
    border: 1px solid #007AFF;
    color: #007AFF;
    border-radius: 8px;
    font-weight: 500;
  }

  .change-btn:hover {
    border-color: #007AFF;
    color: #007AFF;
    background: rgba(0, 122, 255, 0.05);
  }

  /* 热门搜索 - iOS标签风格 */
  .hot-search {
    justify-content: flex-start;
    gap: 8px;
  }

  .hot-label {
    color: #86868b;
    font-size: 13px;
  }

  .hot-tag {
    background: #f5f5f7;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 15px;
    color: #007AFF;
    font-weight: 500;
  }

  .hot-tag:hover {
    background: #e8e8ed;
    border-color: transparent;
    color: #007AFF;
  }

  .hot-tag:active {
    background: #d1d1d6;
    transform: scale(0.96);
  }

  /* 生成按钮 - iOS系统蓝 */
  .generate-btn {
    background: #007AFF;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 17px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
    margin-top: 20px;
  }

  .generate-btn:hover:not(:disabled) {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
  }

  .generate-btn:active:not(:disabled) {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 122, 255, 0.3);
  }

  .generate-btn:disabled {
    opacity: 0.4;
    background: #86868b;
  }

  /* 流程指示 - 隐藏以简化界面 */
  .process-flow {
    display: none;
  }

  /* 免责声明 */
  .disclaimer p {
    color: #86868b;
    font-size: 12px;
  }

  .sync-btn {
    background: rgba(0, 122, 255, 0.08);
    border: 1px solid rgba(0, 122, 255, 0.2);
    color: #007AFF;
    border-radius: 10px;
    font-weight: 500;
  }

  .sync-btn:hover {
    background: rgba(0, 122, 255, 0.12);
    border-color: rgba(0, 122, 255, 0.3);
    color: #007AFF;
  }

  /* 加载区域 - iOS风格 */
  .loading-section {
    background: #f5f5f7;
  }

  .loading-card {
    background: #ffffff;
    border: none;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px 32px;
  }

  .loading-icon {
    font-size: 48px;
  }

  .loading-title {
    font-size: 22px;
    font-weight: 600;
    color: #1d1d1f;
    background: none;
    -webkit-text-fill-color: initial;
  }

  .progress-bar {
    background: #e8e8ed;
    border-radius: 4px;
    height: 4px;
  }

  .progress-fill {
    background: #007AFF;
    border-radius: 4px;
  }

  .progress-text {
    color: #86868b;
  }

  .step-item {
    padding: 10px 0;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
  }

  .step-label {
    color: #1d1d1f;
    font-size: 15px;
  }

  .step-item.active .step-label {
    color: #007AFF;
    font-weight: 500;
  }

  .cancel-btn {
    background: transparent;
    border: 1px solid #86868b;
    color: #86868b;
    border-radius: 12px;
    font-weight: 500;
  }

  .cancel-btn:hover {
    border-color: #ff3b30;
    color: #ff3b30;
  }

  /* 报告区域 - iOS风格 */
  .report-section {
    background: #f5f5f7;
    padding: 16px;
  }

  .report-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0;
  }

  .back-btn {
    background: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    color: #007AFF;
    font-weight: 500;
  }

  .back-btn:hover {
    border-color: transparent;
    color: #007AFF;
  }

  .header-actions {
    display: flex;
    gap: 8px;
  }

  .action-btn {
    background: #007AFF;
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
  }

  .action-btn:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
  }

  .action-btn.secondary {
    background: #ffffff;
    color: #007AFF;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  .action-btn.secondary:hover {
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  /* 报告容器 */
  .report-container {
    background: transparent;
    border: none;
    backdrop-filter: none;
  }

  .report-title-card {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border-radius: 20px;
    padding: 32px 20px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
  }

  .report-main-title {
    font-size: 24px;
    font-weight: 700;
  }

  .report-subtitle {
    font-size: 15px;
  }

  .report-meta {
    font-size: 13px;
  }

  /* 摘要卡片 - iOS白色卡片 */
  .summary-card {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 20px;
    margin: 12px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  }

  .summary-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 16px;
  }

  .summary-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .summary-item {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
  }

  .item-label {
    font-size: 11px;
    color: #86868b;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .item-value {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
  }

  /* 报告内容 */
  .report-content {
    padding: 0;
  }

  /* 报告卡片 - iOS风格 */
  .report-card {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    animation: none;
  }

  .report-card-header {
    margin-bottom: 16px;
    flex-wrap: nowrap;
  }

  .report-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
  }

  .report-card-icon {
    font-size: 24px;
  }

  /* 报告文本内容 */
  .report-content h1,
  .report-content h2,
  .report-content h3 {
    color: #1d1d1f;
    font-weight: 600;
  }

  .report-content h1 {
    font-size: 24px;
  }

  .report-content h2 {
    font-size: 20px;
  }

  .report-content h3 {
    font-size: 18px;
  }

  .report-content p,
  .report-content li {
    color: #1d1d1f;
    font-size: 16px;
    line-height: 1.5;
  }

  .report-content strong {
    font-weight: 600;
    color: #1d1d1f;
  }

  .report-content ul,
  .report-content ol {
    color: #1d1d1f;
  }

  /* 报告徽章 */
  .report-badge {
    border-radius: 6px;
    padding: 4px 8px;
    font-weight: 600;
    font-size: 13px;
  }

  .badge-buy {
    background: rgba(52, 199, 89, 0.15);
    color: #34c759;
  }

  .badge-sell {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
  }

  .badge-hold {
    background: rgba(255, 149, 0, 0.15);
    color: #ff9500;
  }

  /* 网格布局 */
  .report-grid-2,
  .report-grid-3,
  .report-grid-4 {
    grid-template-columns: 1fr;
  }

  /* 指标卡片 */
  .metric-card {
    background: #f5f5f7;
    border-radius: 12px;
  }

  .metric-value {
    font-size: 20px;
    color: #1d1d1f;
  }

  .metric-label {
    color: #86868b;
  }

  /* 底部操作 */
  .report-footer {
    background: transparent;
    padding: 20px 0;
  }

  .footer-disclaimer p {
    color: #86868b;
    font-size: 12px;
  }

  .footer-actions {
    flex-direction: row;
    gap: 12px;
  }

  .footer-actions .action-btn {
    flex: 1;
  }
}

/* ===== 超小屏幕优化 (iPhone SE等) ===== */
@media (max-width: 480px) {

  /* Logo更紧凑 */
  .logo-text {
    font-size: 22px;
  }

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

  .hero-subtitle {
    font-size: 16px;
  }

  /* 搜索卡片 */
  .search-card {
    padding: 16px;
  }

  /* 热门搜索居中 */
  .hot-search {
    justify-content: center;
  }

  /* 摘要卡片单列 */
  .summary-content {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .summary-item {
    padding: 16px;
  }

  .item-value {
    font-size: 22px;
  }

  /* 报告头部堆叠 */
  .report-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .back-btn {
    width: 100%;
    justify-content: center;
  }

  .header-actions {
    width: 100%;
  }

  .action-btn {
    flex: 1;
    justify-content: center;
  }

  /* 底部操作堆叠 */
  .footer-actions {
    flex-direction: column;
    gap: 12px;
  }

  .footer-actions .action-btn {
    width: 100%;
  }
}

/* ===== 页面加载器移动端优化 ===== */
@media (max-width: 768px) {
  .page-loader {
    background: #f5f5f7;
  }

  .loader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(0, 122, 255, 0.2);
    border-top-color: #007AFF;
  }

  .loader-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    background: none;
    -webkit-text-fill-color: initial;
  }

  .loader-subtitle {
    color: #86868b;
    font-size: 15px;
  }
}

/* ===== 打印样式 ===== */
@media print {

  .bg-particles,
  .report-header,
  .footer-actions,
  .back-btn,
  .action-btn {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .report-container {
    background: white;
    border: none;
  }

  .report-title-card {
    background: #667eea;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ===== 页面加载遮罩 ===== */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.loader-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 24px;
  border: 4px solid rgba(102, 126, 234, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loader-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loader-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}