/* =============================================================================
   全局主题与布局（原 base.html 内联样式）
   ============================================================================= */

body {
  background-color: #ffffff;
  color: #48466d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.content-wrapper.content-width {
  max-width: 1600px;
  margin: 0 auto;
}

.navbar {
  background-color: #48466d !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  margin-bottom: 0;
}

.navbar-brand {
  color: #ffffff !important;
  font-weight: 500;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem !important;
  margin: 0 0.2rem;
  border-radius: 4px;
  position: relative;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
}

.nav-link.active {
  background-color: rgba(61, 132, 168, 0.5);
  color: #ffffff !important;
  font-weight: 500;
}

.card {
  border: none;
  box-shadow: 0 2px 4px rgba(72, 70, 109, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(61, 132, 168, 0.15);
}

.card-body {
  padding: 20px;
}

.form-select {
  border: 2px solid rgba(70, 205, 207, 0.3);
  border-radius: 6px;
  padding: 0.5rem;
  transition: all 0.3s ease;
  color: #48466d;
}

.form-select:focus {
  border-color: #46cdcf;
  box-shadow: none;
}

.form-control:focus {
  border-color: #46cdcf;
  box-shadow: 0 0 0 0.2rem rgba(70, 205, 207, 0.25);
}

.btn {
  border-radius: 6px;
  padding: 0.5rem 1.5rem;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background-color: #3d84a8;
}

.btn-primary:hover {
  background-color: #48466d;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.footer {
  background-color: #ffffff !important;
  border-top: 1px solid rgba(171, 237, 216, 0.5);
  color: #3d84a8;
}

h1, h2, h3, h4, h5, h6 {
  color: #3d84a8;
  font-weight: 500;
}

.alert {
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(70, 205, 207, 0.1);
  margin-bottom: 0;
}

.spinner-border {
  color: #46cdcf !important;
}

.text-muted {
  color: rgba(72, 70, 109, 0.6) !important;
}

.bg-primary-custom { background-color: #48466d; }
.bg-secondary-custom { background-color: #3d84a8; }
.bg-accent-custom { background-color: #46cdcf; }
.bg-light-custom { background-color: #abedd8; }
.bg-pale-custom { background-color: rgba(171, 237, 216, 0.2); }

.text-primary-custom { color: #48466d; }
.text-secondary-custom { color: #3d84a8; }
.text-accent-custom { color: #46cdcf; }

.dropdown-item:hover {
  background-color: rgba(171, 237, 216, 0.2);
}

a {
  color: #46cdcf;
  transition: color 0.3s ease;
}

a:hover {
  color: #3d84a8;
  text-decoration: none;
}

.content-wrapper {
  padding: 0 20px;
}

@media (min-width: 1200px) {
  .content-wrapper {
    padding: 0 40px;
  }
}

@media (min-width: 1600px) {
  .content-wrapper {
    padding: 0;
  }
}

.dataset-row {
  transition: all 0.3s ease;
}

.dataset-row.highlighted {
  background-color: rgba(70, 205, 207, 0.12) !important;
  border-left: 3px solid #46cdcf;
}

.highlight-entrance {
  animation: entrance-flash 2.5s ease-out 1;
}

@keyframes entrance-flash {
  0%, 100% { background-color: rgba(70, 205, 207, 0.12); }
  30%, 70% { background-color: rgba(70, 205, 207, 0.35); }
}

.btn-accent-custom {
  background-color: #46cdcf;
  color: white;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(70, 205, 207, 0.3);
  border: none;
}

.btn-accent-custom:hover {
  background-color: #3bb7b9;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(70, 205, 207, 0.4);
}

.btn-secondary-custom {
  background-color: #3d84a8;
  color: white;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(61, 132, 168, 0.3);
  border: none;
}

.btn-secondary-custom:hover {
  background-color: #346f8e;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(61, 132, 168, 0.4);
}

.pagination-custom .page-link {
  color: #46cdcf;
  border-color: #e9ecef;
}

.pagination-custom .page-item.active .page-link {
  background-color: #46cdcf;
  border-color: #46cdcf;
  color: white;
}

.flash-once {
  animation: flash-animation 1s 1;
}

@keyframes flash-animation {
  0%, 100% { background-color: rgba(70, 205, 207, 0.15); }
  50% { background-color: rgba(70, 205, 207, 0.4); }
}

/* =============================================================================
   通用组件（旧 style.css 中有用的部分）
   ============================================================================= */

.container.narrow {
  max-width: 1200px;
}

#cirrocumulus-container {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  background: white;
}

.progress {
  height: 20px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
}

.upload-status {
  min-height: 50px;
}

/* =============================================================================
   页面：可视化 / Cirrocumulus iframe
   ============================================================================= */

.viz-card-body {
  min-height: 800px;
}

.iframe-container {
  width: 100%;
  height: 800px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  display: block;
}

#cirroFrame {
  width: 100%;
  height: 800px;
  border: none;
  overflow: auto;
}

.selection-guide-mask {
  background-color: rgb(248, 249, 250);
  z-index: 1050;
  top: 0;
  left: 0;
  display: flex;
}

#selectionGuideMask.d-none {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#selectionGuideMask {
  transition: opacity 0.3s ease-out;
}

.mask-hidden {
  opacity: 0;
  pointer-events: none;
}

.viz-loader {
  z-index: 10;
}

.viz-icon-xl {
  font-size: 3rem;
  color: #0d6efd;
}

/* =============================================================================
   页面：首页
   ============================================================================= */

.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.home-icon-circle {
  width: 60px;
  height: 60px;
}

/* 首页论文区：大屏略收卡片左右内边距，避免中间过空 */
@media (min-width: 1400px) {
  .home-paper-section .home-paper-card-body {
    padding-left: 2.5rem !important;
    padding-right: 2.5rem !important;
  }
}

/* 首页论文主标题：占满标题列 */
.home-paper-title {
  font-size: clamp(1.4rem, 3.1vw, 2.35rem);
  line-height: 1.28;
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.home-title-br {
  line-height: 0;
}

/* Abstract：与主标题层级区分更明显 */
.home-abstract-heading {
  font-size: 1.65rem;
  line-height: 1.35;
  letter-spacing: 0.03em;
  padding-bottom: 0.65rem;
  margin-bottom: 1.35rem !important;
  margin-top: 0;
  border-bottom: 1px solid rgba(72, 70, 109, 0.14);
}

/* 首页论文摘要：英文网页摘要通常段首不缩进，仅用段间距分段 */
.article-abstract-body {
  font-size: 1.125rem;
  line-height: 1.75;
  color: #48466d;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.article-abstract-body p {
  margin-bottom: 1.125rem;
  text-indent: 0;
}

.article-abstract-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  .article-abstract-body {
    text-align: left;
    hyphens: manual;
  }
}

/* =============================================================================
   页面：Studies（原 Documentation 路由）
   ============================================================================= */

.studies-page-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
}

.studies-page-lead {
  font-size: 0.95rem;
}

.studies-placeholder {
  font-size: 1rem;
  line-height: 1.7;
}

.studies-accordion .accordion-button.studies-accordion-btn {
  font-size: 1.05rem;
  font-weight: 600;
  color: #3d84a8;
  background-color: #fff;
  padding: 1rem 1.25rem;
  box-shadow: none;
}

.studies-accordion .accordion-button.studies-accordion-btn:not(.collapsed) {
  color: #48466d;
  background-color: rgba(61, 132, 168, 0.08);
}

.studies-accordion .accordion-button.studies-accordion-btn::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233d84a8'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.studies-accordion .accordion-button.studies-accordion-btn:focus {
  border-color: rgba(70, 205, 207, 0.35);
  box-shadow: 0 0 0 0.2rem rgba(70, 205, 207, 0.2);
}

.studies-accordion-body {
  padding: 1.25rem 1.5rem 1.5rem;
  background-color: #fafbfc;
  border-top: 1px solid rgba(72, 70, 109, 0.08);
}

.team-intro-page .team-intro-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
}

.team-intro-placeholder {
  font-size: 1.05rem;
  line-height: 1.75;
}

/* =============================================================================
   页面：About（旧版 about-container 等仍保留，供将来扩展）
   ============================================================================= */

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

.team-image-wrapper {
  text-align: center;
  margin-bottom: 25px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.team-image {
  width: 100%;
  height: auto;
  display: block;
}

.about-section {
  padding: 15px 0;
  margin-bottom: 25px;
}

.about-title {
  color: #3d84a8;
  font-size: 2.5rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.about-text {
  color: #48466d;
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.info-row {
  margin-bottom: 15px;
}

.info-section {
  padding: 20px;
  border-radius: 8px;
  height: 100%;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.publication-section {
  background-color: rgba(171, 237, 216, 0.1);
}

.about-container .section-title {
  color: #3d84a8;
  font-size: 1.8rem;
  margin-bottom: 15px;
  font-weight: 500;
}

.publication-item h4 {
  margin-bottom: 8px;
  color: #48466d;
  font-size: 1.2rem;
}

.publication-journal {
  font-style: italic;
  color: #666;
  margin-bottom: 0;
}

.contact-section {
  background-color: rgba(61, 132, 168, 0.05);
}

.contact-info {
  color: #48466d;
  font-size: 1.1rem;
  line-height: 1.6;
}

.contact-info p {
  margin-bottom: 8px;
}

.contact-info p:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .about-container .info-row .col-md-6:first-child {
    margin-bottom: 20px;
  }
}

/* =============================================================================
   页面：Documentation
   ============================================================================= */

.doc-tabs .nav-link {
  font-size: 1.1rem !important;
  font-weight: 500 !important;
  color: #333 !important;
  padding: 0.5rem 1rem !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.doc-tabs .nav-link.active {
  color: #3d84a8 !important;
  background-color: #fff !important;
  border-color: #dee2e6 #dee2e6 #fff !important;
  font-weight: 600 !important;
}

.doc-tabs .nav-link:hover {
  color: #346f8e !important;
  border-color: #e9ecef #e9ecef #dee2e6 !important;
}

.doc-tabs .nav-item {
  position: relative;
  z-index: 1;
}

.documentation-content {
  color: #333;
  line-height: 1.6;
}

.doc-heading {
  color: #2c3e50;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-weight: 600;
}

.doc-subheading {
  color: #3d84a8;
  font-size: 1.3rem;
  margin-top: 20px;
  font-weight: 600;
}

.feature-list,
.content-list {
  padding-left: 20px;
  list-style-type: none;
}

.feature-list li,
.content-list li {
  margin: 10px 0;
  position: relative;
  padding-left: 25px;
}

.feature-list li:before {
  content: "✔";
  color: #2ecc71;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.content-list li:before {
  content: "•";
  color: #3d84a8;
  position: absolute;
  left: 10px;
  font-weight: bold;
}

.content-list li ul {
  padding-left: 15px;
  list-style-type: none;
  margin-top: 8px;
}

.content-list li ul li {
  margin: 5px 0;
  padding-left: 20px;
  position: relative;
}

.content-list li ul li:before {
  content: "-";
  color: #7f8c8d;
  position: absolute;
  left: 0;
}

.documentation-content .highlight {
  color: #e74c3c;
  font-weight: 600;
}

.documentation-content .lead {
  font-size: 1.1rem;
  color: #555;
}

.citation-box {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  border-left: 4px solid #3d84a8;
  margin-top: 10px;
}

.citation-link {
  color: #3d84a8;
  text-decoration: none;
  font-weight: 500;
}

.citation-link:hover {
  text-decoration: underline;
}

.btn-example {
  background-color: #f1f1f1;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
  color: #333;
  display: inline-block;
}

.subsection {
  margin-left: 15px;
}

.doc-figure-wide {
  max-width: 1600px;
}

/* =============================================================================
   页面：Download
   ============================================================================= */

.download-page .dataset-row-fixed {
  height: 60px;
}

.download-page .type-cell {
  color: rgb(8, 127, 167);
}

.download-page .pagination-custom .page-link {
  color: #087fa7;
  border-color: #dee2e6;
}

.download-page .pagination-custom .page-item.active .page-link {
  background-color: #087fa7;
  border-color: #087fa7;
  color: white;
}

.download-page .pagination-custom .page-item.disabled .page-link {
  color: #6c757d;
}

.download-row-entrance {
  animation: download-highlight-fade 2s ease-out;
}

@keyframes download-highlight-fade {
  0% { background-color: rgba(8, 127, 167, 0.2); }
  100% { background-color: transparent; }
}
