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

:root {
  --primary-color: #0072B2;
  --secondary-color: #D55E00;
  --accent-color: #009E73;
  --dark-color: #2c3e50;
  --light-bg: #f8f9fa;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-light: #666666;
  --border-radius: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans', 'Segoe UI', 'Roboto', Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background: #ffffff;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary-color);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 0 50px;
  text-align: center;
}

.hero h1 {
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.hero .subtitle {
  font-size: 1.1em;
  opacity: 0.9;
  margin-bottom: 24px;
  font-weight: 300;
}

.venue-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  padding: 6px 18px;
  font-size: 0.9em;
  font-weight: 500;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

/* ===== Authors ===== */
.authors {
  padding: 30px 0 10px;
  text-align: center;
}

.authors-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 32px;
  margin-bottom: 12px;
}

.author {
  font-size: 1.05em;
}

.author a {
  color: var(--dark-color);
  font-weight: 500;
}

.author sup {
  color: var(--primary-color);
  font-weight: 600;
  margin-left: 1px;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 36px;
  margin-top: 10px;
}

.affiliation {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92em;
  color: var(--text-light);
}

.affiliation img {
  height: 28px;
  width: auto;
}

.affiliation sup {
  color: var(--primary-color);
  font-weight: 600;
}

/* ===== Links Bar ===== */
.links-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 20px 0 30px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.92em;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1.5px solid #e0e0e0;
  color: var(--text-color);
  background: white;
}

.link-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 114, 178, 0.15);
  transform: translateY(-1px);
}

.link-btn img {
  height: 18px;
  width: 18px;
}

.link-btn svg {
  width: 18px;
  height: 18px;
}

/* ===== Sections ===== */
section {
  padding: 50px 0;
}

section:nth-child(even) {
  background: var(--light-bg);
}

.section-title {
  font-size: 1.6em;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 24px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ===== Abstract ===== */
.abstract-text {
  font-size: 1.02em;
  line-height: 1.85;
  text-align: justify;
  max-width: 900px;
  margin: 0 auto;
  color: var(--text-light);
}

/* ===== Teaser / Overview Figure ===== */
.teaser {
  padding: 40px 0;
  text-align: center;
}

.teaser-img {
  max-width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.teaser-caption {
  margin-top: 16px;
  font-size: 0.92em;
  color: var(--text-light);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ===== Method Section ===== */
.method-content {
  max-width: 900px;
  margin: 0 auto;
}

.method-block {
  margin-bottom: 36px;
}

.method-block h3 {
  font-size: 1.2em;
  color: var(--dark-color);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--primary-color);
}

.method-block p {
  color: var(--text-light);
  line-height: 1.8;
  text-align: justify;
}

.method-figure {
  text-align: center;
  margin: 24px 0;
}

.method-figure img {
  max-width: 90%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.method-figure .caption {
  margin-top: 12px;
  font-size: 0.88em;
  color: var(--text-light);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Algorithm Box ===== */
.algorithm-box {
  background: #f4f7fa;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius);
  padding: 24px 28px;
  max-width: 780px;
  margin: 24px auto;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.88em;
  line-height: 1.9;
}

.algorithm-box .algo-title {
  font-weight: 700;
  font-size: 1.05em;
  margin-bottom: 12px;
  color: var(--dark-color);
  font-family: 'Noto Sans', sans-serif;
}

.algorithm-box .algo-line {
  padding-left: 20px;
  position: relative;
}

.algorithm-box .algo-line .line-num {
  position: absolute;
  left: 0;
  color: #999;
  font-size: 0.85em;
}

.algorithm-box .keyword {
  color: var(--primary-color);
  font-weight: 600;
}

.algorithm-box .comment {
  color: #6b7280;
  font-style: italic;
}

/* ===== Results Tables ===== */
.results-table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  text-align: center;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.results-table thead {
  background: var(--dark-color);
  color: white;
}

.results-table th {
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.92em;
}

.results-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
}

.results-table tbody tr:hover {
  background: #f8faff;
}

.results-table .highlight-row {
  background: #eef6ff;
  font-weight: 600;
}

.results-table .highlight-row td {
  color: var(--primary-color);
}

.results-table .best {
  font-weight: 700;
  color: var(--primary-color);
}

.gain {
  font-size: 0.8em;
  color: #800020;
  margin-left: 2px;
}

/* ===== Contributions List ===== */
.contributions-list {
  max-width: 900px;
  margin: 0 auto;
  list-style: none;
}

.contributions-list li {
  padding: 16px 20px;
  margin-bottom: 14px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
  line-height: 1.7;
  color: var(--text-light);
}

.contributions-list li strong {
  color: var(--dark-color);
}

/* ===== BibTeX ===== */
.bibtex-section {
  max-width: 800px;
  margin: 0 auto;
}

.bibtex-box {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: var(--border-radius);
  padding: 24px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.85em;
  line-height: 1.7;
  overflow-x: auto;
  position: relative;
}

.bibtex-box .copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.85em;
  cursor: pointer;
  transition: background 0.2s;
}

.bibtex-box .copy-btn:hover {
  background: rgba(255,255,255,0.2);
}

/* ===== Footer ===== */
footer {
  background: var(--dark-color);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 30px 0;
  font-size: 0.88em;
}

footer a {
  color: rgba(255,255,255,0.9);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.6em;
  }
  
  .authors-list {
    gap: 10px 20px;
  }
  
  .links-bar {
    gap: 10px;
  }
  
  .link-btn {
    padding: 8px 14px;
    font-size: 0.85em;
  }
  
  section {
    padding: 36px 0;
  }
  
  .section-title {
    font-size: 1.35em;
  }
  
  .results-table {
    font-size: 0.82em;
  }
}

/* ===== Math (KaTeX) ===== */
.math-inline {
  font-style: italic;
}

/* ===== Comparison Grid ===== */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 24px auto;
}

.comparison-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--primary-color);
}

.comparison-card h4 {
  color: var(--dark-color);
  margin-bottom: 8px;
}

.comparison-card p {
  color: var(--text-light);
  font-size: 0.92em;
  line-height: 1.6;
}

/* ===== Key Insight Callout ===== */
.insight-callout {
  background: linear-gradient(135deg, #eef6ff 0%, #f0f9ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--border-radius);
  padding: 20px 24px;
  max-width: 900px;
  margin: 24px auto;
}

.insight-callout .insight-title {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
  font-size: 0.95em;
}

.insight-callout p {
  color: var(--text-light);
  font-size: 0.95em;
  line-height: 1.7;
}
