/* ===== 全局变量 ===== */
:root {
  --bg-body: #0a0a0f;
  --bg-card: #14141e;
  --bg-card-hover: #1c1c28;
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.4);
  --secondary: #8b5cf6;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #2d3748;
  --header-height: 70px;
}

/* ===== 全局重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
}
a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

/* ===== 导航栏 ===== */
nav {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
}
nav .nav-inner {
  max-width: 1000px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav .logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
nav .nav-links {
  display: flex;
  gap: 32px;
}
nav .nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
nav .nav-links a:hover,
nav .nav-links a.active {
  color: #fff;
}

/* ===== 布局容器 ===== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px;
}
.home-container {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* ===== 首页 Hero ===== */
.hero {
  text-align: center;
  padding: 80px 0 40px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.08) 0%,
    rgba(139, 92, 246, 0.03) 50%,
    transparent 70%
  );
  z-index: -1;
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 24px;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 1.25rem;
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.8;
}
.highlight-text {
  color: #fff;
  font-weight: 600;
  position: relative;
  white-space: nowrap;
}
.highlight-text::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(59, 130, 246, 0.3);
  z-index: -1;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.btn-primary {
  background: var(--primary);
  color: white;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* ===== 通用板块样式 ===== */
.section-block {
  scroll-margin-top: 100px;
}
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-header h2 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: #fff;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ===== 学习理念 ===== */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.philosophy-card {
  background: var(--bg-card);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.philosophy-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  box-shadow: inset 0 0 20px rgba(59, 130, 246, 0);
  transition: all 0.3s;
  pointer-events: none;
}
.philosophy-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.1);
}
.philosophy-card:hover::after {
  box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.05);
}
.philosophy-card .icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}
.philosophy-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: #fff;
}
.philosophy-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== 探索板块 ===== */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  height: 100%;
}
.section-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--border);
  transition: all 0.3s;
}
.section-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}
.news-card:hover::before {
  background: var(--secondary);
}
.tools-card:hover::before {
  background: var(--primary);
}
.section-card h2 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 16px;
}
.section-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 24px;
}
.link-btn {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
}
.link-btn:hover {
  color: var(--primary);
  transform: translateX(4px);
}

/* ===== CTA ===== */
.cta-section {
  text-align: center;
  padding: 60px 0;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.cta-section p {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: #fff;
}
.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #24292f;
  color: white;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}
.github-btn:hover {
  background: #000;
  transform: translateY(-2px);
}

/* ===== 交互演示区 ===== */
.demo-section {
  margin-top: -20px;
}
.demo-container {
  max-width: 800px;
  margin: 0 auto;
}
.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}
.demo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.demo-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.demo-title .icon {
  font-size: 1.5rem;
}
.demo-title h3 {
  font-size: 1.1rem;
  color: #fff;
  margin: 0;
}
.demo-btn {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.demo-btn:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
}
.demo-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--text-muted);
  color: var(--text-muted);
}
.debate-window {
  height: 350px;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #0d0d14;
}
.debate-message {
  max-width: 80%;
  animation: slideIn 0.3s ease-out forwards;
  opacity: 0;
  transform: translateY(10px);
}
@keyframes slideIn {
  to { opacity: 1; transform: translateY(0); }
}
.debate-message.system {
  align-self: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  max-width: 100%;
}
.debate-message.qwen {
  align-self: flex-start;
}
.debate-message.qwen .speaker-name {
  color: #3b82f6;
  margin-left: 12px;
}
.debate-message.qwen .speaker-content {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-bottom-left-radius: 4px;
}
.debate-message.deepseek {
  align-self: flex-end;
}
.debate-message.deepseek .speaker-name {
  color: #10b981;
  text-align: right;
  margin-right: 12px;
}
.debate-message.deepseek .speaker-content {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-bottom-right-radius: 4px;
}
.debate-message.judge {
  align-self: center;
  max-width: 90%;
}
.debate-message.judge .speaker-name {
  color: #8b5cf6;
  text-align: center;
}
.debate-message.judge .speaker-content {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  text-align: center;
}
.speaker-name {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.speaker-content {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #e2e8f0;
}
/* Scrollbar */
.debate-window::-webkit-scrollbar {
  width: 6px;
}
.debate-window::-webkit-scrollbar-track {
  background: transparent;
}
.debate-window::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
.debate-window::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== 页脚 ===== */
footer {
  background: #050508;
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: auto;
}
.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-content a {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
}
.footer-content a:hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}
.copyright {
  margin-top: 12px;
  opacity: 0.6;
  font-size: 0.8rem;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero-actions {
    flex-direction: column;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }
}

/* ===== 复用新闻/工具页的特定样式 (保留) ===== */
.page-header {
  margin-bottom: 40px;
  text-align: center;
}
.page-header h1 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 8px;
}
.date {
  color: var(--text-muted);
}

/* Card Grids for Tools page */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.tool-card .tool-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}
.tool-card h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 8px;
}
.tool-card .tool-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.6;
}
.tool-card .tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.tool-card .tech-tag {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
}
.tool-card .tool-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}
