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

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --border-color: rgba(99, 102, 241, 0.15);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --gradient-main: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
  --gradient-warm: linear-gradient(135deg, #f59e0b, #f43f5e);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== Background Animation ===== */
.bg-animation {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.3), transparent 70%);
  animation: float-particle linear infinite;
  opacity: 0;
}

@keyframes float-particle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-20vh) scale(1); opacity: 0; }
}

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
}

.header-content {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}

.logo-section { display: flex; align-items: center; gap: 16px; }

.avatar-ring {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient-main);
  padding: 3px; animation: spin-ring 4s linear infinite;
}

@keyframes spin-ring {
  to { filter: hue-rotate(360deg); }
}

.avatar {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
  color: var(--accent-blue);
}

.title-block h1 {
  font-size: 18px; font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.header-right { display: flex; align-items: center; gap: 16px; }

.status-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 20px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 12px; color: var(--accent-emerald);
}

.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-emerald);
  animation: pulse 2s ease-in-out infinite;
}

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

.time-display { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* ===== Stats Bar ===== */
.stats-bar {
  max-width: 1400px; margin: 20px auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px; text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-glow);
}

.stat-icon { font-size: 24px; margin-bottom: 6px; }

.stat-value {
  font-size: 28px; font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
}

.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===== Tabs ===== */
.tabs {
  max-width: 1400px; margin: 0 auto; padding: 0 24px;
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border-color);
}

.tab {
  padding: 12px 20px; background: none; border: none;
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: all 0.3s ease; font-family: inherit;
}

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

.tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.tab.novel-link {
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(99,102,241,0.1));
  border-radius: 8px;
  color: var(--accent-purple);
  text-decoration: none;
  display: flex; align-items: center;
}
.tab.novel-link:hover {
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(99,102,241,0.2));
}

/* ===== Main Content ===== */
.main-content {
  max-width: 1400px; margin: 0 auto; padding: 24px;
  min-height: calc(100vh - 300px);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }

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

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.card.glow { box-shadow: var(--shadow-glow); }

.card-title {
  padding: 20px 24px 0;
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
}

.card-body { padding: 16px 24px 24px; }

/* ===== Grids ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ===== Info Grid ===== */
.info-grid {
  margin-top: 16px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}

.info-item {
  padding: 8px 12px; border-radius: 8px;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid var(--border-color);
}

.info-label { font-size: 11px; color: var(--text-muted); display: block; }
.info-value { font-size: 13px; color: var(--text-primary); font-weight: 500; }

/* ===== Highlights ===== */
.highlights { display: flex; flex-direction: column; gap: 12px; }

.highlight-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px; border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.highlight-item:hover {
  border-color: var(--accent-purple);
  transform: translateX(4px);
}

.highlight-icon { font-size: 28px; flex-shrink: 0; }
.highlight-item strong { display: block; margin-bottom: 2px; color: var(--text-primary); }
.highlight-item p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ===== Capability Cards ===== */
.capability-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.capability-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.capability-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}

.capability-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

.capability-name { font-size: 15px; font-weight: 600; }

.capability-desc {
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 14px;
}

.capability-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 500;
  border: 1px solid;
}

/* ===== Tools Grid ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex; align-items: center; gap: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.tool-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
}

.tool-icon { font-size: 24px; flex-shrink: 0; }
.tool-name { font-size: 13px; font-weight: 600; }
.tool-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===== Skills Categories ===== */
.skill-category { margin-bottom: 24px; }

.category-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0;
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.category-count {
  padding: 2px 8px; border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  font-size: 11px; color: var(--accent-blue);
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px; margin-top: 12px;
}

.skill-item {
  padding: 10px 14px; border-radius: 8px;
  background: rgba(99, 102, 241, 0.03);
  border: 1px solid var(--border-color);
  font-size: 13px; color: var(--text-secondary);
  transition: all 0.2s ease;
}

.skill-item:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-primary);
}

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 32px; }

.timeline::before {
  content: ''; position: absolute; left: 11px; top: 0; bottom: 0;
  width: 2px; background: var(--border-color);
}

.timeline-item {
  position: relative; padding-bottom: 24px;
}

.timeline-dot {
  position: absolute; left: -27px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gradient-main);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  backdrop-filter: blur(10px);
}

.timeline-content h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.timeline-date { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.timeline-content p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

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

.footer-content {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .stats-bar { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab { padding: 10px 14px; font-size: 13px; white-space: nowrap; }
  .header-content { flex-direction: column; gap: 8px; }
  .title-block h1 { font-size: 16px; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* ===== Canvas Chart ===== */
canvas { display: block; width: 100% !important; }
