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

:root {
  --primary-color: #7c3aed;
  --secondary-color: #5b21b6;
  --accent-color: #8b5cf6;

  --text-color: #111827;
  --muted-color: #6b7280;

  --bg-color: #ffffff;
  --surface-color: #ffffff;
  --surface-alt: #f8fafc;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-strong: rgba(0, 0, 0, 0.12);

  --border-radius: 12px;

  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html, body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 20px 12px;
  text-align: center;
}

header h1 {
  margin: 0 0 10px;
  font-size: 60px;
  letter-spacing: -0.03em;
  font-weight: 800;
  background: linear-gradient(135deg, #111827 0%, #4c1d95 50%, #7c3aed 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

header p {
  margin: 0;
  color: var(--muted-color);
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

header,
main {
  position: relative;
  z-index: 1;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 40px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin: 18px 0 14px;
  flex-wrap: wrap;
  align-items: center;
}

.tab {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-color);
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tab:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-color-strong);
}

.tab.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

/* External Link Button Styles */
.external-link.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  border: none;
  cursor: pointer;
  height: 40px; /* Match tab height roughly */
}

.external-link.button.is-dark {
  background-color: #111827;
  color: #ffffff;
}

.external-link.button.is-dark:hover {
  background-color: #374151;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.external-link.button.is-rounded {
  border-radius: 999px;
}

.external-link.button .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}


.tab-panel.hidden {
  display: none;
}

/* Filters */
.filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;

  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.filters input,
.filters select {
  height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  color: var(--text-color);
  outline: none;
}

.filters input {
  flex: 1;
  min-width: 220px;
}

.filters select {
  min-width: 180px;
}

.filters select[multiple] {
  height: 120px;
}

.filters input::placeholder {
  color: #9ca3af;
}

.filters input:focus,
.filters select:focus {
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.filters button {
  height: 42px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.filters button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Overview */
.overview-hero {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.overview-title {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 14px;
}

.overview-figure {
  border-radius: var(--border-radius);
  border: 1px dashed rgba(0, 0, 0, 0.18);
  background: var(--surface-alt);
  padding: 14px;
  overflow: hidden;
}

.overview-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: #ffffff;
}

.overview-image-placeholder {
  margin-top: 10px;
  color: var(--muted-color);
  font-size: 13px;
}

.performance-card {
  background: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.performance-card h3 {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
  color: white;
  margin: 0;
  padding: 16px 16px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.performance-card .card-content {
  padding: 16px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.step {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-alt);
}

.step-num {
  font-weight: 800;
  color: var(--secondary-color);
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.step-text {
  color: var(--text-color);
  font-weight: 600;
  font-size: 13px;
}

@media (max-width: 768px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Table Container */
.table-container {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--surface-color);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

thead th {
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  padding: 12px 12px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
  color: var(--text-color);
  vertical-align: top;
}

tbody tr:hover {
  background: #f9fafb;
}

/* Footer (if enabled) */
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 28px;
  color: var(--muted-color);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    padding-top: 28px;
  }

  header h1 {
    font-size: 28px;
  }

  .filters input {
    min-width: 180px;
  }
}
