/* ============================================
   从0到算法高手 - 算法社团招新手册
   style.css - 完整样式系统
   ============================================ */

/* === CSS Variables === */
:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --primary-dark: #3730a3;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --gradient-main: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
  --gradient-blue: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --bg-primary: #080c18;
  --bg-secondary: #0d1324;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --glass-bg: rgba(15, 23, 42, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --max-width: 1200px;
  --nav-height: 70px;
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-light); }

img { max-width: 100%; display: block; }
ul { list-style: none; }

::selection {
  background: rgba(79, 70, 229, 0.4);
  color: white;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 16px;
  background: linear-gradient(135deg, #f1f5f9 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* === Section Layout === */
section {
  padding: 100px 24px;
  position: relative;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 1000;
  transition: all var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
  color: var(--primary-light);
  background: rgba(79, 70, 229, 0.15);
}

.nav-cta {
  background: var(--gradient-main) !important;
  color: white !important;
  padding: 8px 20px !important;
  border-radius: 20px !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === Hero Section === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 20px;
  background: rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(79, 70, 229, 0.3);
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 40%, #818cf8 70%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  font-style: italic;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: 0 4px 24px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(79, 70, 229, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-3px);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  animation: bounce 2s infinite;
}

.hero-scroll i {
  font-size: 1.2rem;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* === Floating Elements (Hero decorative) === */
.hero-float {
  position: absolute;
  z-index: 0;
  opacity: 0.08;
  pointer-events: none;
}

.hero-float-1 {
  top: 15%;
  right: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #4f46e5 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero-float-2 {
  bottom: 20%;
  left: 8%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(20px, -20px); }
  66% { transform: translate(-10px, 15px); }
}

/* === Cards Grid === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

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

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

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

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: white;
  background: var(--gradient-main);
}

.card-icon.blue { background: var(--gradient-blue); }
.card-icon.accent { background: var(--gradient-accent); }

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.card-tag {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

/* === Timeline (Horizontal) === */
.timeline-section {
  background: var(--bg-secondary);
}

.timeline-horizontal {
  display: flex;
  gap: 0;
  position: relative;
  padding: 20px 0;
  overflow-x: auto;
}

.timeline-horizontal::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 60px;
  right: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  transform: translateY(-50%);
}

.timeline-item {
  flex: 1;
  min-width: 220px;
  position: relative;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-main);
  border: 4px solid var(--bg-secondary);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
  margin-bottom: 24px;
}

.timeline-dot.accent {
  background: var(--gradient-accent);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: all var(--transition);
  width: 100%;
}

.timeline-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.timeline-card .time {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary-light);
  margin-bottom: 12px;
}

.timeline-card .time.accent {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-light);
}

.timeline-card h4 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.timeline-card ul {
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.timeline-card ul li {
  padding: 4px 0;
  position: relative;
  padding-left: 16px;
}

.timeline-card ul li::before {
  content: '\203A';
  position: absolute;
  left: 0;
  color: var(--primary-light);
  font-weight: 700;
}

/* === Code Display === */
.code-section {
  background: var(--bg-primary);
}

.code-display {
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-color);
}

