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

body {
    font-family: -apple-syst3em, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand a {
    color: white;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.nav-menu a.active {
    font-weight: bold;
    border-bottom: 2px solid white;
    padding-bottom: 3px;
}

/* Hero 区域 - 全屏背景 */
.hero {
    position: relative;
    width: 100%;
    height: 55vh;  /* 修改这里：80vh = 屏幕高度的80%，可以改成其他值 */
    min-height: 100px;  /* 修改这里：最小高度，防止在小屏幕上太矮 */
    max-height: 900px;  /* 可选：添加最大高度限制 */
    overflow: hidden;
    display: flex;
    align-items: center;  /* 修改这里：垂直对齐 - center(居中) / flex-start(顶部) / flex-end(底部) */
    justify-content: center;  /* 修改这里：水平对齐 - center(居中) / flex-start(左侧) / flex-end(右侧) */
    margin-top: 0;  /* 修改这里：添加上边距，如 margin-top: 50px; */
    margin-bottom: 0;  /* 修改这里：添加下边距，如 margin-bottom: 50px; */
}

/* 背景图片层 */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity 0.8s ease;
}

/* 深色遮罩层 */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: 2;
}

/* 内容层 */
.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    text-align: center;  /* 修改这里：文字对齐 - center(居中) / left(左对齐) / right(右对齐) */
    padding: 2rem;
    /* 以下是额外的位置调整选项 */
    margin-top: 0;  /* 修改这里：内容区域上边距 */
    transform: translateY(0);  /* 修改这里：垂直偏移，如 translateY(-50px) 向上移动50px */
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease;
    transition: opacity 0.5s ease;  /* 添加过渡效果 */
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.2s both;
    transition: opacity 0.5s ease;  /* 添加过渡效果 */
}

/* 轮播控制按钮 */
.hero-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-prev {
    left: 2rem;
}

.hero-next {
    right: 2rem;
}

.hero-carousel-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.hero-carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* 指示器 */
.hero-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-carousel-indicators .indicator-dot {
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s;
}

.hero-carousel-indicators .indicator-dot.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.hero-carousel-indicators .indicator-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* 按钮区域 */
.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.6s both;
}

/* 按钮 */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: white;
    color: #667eea;
}

.btn-primary:hover {
    background: #f0f0f0;
}

.btn-secondary {
    background: white;
    color: #667eea;
}

.btn-secondary:hover {
    background: #f0f0f0;
}

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

/* 区域 */
.section {
    padding: 4rem 0;
}

.section-gray {
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

/* 概览卡片 */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.overview-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.overview-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-top: 0.5rem;
}

