/* static/css/style.css */

:root {
  --bg-color: #f2f2f5;
  --card-bg: rgba(255, 255, 255, 0.8);
  --btn-bg: rgba(255, 255, 255, 0.6);
  --primary-color: #0071e3;
  --text-color: #1d1d1f;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}



.container {
    max-width: 1200px;    
    padding-left: 8px;
    padding-right: 8px;
    margin-left: auto;
    margin-right: auto;
}


.abstract-wrapper {
  max-width: 1050px;   
  margin: 0 auto;     
  padding-left: 15px; 
  padding-right: 15px;
}



/* The title is centered */
h1, h2 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-align: center;
}

h3 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-align: center;
  font-size: 1rem;  
}


/* Top navigation */
nav {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.194);
  box-shadow: 0 1px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.navbar-brand {
  font-size: 1.5rem;
  color: var(--primary-color) !important;
  text-decoration: none;
}

.navbar .navbar-nav {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.navbar .nav-item {
  margin: 0;
}

.navbar .nav-link {
  display: block;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--text-color);
  font-weight: 500;
  transition: background 0.3s;
}

.navbar .nav-link:hover {
  background: var(--card-bg);
}

/* Abstract & Figures */
.text-center img {
  display: block;
  margin: 0.75rem auto;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  height: auto;
}

/* Figures Section */
#figures .row {
  display: flex;
  justify-content: center;   /* The entire group is centered */
  flex-wrap: nowrap;         /* Line breaks are prohibited */
  gap: 2rem;                 /* Leave some distance between the two pictures */
  padding: 0 3rem;           /* Leave an extra 3rem on each side */
}

#figures .row > div {
  flex: 0 1 auto;
  width: auto;
  max-width: none;
}

#figures .figure-img {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: 100%;
  max-height: 250px;       
  object-fit: contain;
}

/* Filter button group */
#filter-controls {
  text-align: center;
  margin: 1rem 0;
}
#filter-controls .btn-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.4rem;
}
#filter-controls .btn-group button {
  background: var(--btn-bg);
  color: var(--primary-color);
  border: none;
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  transition: background 0.3s, transform 0.1s;
  margin-bottom: 0.75rem;
}
#filter-controls .btn-group button:hover {
  background: var(--card-bg);
  transform: translateY(-1px);
}
#filter-controls .btn-group button.active {
  background: var(--primary-color);
  color: #fff;
}

/* DataTables The wrapper is protected from lateral rolling */
.dataTables_wrapper {
  width: 100%;
  overflow-x: hidden;
}

/* Global search box */
.dataTables_filter {
  text-align: right;
  margin-bottom: 0.75rem;
}
.dataTables_filter label {
  font-size: 0.9rem;
  color: var(--text-color);
}
.dataTables_filter input {
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  width: 160px;
  margin-left: 0.5rem;
}

/* “Show X entries” control */
.dataTables_length {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}
.dataTables_length label {
  margin: 0;
  font-weight: 500;
}
.dataTables_length select {
  margin: 0 0.5rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 6px;
  font-size: 0.9rem;
}

/* Information text */
.dataTables_info {
  margin: 0.5rem 0 1rem;
  font-size: 0.85rem;
  color: var(--text-color);
  text-align: left;
}

/* Table body: Completely covered, extremely thin font and very small margins */
#leaderboard-table {
  width: 100% !important;
  font-size: 0.65rem;
  table-layout: fixed;
  border-radius: 10px;
  background: var(--card-bg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
#leaderboard-table th,
#leaderboard-table td {
  padding: 0.2rem 0.1rem;
  border: none;
  color: var(--text-color);
  text-align: center;
  white-space: normal;      /* Allow line breaks */
  word-break: break-word;    /* Break lines and break words */
  overflow: hidden;
  text-overflow: ellipsis;
}
#leaderboard-table thead {
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(8px);
}
#leaderboard-table tbody tr {
  transition: background 0.2s;
}
#leaderboard-table tbody tr:hover {
  background: rgba(255,255,255,0.5);
}

/* paging */
.dataTables_wrapper .pagination {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.5rem;
}
.dataTables_wrapper .page-item {
  margin: 0 0.2rem;
}
.dataTables_wrapper .page-link {
  background: var(--btn-bg);
  color: var(--primary-color);
  border: none;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  line-height: 1;
  transition: background 0.2s, transform 0.1s;
}
.dataTables_wrapper .page-item.active .page-link {
  background: var(--primary-color) !important;
  color: #fff !important;
}
.dataTables_wrapper .page-link:hover {
  background: var(--card-bg);
  transform: translateY(-1px);
}
.dataTables_wrapper .page-item.disabled .page-link {
  opacity: 0.4;
  pointer-events: none;
}