.code-dots {
  display: flex;
  gap: 8px;
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot:nth-child(1) { background: #ef4444; }
.code-dot:nth-child(2) { background: #eab308; }
.code-dot:nth-child(3) { background: #22c55e; }

.code-filename {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

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

.code-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.code-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.code-body {
  background: #0d1117;
  padding: 24px;
  overflow-x: auto;
}

.code-body pre {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.65;
  color: #e6edf3;
  tab-size: 4;
}

.code-body code {
  font-family: inherit;
}

.code-line-numbers {
  display: inline-block;
  color: var(--text-muted);
  text-align: right;
  padding-right: 20px;
  user-select: none;
  border-right: 1px solid var(--border-color);
  margin-right: 16px;
  min-width: 32px;
}

.code-line-numbers span {
  display: block;
}

.code-line {
  display: flex;
}

.code-line-content span {
  display: inline;
}

.code-tag { color: #c9d1d9; }
.code-keyword { color: #ff7b72; }
.code-type { color: #ffa657; }
.code-string { color: #a5d6ff; }
.code-function { color: #d2a8ff; }
.code-number { color: #79c0ff; }
.code-comment { color: #8b949e; font-style: italic; }
.code-operator { color: #ff7b72; }
.code-variable { color: #e6edf3; }
.code-builtin { color: #d2a8ff; }

.code-output-area {
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--border-color);
  display: none;
}

.code-output-area.show {
  display: block;
}

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

.code-output-text {
  font-family: var(--font-mono);
  color: #22c55e;
  font-size: 0.9rem;
}

.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: rgba(34, 197, 94, 0.95);
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast-msg.show {
  opacity: 1;
  transform: translateY(0);
}

/* === Tool Cards === */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
}

.tool-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.tool-card i {
  font-size: 2rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.tool-card h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.tool-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* === Flow Chart === */
.flow-chart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
}

.flow-node {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  text-align: center;
  min-width: 140px;
  transition: all var(--transition);
  position: relative;
}

.flow-node:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-light);
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(79, 70, 229, 0.15);
}

.flow-node-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.flow-node h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.flow-node p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.flow-arrow {
  font-size: 1.3rem;
  color: var(--primary-light);
  padding: 0 8px;
  flex-shrink: 0;
}

.flow-arrow-vertical {
  display: none;
}

/* === Vertical Timeline (四年规划) === */
.timeline-vertical {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline-vertical::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent), transparent);
  transform: translateX(-50%);
}

.tl-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 48px;
  position: relative;
}

.tl-item:nth-child(odd) {
  flex-direction: row;
}
.tl-item:nth-child(even) {
  flex-direction: row-reverse;
}

.tl-dot {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gradient-main);
  border: 4px solid var(--bg-secondary);
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.tl-card {
  width: calc(50% - 40px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all var(--transition);
}

.tl-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.tl-year {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--gradient-main);
  color: white;
  margin-bottom: 12px;
}

.tl-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.tl-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.tl-card ul {
  margin-top: 10px;
}

.tl-card ul li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 3px 0;
  padding-left: 18px;
  position: relative;
}

.tl-card ul li::before {
  content: '\203A';
  position: absolute;
  left: 0;
  color: var(--primary-light);
  font-weight: 700;
}

/* === AI Section === */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.ai-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
  position: relative;
}

.ai-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.ai-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.ai-card-header i {
  font-size: 1.6rem;
  color: var(--accent-light);
}

.ai-card-header h3 {
  font-size: 1.05rem;
}

.ai-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* === CTA Section === */
.cta-section {
  text-align: center;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(79, 70, 229, 0.08) 0%, transparent 60%);
  animation: ctaGlow 8s ease-in-out infinite alternate;
}

@keyframes ctaGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-30px, 30px); }
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-section .section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.btn-large {
  padding: 18px 44px;
  font-size: 1.1rem;
}

/* === Footer === */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 24px;
  text-align: center;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* === Reveal Animations === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* === Typing Animation === */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--primary-light);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

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

/* === Counter === */
.counter-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.counter-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* === Responsive === */
@media (max-width: 1024px) {
  .timeline-horizontal {
    flex-direction: column;
    gap: 20px;
    padding: 0;
  }
  .timeline-horizontal::before {
    display: none;
  }
  .timeline-item {
    min-width: unset;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
  }
  .timeline-dot {
    margin-bottom: 0;
    margin-top: 8px;
  }
  .timeline-card {
    text-align: left;
  }
}

@media (max-width: 768px) {
  section { padding: 60px 16px; }
  .section-header { margin-bottom: 40px; }

  .navbar { padding: 0 16px; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px;
    gap: 4px;
    transform: translateY(-100%);
    opacity: 0;
    transition: all var(--transition);
    pointer-events: none;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 16px;
  }

  .mobile-menu-btn { display: flex; }

  .hero { padding: 100px 16px 60px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; justify-content: center; }

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

  .timeline-vertical::before { left: 20px; }
  .tl-item, .tl-item:nth-child(even) { flex-direction: row !important; }
  .tl-card { width: calc(100% - 50px); }
  .tl-dot { left: 20px; }
  .tl-item:nth-child(even) .tl-card { margin-left: auto; }
  .tl-item:nth-child(odd) .tl-card { margin-left: 50px; }

  .flow-chart { flex-direction: column; gap: 0; }
  .flow-arrow { transform: rotate(90deg); padding: 8px 0; }

  .code-body { padding: 16px; font-size: 0.82rem; }
  .code-header { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }

  .footer-links { gap: 16px; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .code-filename { font-size: 0.7rem; }
  .code-btn { font-size: 0.72rem; padding: 4px 10px; }
}

/* === Smooth scrollbar === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(79, 70, 229, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(79, 70, 229, 0.5); }

/* === Loading screen === */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.loading-screen.hide {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-light);
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.loading-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}
/* === Step Block (Tutorial Steps) === */
.step-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  margin-bottom: 32px;
  transition: all var(--transition);
}

.step-block:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.step-num {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}

.step-title {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.step-body {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

.step-list {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
}

.step-list > li {
  counter-increment: step-counter;
  padding: 12px 0 12px 36px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.step-list > li:last-child {
  border-bottom: none;
}

.step-list > li::before {
  content: counter(step-counter) ".";
  position: absolute;
  left: 0;
  top: 12px;
  font-weight: 700;
  color: var(--primary-light);
  font-size: 0.9rem;
}

.step-list p {
  margin: 4px 0 0;
  font-size: 0.88rem;
}

/* === Inline Code Block === */
.code-block {
  background: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #e6edf3;
  overflow-x: auto;
  line-height: 1.6;
}

.code-block code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  padding: 0;
}

/* === Tip / Warning Boxes === */
.tip-box, .warning-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.6;
}

.tip-box {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--text-secondary);
}

.tip-box i, .tip-box .fa-solid {
  color: var(--accent-light);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.warning-box {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.2);
  color: var(--text-secondary);
}

.warning-box i {
  color: #eab308;
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* === Plugin Grid === */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.plugin-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(0,0,0,0.15);
  transition: all var(--transition);
}

.plugin-card:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.03);
}

