*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  line-height: 1.6;
}

/* Navbar Section */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
  overflow-x: auto;
  box-sizing: border-box;
}

.navbar .logo {
  font-weight: bold;
  font-size: 1.4rem;
  color: #5b5bff;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-links li a {
  position: relative;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: #5b5bff;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background-color: #5b5bff;
  transition: width 0.3s ease;
}

.nav-links li a:hover::after {
  width: 100%;
}

section {
  scroll-margin-top: 50px;
}

html {
  scroll-behavior: smooth;
}

/* Header Section */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  min-height: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  background: #5b5bff;
  color: white;
  padding: 1rem 0;
}

.hero-content {
  max-width: 900px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  line-height: 0.9;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.hero-authors {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.hero-notes {
  font-size: 0.9rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
}

/* Buttons */
.links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.links a {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

/* Abstract Section */
.abstract {
  text-align: center;
  padding-top: 0.5rem;
  padding-bottom: 5rem;
}

.abstract-title {
  font-size: 2.5rem;
  color: #5b5bff;
}

.abstract p {
  max-width: 750px;
  margin: 0 auto 2rem;
}

.abstract img {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* Features Section */
.features {
  text-align: center;
  background-color: #f5f6fa;
  width: 100%;
  padding: 1rem 0 5rem;    
}

.features-title {
  font-size: 2.5rem;
  color: #5b5bff;
  margin-bottom: 2rem;
}

.features-carousel {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0 5rem;
  max-width: 1100px;
  margin: 0 auto;
  box-sizing: border-box;
}

.features-track {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  overflow: hidden;
}

.feature-card {
  width: 100%;
  height: 400px;
  background: white;
  border-radius: 24px;
  border: 1px solid rgba(0,0,0,0.04);
  padding: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

.feature-card.active {
  display: flex;
}

.feature-card h3 {
  font-size: 1.5rem;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
  margin-top: 5px;
  padding: 0 150px;
  padding-bottom: 0.5rem;
}

.image-hover-container {
  position: relative;
  width: fit-content;
  margin: 0 auto 1.5rem auto;
  height: 220px;
  display: block; 
  cursor: pointer;
}

.image-hover-container img {
  position: relative;
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  transition: opacity 0.3s ease-in-out;
  margin: 0;
}

.image-hover-container .hover-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 2;
}

.image-hover-container:hover .hover-img {
  opacity: 1;
}

.image-hover-container:hover .base-img {
  opacity: 0;
}

.feature-card > img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.carousel-btn {  
  position: relative;
  width: 44px;
  height: 44px;            
  border-radius: 50%;
  background-color: #5b5bff;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1.5px solid black;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.carousel-btn:hover {
  background-color: #4444dd;
  transform: scale(1.05);
}

.carousel-btn::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-top: 3px solid white;
  border-right: 3px solid white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.carousel-btn.next::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.carousel-btn.prev::before {
  transform: translate(-50%, -50%) rotate(-135deg);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 1.5rem;
}

.dot {
  width: 8px;
  height: 8px;
  background-color: #cfcfcf;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.dot.active {
  background-color: #5b5bff;
  transform: scale(1.2);
}

/* Segmenter Section */
.segmenter {
  text-align: center;
  padding-top: 0.5rem;
  padding-bottom: 5rem;
}

.segmenter-title {
  font-size: 2.5rem;
  color: #5b5bff;
  text-align: center;
}

.segmenter p {
  max-width: 750px;
  margin: 0 auto 2rem;
}

.segmenter img {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* Comparison Section */
.comparison {
  text-align: center;
  padding: 2rem 1rem;
  background-color: #f5f6fa;
}

.comparison-title {
  font-size: 2.5rem;
  color: #5b5bff;
}

#replay-btn {
  margin-bottom: 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  background-color: #5b5bff;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#replay-btn:hover {
  background-color: #4444dd;
}

.comparison-examples {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
  padding-bottom: 1.5rem;
}

.comparison-example {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.example-label {
  font-weight: 600;
  color: #333;
  width: 120px;
  text-align: left;
  margin: 0;
  line-height: 12px;
  display: flex;
  position: relative;
  align-items: center;
  top: 15px;
}

.timeline {
  flex-grow: 1;
  height: 12px;
  min-width: 400px;
  max-width: 100%;
  background-color: #ddd;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.progress {
  height: 100%;
  background-color: #5b5bff;
  width: 0;
  border-radius: 6px 0 0 6px;
}

.comparison p {
  max-width: 750px;
  margin: 0 auto 2rem;
}

/* Citation Section */
.citation {
  background-color: #ffff;
  padding-top: 0.5rem;
  padding-bottom: 5rem;
  text-align: center;
}

.citation-title {
  font-size: 2.5rem;
  color: #5b5bff;
  margin-bottom: 2rem;
}

.citation-box {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  text-align: left;
}

.citation-box pre {
  margin: 0;
  white-space: pre;
  overflow-x: auto;
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
}

.copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.copy-btn:hover {
  background-color: #e6e6e6;
  transform: scale(1.05);
}

.copy-icon {
  position: relative;
  width: 14px;
  height: 14px;
}

.copy-icon::before,
.copy-icon::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid #666;
  border-radius: 3px;
  background: transparent;
}

.copy-icon::before {
  top: -1px;
  left: 3px;
}

.copy-icon::after {
  top: 3px;
  left: -1px;
  background-color: #f0f0f0;
}

.copy-btn.copied .copy-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn.copied .copy-icon::before,
.copy-btn.copied .copy-icon::after {
  all: unset;
}
.copy-btn.copied .copy-icon::after {
  content: "✔";
  color: #666;
  font-size: 16px;
}

/* Footer Section */
footer {
  text-align: center;
  color: #666;
  margin-top: 80px;
}