/* —— Performance Table  —— */
#performance-table {
  width: 100% !important;
  font-size: 0.65rem;
  table-layout: fixed;
  border-radius: 10px;
  background: var(--card-bg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Cell: Extremely fine font, very small padding, and line breaks are allowed词 */
#performance-table th,
#performance-table td {
  padding: 0.2rem 0.1rem;
  border: none;
  color: var(--text-color);
  text-align: center;
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: normal;
}

/* The dial has a semi-transparent frosted glass background */
#performance-table thead {
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(8px);
}

/* Hover effect */
#performance-table tbody tr {
  transition: background 0.2s;
}
#performance-table tbody tr:hover {
  background: rgba(255,255,255,0.5);
}

/* Restore the left and right margins of the Performance table to be consistent with.container */
#performance-table_wrapper {
  padding: 0 0.5rem;
  margin: 0 auto;
}

/* —— The button group of the Performance table —— */
#performance-filter-controls {
  text-align: center;
  margin: 1rem 0;
}
#performance-filter-controls .btn-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.4rem;
}
#performance-filter-controls .btn-group button {
  background: var(--btn-bg);
  color: var(--primary-color);
  border: none;
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  transition: background 0.3s, transform 0.1s;
  margin-bottom: 0.75rem;
}
#performance-filter-controls .btn-group button:hover {
  background: var(--card-bg);
  transform: translateY(-1px);
}
#performance-filter-controls .btn-group button.active {
  background: var(--primary-color);
  color: #fff;
}




#abstract p, #abstract li {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;   
    text-align-last: left; 
}



#abstract a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px dotted var(--primary-color);
}
#abstract a:hover {
  text-decoration: underline;
}

.abstract-points {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0 1.5rem;
}
.abstract-points li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
}
.abstract-points li::before {
  content: attr(data-index);
  position: absolute;
  left: 0;
  top: 0;
  font-style: italic;
  font-weight: bold;
  color: var(--primary-color);
}


/* —— Three-picture horizontal arrangement & fixed height —— */
#chart-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Each figure takes up 1/3 of the width and a minimum and fixed height must be specified */
.chart-item {
  flex: 1 1 calc(33.333% - 1rem);
  min-width: 240px;
  height: 350px;       
  position: relative;   /* Make the canvas absolutely fill */
}

/* Cancel the auto-aspect ratio of the canvas and fill up the parent container */
.chart-item canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
}

/* —— Chart title —— */
#chart-title {
  text-align: center;              
  margin-bottom: 0.75rem;          /* The spacing is consistent with that of other modules */
  font-size: 1.25rem;              /* Corresponding to.h4 */
  font-weight: 600;                /* overstriking */
  color: var(--primary-color);     /* dominant tone */
}

/* —— Dataset / Model button group —— */
#chart-ds-buttons,
#chart-model-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.4rem;
  margin-bottom: 0.75rem;
}

#chart-ds-buttons button,
#chart-model-buttons button {
  background: var(--btn-bg);
  color: var(--primary-color);
  border: none;
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  transition: background 0.3s, transform 0.1s;
}

#chart-ds-buttons button:hover,
#chart-model-buttons button:hover {
  background: var(--card-bg);
  transform: translateY(-1px);
}

#chart-ds-buttons button.active,
#chart-model-buttons button.active {
  background: var(--primary-color);
  color: #fff;
}

/* ==== Classify the background color ==== */
/* Leaderboard Table */
#leaderboard-table .row-emr  { background: #ffffff !important; }
#leaderboard-table .row-ar   { background: #f5f5f5 !important; }
#leaderboard-table .row-pr   { background: #cccccc !important; }

/* Performance Table */
#performance-table .row-emr  { background: #ffffff !important; }
#performance-table .row-ar   { background: #f5f5f5 !important; }
#performance-table .row-pr   { background: #cccccc !important; }

/* ==== Legend style ==== */
.table-legend {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}
.table-legend .legend-item {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
}
.table-legend .legend-box {
  width: 12px; height: 12px;
  margin-right: 0.4rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 2px;
}
.table-legend .box-emr { background: #ffffff; }
.table-legend .box-ar  { background: #f5f5f5; }
.table-legend .box-pr  { background: #cccccc; }

/* Make sure Legend and Search are on the same line*/
.dataTables_wrapper .top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}








