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

:root {
  --primary: #2E5AA8;
  --primary-light: #4A7FD4;
  --primary-dark: #1C3D7A;
  --accent: #E8593E;
  --accepted: #27AE60;
  --rejected: #E74C3C;
  --candidate: #F39C12;
  --bg: #FAFBFE;
  --bg-white: #FFFFFF;
  --text: #2C3E50;
  --text-light: #5D6D7E;
  --border: #E8ECF1;
  --shadow: 0 2px 16px rgba(46, 90, 168, 0.08);
  --shadow-hover: 0 4px 24px rgba(46, 90, 168, 0.15);
  --radius: 12px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

h2 {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 auto 36px;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #1a2a6c 0%, #2E5AA8 50%, #4A7FD4 100%);
  color: #fff;
  padding: 72px 0 56px;
  text-align: center;
}

.venue-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 24px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.title {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 820px;
  margin: 0 auto 28px;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.author { font-weight: 500; }
.author sup { font-size: 0.65em; margin-left: 1px; }

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  font-size: 0.88rem;
  opacity: 0.85;
  margin-bottom: 6px;
}

.author-note {
  font-size: 0.82rem;
  opacity: 0.7;
  margin-bottom: 28px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s;
  backdrop-filter: blur(4px);
}

.btn:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* ===== Animation Section ===== */
.animation-section {
  padding: 64px 0 48px;
  background: var(--bg-white);
}

.animation-wrapper {
  background: #0D1B2A;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

#mgsm-canvas {
  display: block;
  width: 100%;
  height: 480px;
}

.animation-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #152238;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.ctrl-btn:hover {
  background: rgba(255,255,255,0.15);
}

.legend {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-candidate { background: var(--candidate); }
.dot-accepted { background: var(--accepted); }
.dot-rejected { background: var(--rejected); }

/* ===== Abstract ===== */
.abstract-section {
  padding: 56px 0;
  background: var(--bg);
}

.abstract-text {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text);
  text-align: justify;
  max-width: 820px;
  margin: 20px auto 0;
  background: var(--bg-white);
  padding: 28px 32px;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow);
}

/* ===== Method ===== */
.method-section {
  padding: 56px 0;
  background: var(--bg-white);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0 40px;
}

.method-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.method-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.method-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.2rem;
  color: #fff;
}

.method-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

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

.pipeline-figure {
  text-align: center;
  margin-top: 20px;
}

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

.fig-caption {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-light);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Results ===== */
.results-section {
  padding: 56px 0;
  background: var(--bg);
}

.results-gallery {
  text-align: center;
  margin-top: 20px;
}

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

/* ===== BibTeX ===== */
.bibtex-section {
  padding: 56px 0;
  background: var(--bg-white);
}

.bibtex-box {
  position: relative;
  background: #1E293B;
  border-radius: var(--radius);
  padding: 24px 28px;
  max-width: 720px;
  margin: 20px auto 0;
  box-shadow: var(--shadow);
}

.bibtex-box pre {
  margin: 0;
  overflow-x: auto;
}

.bibtex-box code {
  font-family: 'Source Code Pro', monospace;
  font-size: 0.88rem;
  color: #CBD5E1;
  line-height: 1.6;
  white-space: pre;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ===== Footer ===== */
footer {
  padding: 28px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .title { font-size: 1.5rem; }
  .method-grid { grid-template-columns: 1fr; }
  #mgsm-canvas { height: 360px; }
  .abstract-text { padding: 20px; }
  .hero { padding: 48px 0 40px; }
  h2 { font-size: 1.5rem; }
}