.plugin-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.plugin-card h4 {
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.plugin-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* === Code Explanation === */
.code-explanation {
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.code-explanation > p {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.explain-list {
  list-style: none;
  padding: 0;
}

.explain-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.explain-line {
  flex-shrink: 0;
  background: rgba(79,70,229,0.15);
  color: var(--primary-light);
  padding: 1px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  min-width: 60px;
  text-align: center;
}

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

.explain-text code {
  background: rgba(255,255,255,0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-light);
}

/* === Output text === */
.output-text {
  font-family: var(--font-mono);
  color: #22c55e;
  background: rgba(34,197,94,0.1);
  padding: 2px 12px;
  border-radius: 4px;
}

/* === kbd === */
kbd {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
}

/* === FAQ Section === */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
}

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

.faq-q {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-q i {
  color: var(--accent-light);
  font-size: 0.9rem;
}

.faq-a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 26px;
}

.faq-a code {
  background: rgba(255,255,255,0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-light);
}

/* === QQ Card === */
.qq-hero {
  display: flex;
  justify-content: center;
}

.qq-card {
  background: var(--bg-card);
  border: 2px solid rgba(79,70,229,0.3);
  border-radius: var(--radius-xl);
  padding: 48px 64px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  transition: all var(--transition);
}

.qq-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 0 40px rgba(79,70,229,0.15);
  transform: translateY(-4px);
}

.qq-icon {
  font-size: 3.5rem;
  color: #17a2f9;
  margin-bottom: 20px;
}

.qq-number {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 4px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.qq-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* === Responsive for new elements === */
@media (max-width: 768px) {
  .step-block {
    padding: 24px 16px;
  }
  .step-header {
    flex-direction: column;
    gap: 12px;
  }
  .step-num {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
  .plugin-grid {
    grid-template-columns: 1fr;
  }
  .qq-card {
    padding: 32px 24px;
  }
  .qq-number {
    font-size: 2rem;
  }
  .explain-list li {
    flex-direction: column;
    gap: 4px;
  }
}
