/* Nexus 风格深色主题样式 */

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

/* ========== 动态流动背景 ========== */
@keyframes flow {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  50% {
    transform: translate(-45%, -55%) rotate(180deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.bg-flow-1,
.bg-flow-2 {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

.bg-flow-1 {
  top: 10%;
  left: 20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  filter: blur(100px);
  animation: flow 25s infinite linear;
}

.bg-flow-2 {
  bottom: -10%;
  right: 10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
  filter: blur(100px);
  animation: flow 30s infinite linear reverse;
}

/* ========== 侧边导航栏 ========== */
.sidebar-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: 80px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(40px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 100;
}

.nav-logo {
  margin-bottom: 48px;
  color: rgb(59, 130, 246);
}

.nav-logo svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.nav-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.nav-btn:hover {
  color: rgb(59, 130, 246);
}

.nav-btn.active {
  color: rgb(59, 130, 246);
}

.nav-btn svg {
  width: 26px;
  height: 26px;
}

.nav-label {
  font-size: 11px;
  font-weight: 500;
}

/* ========== 主内容区域 ========== */
.main-content {
  margin-left: 80px;
  /* min-height: 100vh; */
  position: relative;
  z-index: 10;
  /* 关键2：让主内容在自身范围内滚动，不带动整个页面滚出header */
  overflow-x: hidden; /* 隐藏横向滚动条（可选） */
  /* 可选：给主内容添加顶部内边距，与header拉开距离 */
  padding-top: 20px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #020205;
  color: rgb(226, 232, 240);
  overflow-x: hidden;
}

/* 顶部市场数据栏 */
.market-bar {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  position: fixed;
  top: 0;
  z-index: 100;
  gap: 28px;
}

.market-header {
  display: flex;
  align-items: center;
  color: #667eea;
  flex-shrink: 0;
}

.market-label {
  font-size: 16px;
  color: #e2e8f0;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.market-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  margin: 0 4px;
}

.market-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.market-name {
  font-size: 15px;
  color: #94a3b8;
}

.market-value {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  font-family: 'Monaco', 'Consolas', monospace;
}

.market-change {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.market-change.up {
  color: #00d26a;
  background: rgba(0, 210, 106, 0.1);
}

.market-change.down {
  color: #ff4d4d;
  background: rgba(255, 77, 77, 0.1);
}

/* 主容器 */
.main-container {
  display: flex;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
  gap: 20px;
  min-height: calc(100vh - 60px);
}

/* 中间对话区域 */
.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(2, 2, 5, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* 顶部标题 */
.chat-header {
  padding: 30px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.chat-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chat-subtitle {
  font-size: 16px;
  color: #b8b8b8;
}

/* 对话消息区域 */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 消息气泡 */
.message {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: messageIn 0.3s ease-out;
}

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

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.ai {
  align-self: flex-start;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.message.user .message-avatar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.message.ai .message-avatar {
  background: rgba(102, 126, 234, 0.2);
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.message-content {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
}

.message.user .message-content {
  background: linear-gradient(135deg, rgb(59, 130, 246), rgb(168, 85, 247));
  color: white;
}

.message.ai .message-content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: rgb(226, 232, 240);
}

/* 欢迎消息 */
.welcome-message {
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 10px;
}

.welcome-message h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #667eea;
}

.welcome-message p {
  font-size: 14px;
  color: #b8b8b8;
  line-height: 1.6;
}

.welcome-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.example-question {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: #b8b8b8;
  cursor: pointer;
  transition: all 0.2s;
}

.example-question:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
  color: #667eea;
}

/* 输入区域 */
.chat-input-container {
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 18px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  min-height: 50px;
  max-height: 150px;
  transition: all 0.2s;
}

.chat-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: #667eea;
}

.chat-input::placeholder {
  color: #666;
}

.send-button {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.send-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 右侧火热板块 */
.sectors-panel {
  width: 300px;
  background: rgba(2, 2, 5, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px;
  flex-shrink: 0;
}

.sectors-header {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sector-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.sector-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.sector-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.sector-info {
  text-align: right;
}

.sector-change {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sector-change.up {
  color: #ff4d4d;
}

.sector-change.down {
  color: #00d26a;
}

.sector-volume {
  font-size: 12px;
  color: #888;
}

/* 加载状态 */
.loading-dots {
  display: inline-flex;
  gap: 4px;
  padding: 8px 0;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: #667eea;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* PDF 下载按钮 */
.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 18px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  color: #667eea;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.pdf-download-btn:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
  transform: translateY(-2px);
}

/* Markdown 内容样式 */
.message-content h1,
.message-content h2,
.message-content h3 {
  margin-top: 16px;
  margin-bottom: 8px;
  font-weight: 700;
  color: #ffffff;
}

.message-content h1 { font-size: 20px; }
.message-content h2 { font-size: 18px; }
.message-content h3 { font-size: 16px; }

.message-content p {
  margin-bottom: 8px;
  line-height: 1.6;
}

.message-content ul,
.message-content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.message-content li {
  margin: 4px 0;
}

.message-content strong {
  font-weight: 700;
  color: #667eea;
}

.message-content a {
  color: #667eea;
  text-decoration: none;
  word-break: break-all;
}

.message-content a:hover {
  text-decoration: underline;
}

.message-content code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.message-content pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 12px 0;
}

.message-content pre code {
  background: none;
  padding: 0;
  color: #ffffff;
}

.message-content blockquote {
  border-left: 3px solid #667eea;
  padding-left: 12px;
  margin: 12px 0;
  color: #b8b8b8;
  font-style: italic;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .main-container {
    flex-direction: column;
  }

  .sectors-panel {
    width: 100%;
    order: -1;
  }

  .market-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 768px) {
  .sidebar-nav {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }

  .bg-flow-1,
  .bg-flow-2 {
    width: 400px;
    height: 400px;
  }

  .main-container {
    padding: 10px;
  }

  .chat-header {
    padding: 20px;
  }

  .chat-title {
    font-size: 22px;
  }

  .message {
    max-width: 95%;
  }
}

/* 错误提示 */
.error-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: rgba(255, 77, 77, 0.15);
  border: 1px solid rgba(255, 77, 77, 0.3);
  color: #ff4d4d;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
  max-width: 300px;
}

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

/* ========== Markdown 内容样式 ========== */
.markdown-content {
  line-height: 1.7;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin-top: 20px;
  margin-bottom: 12px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.markdown-content h1 { font-size: 24px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; }
.markdown-content h2 { font-size: 20px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 6px; }
.markdown-content h3 { font-size: 18px; }
.markdown-content h4 { font-size: 16px; }
.markdown-content h5 { font-size: 14px; }
.markdown-content h6 { font-size: 13px; }

.markdown-content p {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.markdown-content a {
  color: #667eea;
  text-decoration: none;
  border-bottom: 1px dotted rgba(102, 126, 234, 0.5);
  transition: all 0.2s;
}

.markdown-content a:hover {
  color: #764ba2;
  border-bottom-style: solid;
}

.markdown-content strong {
  font-weight: 700;
  color: #ffffff;
}

.markdown-content em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
}

.markdown-content ul,
.markdown-content ol {
  margin: 12px 0;
  padding-left: 24px;
}

.markdown-content li {
  margin: 6px 0;
  color: rgba(255, 255, 255, 0.9);
}

.markdown-content ul li {
  list-style-type: disc;
}

.markdown-content ol li {
  list-style-type: decimal;
}

.markdown-content code {
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  color: #e06c75;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.markdown-content pre {
  background: rgba(0, 0, 0, 0.5);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.markdown-content pre code {
  background: none;
  padding: 0;
  border: none;
  color: #abb2bf;
  font-size: 14px;
  line-height: 1.6;
}

.markdown-content blockquote {
  border-left: 4px solid #667eea;
  padding-left: 16px;
  margin: 16px 0;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  background: rgba(102, 126, 234, 0.05);
  padding: 12px 16px;
  border-radius: 4px;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.markdown-content table th,
.markdown-content table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  text-align: left;
}

.markdown-content table th {
  background: rgba(102, 126, 234, 0.15);
  font-weight: 600;
  color: #ffffff;
}

.markdown-content table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.markdown-content table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.markdown-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 20px 0;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
}

/* ========== 报告库页面样式 ========== */

.reports-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: calc(100vh - 60px);
}

.reports-page-header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 30px;
}

.reports-page-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.reports-page-subtitle {
  font-size: 16px;
  color: #b8b8b8;
}

.reports-list-container {
  background: rgba(2, 2, 5, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.reports-list-header {
  padding: 20px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reports-total {
  font-size: 14px;
  color: #b8b8b8;
}

.reports-total span {
  color: #667eea;
  font-weight: 700;
  font-size: 18px;
}

.reports-list {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

/* 报告卡片 */
.report-card-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.report-card-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.report-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.report-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.4;
  flex: 1;
}

.report-card-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.report-card-status.completed {
  background: rgba(0, 210, 106, 0.15);
  color: #00d26a;
  border: 1px solid rgba(0, 210, 106, 0.3);
}

.report-card-status.failed {
  background: rgba(255, 77, 77, 0.15);
  color: #ff4d4d;
  border: 1px solid rgba(255, 77, 77, 0.3);
}

.report-card-status.pending {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.report-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #888;
}

.report-card-date {
  flex: 1;
}

.report-card-id {
  font-family: 'Monaco', 'Consolas', monospace;
  color: #667eea;
}

.report-card-summary {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.report-card-actions {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-view-report,
.btn-download-pdf {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid rgba(102, 126, 234, 0.3);
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-view-report:hover,
.btn-download-pdf:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
  transform: translateY(-2px);
}

/* 加载状态 */
.reports-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.6);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* 空状态 */
.reports-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.reports-empty p {
  font-size: 16px;
  margin: 0;
}

/* 错误状态 */
.reports-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #ff4d4d;
  background: rgba(255, 77, 77, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(255, 77, 77, 0.2);
}

.reports-error p {
  font-size: 16px;
  margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .reports-page {
    padding: 10px;
  }

  .reports-page-header {
    padding: 30px 20px;
  }

  .reports-page-title {
    font-size: 24px;
  }

  .reports-list {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .report-card-actions {
    flex-direction: column;
  }

  .btn-view-report,
  .btn-download-pdf {
    width: 100%;
  }
}

/* ========== 用户信息区域 ========== */
.user-section {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  z-index: 1000;
  min-width: 200px;
}

.user-info {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  width: 100%;
  padding: 0 8px;
}

.user-phone {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.9);
}

.user-points {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.user-points-tip {
  font-size: 11px;
  color: rgba(255, 77, 77, 0.7);
  margin-top: 4px;
  text-align: center;
}

.btn-login,
.btn-logout {
  min-width: 80px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(59, 130, 246, 0.1);
  color: rgb(59, 130, 246);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  white-space: nowrap;
}

.btn-login:hover,
.btn-logout:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}

/* ========== 登录/注册模态框 ========== */
.auth-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
}

.auth-modal.active {
  display: flex;
}

.auth-modal-content {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 48px;
  width: 90%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-modal-close {
  position: absolute;
  right: 20px;
  top: 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 32px;
  cursor: pointer;
  transition: color 0.3s;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.auth-modal-close:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h2 {
  font-size: 28px;
  font-weight: 600;
  color: rgb(59, 130, 246);
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.auth-form .form-group {
  margin-bottom: 24px;
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.auth-form input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  transition: all 0.3s;
  outline: none;
}

.auth-form input:focus {
  border-color: rgb(59, 130, 246);
  background: rgba(59, 130, 246, 0.05);
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.auth-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, rgb(59, 130, 246) 0%, rgb(168, 85, 247) 100%);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.auth-switch a {
  color: rgb(59, 130, 246);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.auth-switch a:hover {
  color: rgb(168, 85, 247);
}

/* ========== 登录/注册成功提示 ========== */
.auth-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(59, 130, 246, 0.9);
  color: white;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  animation: slideDown 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.auth-toast.error {
  background: rgba(239, 68, 68, 0.9);
}

/* ========== 充值页面样式 ========== */

.recharge-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: calc(100vh - 60px);
}

.recharge-header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 30px;
}

.recharge-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.recharge-subtitle {
  font-size: 16px;
  color: #b8b8b8;
}

/* 标签切换 */
.recharge-tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.recharge-tab {
  padding: 12px 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.recharge-tab:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.3);
  color: #667eea;
}

.recharge-tab.active {
  background: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
  color: #667eea;
}

/* 订阅/积分包卡片 */
.recharge-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.package-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.package-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.package-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.package-name {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.package-price {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.package-period {
  font-size: 14px;
  color: #888;
  margin-top: 4px;
}

.package-features {
  flex: 1;
  margin-bottom: 20px;
}

.package-feature {
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.package-feature::before {
  content: "✓";
  color: #00d26a;
  font-weight: 700;
}

.package-actions {
  display: flex;
  gap: 10px;
}

.btn-subscribe,
.btn-purchase {
  flex: 1;
  padding: 12px;
  border: 1px solid rgba(102, 126, 234, 0.3);
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-subscribe:hover,
.btn-purchase:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
  transform: translateY(-2px);
}

.btn-manage {
  flex: 1;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: default;
  transition: all 0.2s;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .recharge-page {
    padding: 10px;
  }

  .recharge-header {
    padding: 30px 20px;
  }

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

  .recharge-tabs {
    gap: 10px;
  }

  .recharge-tab {
    padding: 10px 20px;
    font-size: 14px;
  }

  .recharge-content {
    grid-template-columns: 1fr;
    padding: 10px 0;
  }

  .package-actions {
    flex-direction: column;
  }

  .btn-subscribe,
  .btn-purchase,
  .btn-manage {
    width: 100%;
  }

  .payment-contact {
    flex-direction: column;
    text-align: center;
  }

  .contact-icon {
    margin-right: 0;
    margin-bottom: 12px;
  }
}

/* 付款联系信息 */
.payment-contact {
  margin-top: 40px;
  padding: 24px;
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.contact-text {
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  line-height: 1.8;
}

.contact-text strong {
  display: block;
  font-size: 18px;
  color: #667eea;
  margin-bottom: 8px;
}

.contact-note {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}
