/* ===== Global Styles ===== */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --accent-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --dark-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  --text-dark: #2d3748;
  --text-light: #718096;
  --bg-light: #f7fafc;
  --bg-card: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: #fafbfc;
  overflow-x: hidden;
  line-height: 1.7;
  position: relative;
}

/* ===== Animated Background ===== */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  opacity: 0.05;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== Hero Section ===== */
.hero-gradient {
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-custom {
  padding: 5rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

/* ===== Title & Badge Styles ===== */
.title-badge {
  display: inline-block;
  background: var(--primary-gradient);
  color: white;
  padding: 8px 24px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  animation: fadeInDown 0.8s ease;
  letter-spacing: 0.5px;
}

.main-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3.2rem !important;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight-text {
  color: #f5576c;
  position: relative;
}

.highlight-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.main-title:hover .highlight-text::after {
  transform: scaleX(1);
}

/* ===== Authors Section ===== */
.authors-grid {
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.author-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.author-block {
  display: inline-flex;
  align-items: center;
}

.author-block a {
  color: #667eea !important;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.author-block a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

.author-block a:hover {
  color: #764ba2 !important;
}

.author-block a:hover::after {
  width: 100%;
}

.author-block sup {
  margin-left: 2px;
  font-size: 0.75em;
  color: #f5576c;
  font-weight: 600;
}

.affiliations {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
  font-size: 1.4rem;
  color: var(--text-light);
}

.affiliation {
  font-weight: 500;
}

.affiliation-sep {
  margin: 0 1rem;
  color: #cbd5e0;
}

/* ===== Fancy Buttons ===== */
.fancy-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  animation: fadeInUp 0.8s ease 0.6s backwards;
}

.fancy-btn {
  background: white !important;
  border: 2px solid #e2e8f0 !important;
  color: var(--text-dark) !important;
  font-weight: 600 !important;
  padding: 0.75rem 1.75rem !important;
  transition: var(--transition) !important;
  box-shadow: var(--shadow-sm) !important;
  position: relative;
  overflow: hidden;
}

.fancy-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  transition: left 0.3s ease;
  z-index: -1;
}

.fancy-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md) !important;
  color: white !important;
  border-color: transparent !important;
}

.fancy-btn:hover::before {
  left: 0;
}

.fancy-btn .icon {
  transition: transform 0.3s ease;
}

.fancy-btn:hover .icon {
  transform: scale(1.1);
}

.btn-cvf:hover { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important; }
.btn-pdf:hover { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important; }
.btn-arxiv:hover { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important; }
.btn-video:hover { background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%) !important; }
.btn-code:hover { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important; }

/* ===== Video Sections ===== */
.hero-video-section {
  padding: 3rem 1.5rem;
  background: white;
}

.video-wrapper-fancy {
  position: relative;
  width: 85%;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  animation: fadeInScale 1s ease;
}

.video-wrapper-fancy:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.video-wrapper-fancy video,
.main-video {
  width: 100%;
  display: block;
  border-radius: 20px;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Abstract Section ===== */
.abstract-section {
  padding: 4rem 1.5rem;
  background: #fafbfc;
}

.abstract-box {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.abstract-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  margin-bottom: 2rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-dark);
}

.title-icon {
  font-size: 2rem;
}

.abstract-content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text-light);
}

.abstract-content strong {
  color: var(--text-dark);
  font-weight: 600;
}

.highlight-inline {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

/* ===== Teaser Section ===== */
.teaser-fancy {
  padding: 4rem 1.5rem;
  background: #fafbfc;
}

.teaser-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.teaser-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.image-container-fancy {
  overflow: hidden;
  position: relative;
}

.teaser-image,
.result-image {
  width: 100%;
  display: block;
  transition: transform 0.6s ease;
}

.image-container-fancy:hover .teaser-image,
.image-container-fancy:hover .result-image {
  transform: scale(1.05);
}

.teaser-description {
  padding: 2.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.teaser-description p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  text-align: justify;
}

.teaser-description strong {
  color: var(--text-dark);
  font-weight: 600;
}

.teaser-description em {
  color: #f5576c;
  font-style: normal;
  font-weight: 500;
}

/* ===== Feature Sections ===== */
.feature-section {
  padding: 4rem 1.5rem;
  background: white;
}

.feature-section:nth-child(even) {
  background: #fafbfc;
}

.feature-header {
  text-align: center;
  margin-bottom: 3rem;
}

.feature-subtitle {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.8;
}

.stat-highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 1.3em;
}