.description {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.description h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.description ul {
    margin-left: 2rem;
    margin-top: 1rem;
}

.description li {
    margin-bottom: 0.5rem;
}

/* 样本查看器 */
.sample-viewer {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.sample-display img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sample-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.control-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.control-btn:hover {
    background: #5568d3;
}

.sample-info {
    padding: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.info-label {
    font-weight: 600;
    color: #666;
}

/* 统计 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.chart-placeholder {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 1rem;
}

.scene-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.scene-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1fr 56px;
    align-items: center;
    gap: 1rem;
    padding: 0.25rem 0;
}

.scene-item > span:first-child {
    overflow-wrap: anywhere;
    color: #2c3e50;
}

.scene-item > span:last-child {
    text-align: right;
    color: #666;
    font-variant-numeric: tabular-nums;
}

/* mobile: put the long label on its own row */
@media (max-width: 480px) {
    .scene-item {
        grid-template-columns: 1fr 56px;
        grid-template-rows: auto auto;
    }
    .scene-item > span:first-child {
        grid-column: 1 / -1;
    }
    .scene-item .progress-bar {
        grid-column: 1 / 2;
    }
    .scene-item > span:last-child {
        grid-column: 2 / 3;
        justify-self: end;
    }
}

/* 下载选项 */
.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.download-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.download-size {
    color: #667eea;
    font-weight: 600;
    margin: 0.5rem 0;
}

.citation {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.citation pre {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-top: 1rem;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* 页面标题 */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主页新增样式 */
.home-intro {
    max-width: 1200px;
    margin: 0 auto;
}

.home-intro > h2 {
    text-align: left;  /* 修改为左对齐 */
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.home-intro > p {
    text-align: left;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    line-height: 1.8;
    color: #555;
}

/* 介绍卡片 */
.intro-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.intro-card {
    background: transparent;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: none;
    text-align: center;
}

.intro-image-link {
    display: block;
    text-decoration: none;
}

.intro-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.intro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.intro-image-link:hover .intro-image {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.intro-image-link:hover .intro-image img {
    transform: scale(1.1);
}

.intro-card h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.intro-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    min-height: 100px;
}

.read-more-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.read-more-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

/* Team avatars styles (moved from contact.html) */
.team-avatars .avatars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .team-avatars .avatars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .team-avatars .avatar-item .intro-image {
    width: 140px;
    height: 140px;
  }
}
@media (max-width: 480px) {
  .team-avatars .avatars-grid {
    grid-template-columns: 1fr;
  }
  .team-avatars .avatar-item .intro-image {
    width: 110px;
    height: 110px;
  }
}

.team-avatars .avatar-item { text-align: center; }
.team-avatars .avatar-item .intro-image {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}
.team-avatars .avatar-item .intro-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

/* Overlay that appears on hover showing role and affiliation */
.team-avatars .avatar-overlay {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s ease;
  padding: 8px;
  text-align: center;
  font-size: 13px;
}
/* ensure hover reveals overlay */
.team-avatars .intro-image:hover .avatar-overlay,
.team-avatars .avatar-item:hover .avatar-overlay { opacity: 1; }

.team-avatars .avatar-caption { margin-top: 10px; }
.team-avatars .avatar-caption .small { color: #666; font-size: 12px; margin-top: 4px; }

/* Examples page: Fine annotations gallery */
.sample-gallery {
    margin-top: 3rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.gallery-item {
    text-align: center;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-item p {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* optional: keep it readable on small screens */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Benchmarks: table */
.table-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  margin-top: 1.5rem;
}

.table-note {
  color: #666;
  margin-bottom: 1rem;
}

.table-wrapper {
  overflow-x: auto;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.benchmark-table th,
.benchmark-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.benchmark-table th {
  text-align: left;
  background: #f8f9fa;
  color: #2c3e50;
  font-weight: 700;
}

.benchmark-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Benchmarks: section spacing */
.benchmarks-overview {
  margin-top: 2.5rem;   /* Pixel-Level Semantic Labeling Task 前面的空白 */
}

.benchmarks-overview h2 {
  margin-top: 2.25rem;  /* 各个大标题前留空 */
  margin-bottom: 0.75rem;
}

.benchmarks-overview h2:first-child {
  margin-top: 0;        /* 第一个 h2 不要额外顶开（已经有 .benchmarks-overview 的 margin-top） */
}

.benchmarks-overview h3 {
  margin-top: 1.75rem;  /* Metrics / Results 前面的空白 */
  margin-bottom: 0.5rem;
}

/* Contact page: consistent spacing between blocks */
.team-section {
  margin-top: 2.5rem; /* Contact 顶部文字 与 Dataset Team 之间 */
}

.team-section h2 {
  margin-bottom: 1.25rem;
}

.team-avatars {
  margin-top: 2.5rem; /* Dataset Team 标题 与 头像区之间 */
}

.team-lab-logos {
  margin-top: 2.5rem; /* 头像区 与 Labs 之间 */
}

.team-lab-logos h3 {
  margin-bottom: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero {
        min-height: 400px;  /* 修改这里：平板设备的最小高度 */
        height: 70vh;  /* 修改这里：平板设备的高度 */
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .hero-carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    
    .hero-prev {
        left: 1rem;
    }
    
    .hero_next {
        right: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-carousel-indicators .indicator-dot {
        width: 10px;
        height: 10px;
    }
    
    .intro-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .intro-image {
        width: 120px;
        height: 120px;
    }
    
    .intro-card p {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 350px;  /* 修改这里：手机设备的最小高度 */
        height: 60vh;  /* 修改这里：手机设备的高度 */
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .intro-card {
        padding: 1.5rem;
    }
    
    .intro-image {
        width: 100px;
        height: 100px;
    }
    
    .intro-card h3 {
        font-size: 1.3rem;
    }
}

.sample-gallery h3 {
    font-size: 1.6rem; /* 你想更大可以改成 1.8rem */
}
@media (max-width: 480px) {
    .sample-gallery h3 {
        font-size: 1.3rem;
    }
}
