/* CooperScene Website Styles */

:root {
  --primary-color: #2c3e50;
  --accent-color: #3498db;
  --accent-dark: #2980b9;
  --section-light: #f5f7fa;
  --text-color: #363636;
  --text-muted: #6c757d;
  --border-color: #e0e0e0;
  --hero-gradient-start: #1a1a2e;
  --hero-gradient-end: #16213e;
}

/* ===== Global ===== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px;
}

body {
  font-family: 'Noto Sans', 'Google Sans', sans-serif;
  color: var(--text-color);
}

.publication-title {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-weight: 700;
}

/* ===== Sticky Navbar ===== */

.navbar {
  background-color: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 100;
}

.navbar.is-fixed-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.navbar-item {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-color);
  transition: color 0.2s;
}

.navbar-item:hover,
.navbar-item.is-active {
  color: var(--accent-color) !important;
  background-color: transparent !important;
}

.navbar-brand .navbar-item {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

/* ===== Hero Section ===== */

.hero-section {
  background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 50%, #0a3d62 100%);
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-section .title,
.hero-section .subtitle {
  color: #ffffff;
}

.hero-section .subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.hero-video-section {
  background: #000;
  padding: 0;
  line-height: 0;
}

.hero-video-section video {
  max-height: 70vh;
  object-fit: contain;
  margin: 0 auto;
}

.viz-section {
  background: #000;
  padding: 1.5rem 0 2rem;
  color: #e8e8e8;
}

.viz-section .title {
  color: #ffffff;
}

/* Keep form controls / labels readable on the dark section. */
.viz-section label {
  color: #e8e8e8;
}

.viz-section .section-divider {
  margin-bottom: 0;
}

.viz-section #viz-video-state,
.viz-section #viz-foxglove-state {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.viz-section #viz-video {
  max-height: 88vh;
  object-fit: contain;
}

.publication-venue {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  backdrop-filter: blur(4px);
}

.author-block a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s;
}

.author-block a:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.affiliation-block {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.hero-buttons .button {
  margin: 4px;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-buttons .button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===== Section Styles ===== */

.section-alt {
  background-color: var(--section-light);
}

.section .title.is-3 {
  color: var(--primary-color);
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  margin: 0 auto 2rem;
  border-radius: 2px;
}

.section-divider.is-left {
  margin-left: 0;
}

/* ===== Stats Cards ===== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}

.stat-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-color);
  display: block;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  display: block;
}

/* ===== Feature Cards (Overview) ===== */

.feature-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.8rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color);
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.feature-card .icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.feature-card .icon-wrapper.bg-blue {
  background: rgba(52, 152, 219, 0.1);
  color: var(--accent-color);
}

.feature-card .icon-wrapper.bg-green {
  background: rgba(46, 204, 113, 0.1);
  color: #2ecc71;
}

.feature-card .icon-wrapper.bg-purple {
  background: rgba(155, 89, 182, 0.1);
  color: #9b59b6;
}

.feature-card .icon-wrapper.bg-orange {
  background: rgba(243, 156, 18, 0.1);
  color: #f39c12;
}

.feature-card .icon-wrapper.bg-red {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

.feature-card .icon-wrapper.bg-teal {
  background: rgba(26, 188, 156, 0.1);
  color: #1abc9c;
}

.feature-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Tables ===== */

.benchmark-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.benchmark-table thead th {
  background: var(--primary-color);
  color: #ffffff;
  padding: 0.75rem 0.8rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.benchmark-table tbody td {
  padding: 0.6rem 0.8rem;
  text-align: center;
  border: 1px solid var(--border-color);
}

.benchmark-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.benchmark-table tbody tr:hover {
  background-color: #e8f4fd;
}

.benchmark-table .best {
  font-weight: 700;
  color: var(--accent-color);
}

.benchmark-table .second-best {
  text-decoration: underline;
}

/* Unlimited-network columns: light gray text (the paper renders them in
   muted color because they are infeasible under real C-V2X). */
.benchmark-table .col-unlimited {
  color: #b8b8b8;
}

.benchmark-table thead .col-unlimited {
  color: #cccccc;
}

.benchmark-table .best-unlimited {
  font-weight: 700;
}

.unlimited-tag {
  color: #b8b8b8;
}


.benchmark-table .method-name {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.benchmark-table .agent-config {
  text-align: left;
  white-space: nowrap;
  font-size: 0.82rem;
}

/* ===== Tabs ===== */

.tabs-wrapper .tabs {
  margin-bottom: 0;
}

.tabs-wrapper .tabs ul {
  border-bottom-color: var(--border-color);
}

.tabs-wrapper .tabs a {
  font-family: 'Noto Sans', 'Google Sans', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--primary-color);
}

.tabs-wrapper .tabs li.is-active a {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.tab-content {
  display: none;
  padding: 1.5rem 0;
}

.tab-content.is-active {
  display: block;
}

/* ===== Dataset Format ===== */

.format-tree {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  overflow-x: auto;
}

.format-tree .folder {
  color: #4ec9b0;
}

.format-tree .file {
  color: #ce9178;
}

.format-tree .comment {
  color: #6a9955;
}

/* ===== Download Section ===== */

.download-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.download-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

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

.download-card h4 {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.download-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

/* ===== Visualizer ===== */

.visualizer-placeholder {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 10px;
  padding: 3rem 2rem;
  text-align: center;
  color: #ffffff;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.visualizer-placeholder .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.visualizer-placeholder p {
  opacity: 0.8;
  max-width: 500px;
}

/* ===== BibTeX ===== */

.bibtex-block {
  position: relative;
}

.bibtex-block pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1.5rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-x: auto;
}

.bibtex-block .copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #d4d4d4;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}

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

/* ===== Metric Cards ===== */

.metric-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.metric-card h5 {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.metric-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.metric-card .tag {
  font-weight: 600;
}

/* ===== Comparison Table ===== */

.comparison-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.comparison-table thead th {
  background: #f0f4f8;
  padding: 0.6rem 0.8rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--border-color);
  color: var(--primary-color);
}

.comparison-table tbody td {
  padding: 0.5rem 0.8rem;
  text-align: center;
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
}

.comparison-table .check {
  color: #2ecc71;
}

.comparison-table .cross {
  color: #e74c3c;
}

.comparison-table .partial {
  color: #f39c12;
}

.comparison-table .dataset-name {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.comparison-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.comparison-table tbody tr.highlight-row {
  background-color: #e8f4fd !important;
  font-weight: 600;
}

/* ===== Footer ===== */

.footer {
  background: var(--primary-color);
  color: rgba(255, 255, 255, 0.7);
  padding: 2rem 1.5rem;
}

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

.footer a:hover {
  color: #ffffff;
}

/* ===== Responsive ===== */

@media screen and (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-section {
    padding-top: 70px;
  }

  .section {
    padding: 2rem 1rem;
  }

  .benchmark-table {
    font-size: 0.78rem;
  }
}

@media screen and (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Sensor Info ===== */

.sensor-list {
  list-style: none;
  padding: 0;
}

.sensor-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.sensor-list li:last-child {
  border-bottom: none;
}

.sensor-list li strong {
  color: var(--primary-color);
}

/* ===== Agent Config Diagram ===== */

.agent-configs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.agent-config-card {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
}

.agent-config-card .config-label {
  font-weight: 700;
  color: var(--accent-color);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.agent-config-card .config-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ===== Model Pipeline ===== */

.pipeline-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pipeline-step .step-number {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--accent-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.pipeline-step .step-content h5 {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.3rem;
}

.pipeline-step .step-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