.content-card {
  background: white;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

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

.video-wrapper-feature {
  position: relative;
  width: 90%;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.video-wrapper-feature:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.video-wrapper-feature video {
  width: 100%;
  display: block;
}

/* ===== Carousel Section ===== */
.carousel-section {
  padding: 4rem 1.5rem;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.fancy-carousel {
  overflow: hidden;
  padding: 1rem 0;
}

.fancy-carousel .item {
  margin: 10px;
  overflow: hidden;
  border-radius: 16px;
  padding: 0;
  font-size: 0;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.fancy-carousel .item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.fancy-carousel video {
  margin: 0;
  width: 100%;
  display: block;
}

/* ===== Comparison Section ===== */
.comparison-section {
  padding: 4rem 1.5rem;
  background: #fafbfc;
}

.comparison-card {
  overflow: hidden;
}

.comparison-description {
  padding: 2rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 0 0 24px 24px;
}

.comparison-description p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  text-align: justify;
  margin: 0;
}

/* ===== BibTeX Section ===== */
.bibtex-section {
  padding: 4rem 1.5rem;
  background: white;
}

.bibtex-card {
  background: #1e293b;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.bibtex-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-gradient);
}

.bibtex-card pre {
  margin: 0;
  padding: 0;
  background: transparent;
}

.bibtex-card code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.8;
  display: block;
}

/* ===== Footer ===== */
.fancy-footer {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: white;
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.fancy-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.5), transparent);
}

.footer-content {
  position: relative;
  z-index: 1;
}

.footer-links {
  margin-bottom: 1.5rem;
}

.footer-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  transition: var(--transition);
  margin: 0 0.5rem;
  backdrop-filter: blur(10px);
}

.footer-icon-link:hover {
  background: var(--primary-gradient);
  transform: translateY(-3px) rotate(5deg);
  box-shadow: var(--shadow-md);
}

.footer-text {
  color: #cbd5e0;
}

.footer-credit {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.footer-credit a {
  color: #667eea;
  transition: var(--transition);
}

.footer-credit a:hover {
  color: #f5576c;
  text-decoration: underline;
}

.footer-copyright {
  font-size: 0.9rem;
  color: #94a3b8;
}

.visitor-tracker {
  text-align: center;
  padding: 2rem 0;
  background: #f8f9fa;
}

.visitor-tracker img {
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

/* ===== Utility Classes ===== */
.dnerf {
  font-variant: small-caps;
}

.large-font {
  font-size: 25px;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

/* ===== Legacy Support ===== */
.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

.publication-title {
  font-family: 'Space Grotesk', sans-serif;
}

.publication-authors {
  font-family: 'Inter', sans-serif;
}

.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56%;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.publication-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.publication-banner {
  max-height: parent;
}

.publication-banner video {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  object-fit: fit;
}

/* ===== Responsive Design ===== */
@media screen and (max-width: 1024px) {
  .main-title {
    font-size: 2.5rem !important;
  }
  
  .author-row {
    gap: 1rem;
  }
  
  .fancy-buttons {
    gap: 0.75rem;
  }
  
  .fancy-btn {
    padding: 0.6rem 1.25rem !important;
  }
}

@media screen and (max-width: 768px) {
  .hero-custom {
    padding: 3rem 1rem 2rem;
  }
  
  .main-title {
    font-size: 2rem !important;
  }
  
  .author-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .fancy-buttons {
    flex-direction: column;
  }
  
  .fancy-btn {
    width: 100%;
  }
  
  .video-wrapper-fancy,
  .video-wrapper-feature {
    width: 100%;
  }
  
  .abstract-box,
  .teaser-description {
    padding: 1.5rem;
  }
  
  .section-title {
    font-size: 1.75rem !important;
  }
}

/* ===== Smooth Scrolling ===== */
html {
  scroll-behavior: smooth;
}

/* ===== Selection Color ===== */
::selection {
  background: rgba(102, 126, 234, 0.3);
  color: #1e293b;
}

::-moz-selection {
  background: rgba(102, 126, 234, 0.3);
  color: #1e293b;
}
