/*
 * Header
 */

* {
  font-family: "Source Serif 4", "Georgia", "Times New Roman", serif;
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

a {
  color: #6567c9;
  text-decoration: none;
  transition: all 0.3s ease;
}

a.link:focus,
a.link:hover {
  color: #ff9349;
  text-decoration: none;
  transform: translateY(-1px);
}

.blog-header {
  border-bottom: 1px solid #e5e5e5;
}

.title-font {
  font-family: "Montserrat", "Helvetica Neue", "Arial", sans-serif;
  font-size: 3rem;
  text-decoration: none;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.title-font:hover {
  text-decoration: none;
}

.rainbow-gradient-font {
  margin-top: 0px;
  margin-bottom: 10px;
  background: linear-gradient(
    to right,
    #ef5350,
    #f48fb1,
    #7e57c2,
    #2196f3,
    #26c6da,
    #43a047,
    #eeff41,
    #f9a825,
    #ff5722
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.x-gradient-font {
  margin-top: 0px;
  margin-bottom: 10px;
  background: linear-gradient(
    107.54deg,
    #0078d4 0.3%,
    #8661c5 40.23%,
    #ff9349 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Paper Status */
.paper-status {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #28a745;
  background: linear-gradient(
    135deg,
    rgba(40, 167, 69, 0.1),
    rgba(40, 167, 69, 0.05)
  );
  border: 2px solid rgba(40, 167, 69, 0.3);
  border-radius: 15px;
  padding: 1rem;
  margin: 1rem 0;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
  font-family: "Montserrat", "Helvetica Neue", "Arial", sans-serif;
}

/*
 * Header Links
 */
#links {
  margin: 16px 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

#links div {
  margin: 4px 8px;
  width: 140px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#links a {
  width: 115px;
  height: 35px;
  padding: 8px 16px;
  color: white;
  font-size: 16px;
  font-weight: 500;
  background: linear-gradient(
    107.54deg,
    #0078d4 0.39%,
    #8661c5 51.23%,
    #ff9349 100%
  );
  border-radius: 25px;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: "Montserrat", "Helvetica Neue", "Arial", sans-serif;
}

#links a:hover {
  width: 125px;
  height: 38px;
  font-size: 17px;
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

#links a.disabled {
  background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
}

#links a.disabled:hover {
  background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
  transform: none;
}

#links a::before {
  font-family: "icomoon" !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin-right: 8px;
}

#links #paper::before {
  content: "\e000";
  font-size: 18px;
}

#links #arxiv::before {
  content: "\e001";
  font-size: 20px;
}

#links #code::before {
  content: "\e002";
  font-size: 20px;
}

#links #poster::before {
  content: "\e004";
  font-size: 20px;
}

#links #video::before {
  content: "\e003";
  font-size: 20px;
}

#links #demo::before {
  content: "\e005";
  font-size: 20px;
}

/*
 * Authors
 */
.author {
  font-size: 18px;
  font-weight: 500;
  font-family: "Montserrat", "Helvetica Neue", "Arial", sans-serif;
}

/*
 * Body
 */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

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

.card-title {
  font-weight: 800;
  font-family: "Montserrat", "Helvetica Neue", "Arial", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.card-title-margin {
  margin-bottom: 1em;
}

.body-hr {
  position: relative;
  height: 4px;
  background: transparent;
  margin-top: -0.5em;
  margin-bottom: 1.5rem;
  border: none;
  border-radius: 2px;
  overflow: hidden;
}

.body-hr::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 4px;
  border-radius: 2px;
}

.x-gradient-block {
  color: #2c3e50;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.1) 100%
  );
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.x-gradient-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.05) 0%,
    rgba(118, 75, 162, 0.05) 100%
  );
  z-index: -1;
}

/*
 * Footer
 */
.footer {
  margin-top: 5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-top: 0.05rem solid #e5e5e5;
  padding: 2rem 0;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,0 1000,0 1000,100"/></svg>');
  background-size: 100% 100%;
  z-index: 1;
}

.footer-title {
  font-family: "Montserrat", "Helvetica Neue", "Arial", sans-serif;
  color: rgba(255, 255, 255, 0.95);
  font-size: 16px;
  font-weight: 800;
  position: relative;
  z-index: 2;
}

.footer-text {
  font-family: "Montserrat", "Helvetica Neue", "Arial", sans-serif;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 2;
}

.footer a {
  color: rgba(255, 255, 255, 1);
  font-weight: bold;
  transition: all 0.3s ease;
}

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

.prompt-container-fixed-height {
  height: 5em;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  transition: all 0.3s ease;
  font-family: "Source Serif 4", "Georgia", "Times New Roman", serif;
  font-weight: 400;
  font-style: italic;
  text-align: left;
  overflow: hidden;
}

.prompt-container-fixed-height strong {
  font-family: "Montserrat", "Helvetica Neue", "Arial", sans-serif;
  font-weight: 600;
  font-style: normal;
  color: #667eea;
}

.prompt-container-fixed-height:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/*
 * 响应式图片容器和布局样式
 */
.image-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 60%;
  overflow: hidden;
  margin-bottom: 8px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.image-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.5s ease;
}

.image-container img.rounded {
  border-radius: 12px !important;
}

.image-container img.border {
  border: 1px solid rgba(102, 126, 234, 0.2) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 媒体查询优化 */
@media (max-width: 576px) {
  .image-container {
    padding-bottom: 50%;
  }

  .prompt-container-fixed-height {
    height: 4em;
    font-size: 11px;
    padding: 0.3rem;
  }

  h6.mb-2 {
    margin-bottom: 0.3rem !important;
    font-size: 0.9rem;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .image-container {
    padding-bottom: 55%;
  }

  .prompt-container-fixed-height {
    height: 4.5em;
    font-size: 12px;
    padding: 0.4rem;
  }

  h6.mb-2 {
    margin-bottom: 0.4rem !important;
    font-size: 0.95rem;
  }
}

@media (min-width: 769px) and (max-width: 992px) {
  .image-container {
    padding-bottom: 55%;
  }

  .prompt-container-fixed-height {
    height: 4.8em;
    font-size: 12px;
  }

  h6.mb-2 {
    margin-bottom: 0.5rem !important;
  }
}

@media (min-width: 993px) {
  .image-container {
    padding-bottom: 50%;
  }

  .prompt-container-fixed-height {
    height: 5em;
    font-size: 13px;
  }

  h6.mb-2 {
    margin-bottom: 0.5rem !important;
  }
}

/* 布局样式优化 */
.row.gy-2 {
  --bs-gutter-y: 1rem;
}

.row.gx-2 {
  --bs-gutter-x: 1rem;
}

.card-body {
  padding: 2rem;
}

.card-title-margin {
  margin-bottom: 1rem;
}

.body-hr {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.card-text {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: #555;
  font-family: "Source Serif 4", "Georgia", "Times New Roman", serif;
  font-weight: 400;
}

.card + br {
  display: block;
  content: "";
  margin-top: 1rem;
}

/* 轮播控件样式 */
.custom-carousel-controls {
  /* margin-top: 1rem !important; */
  display: flex;
  gap: 10px;
  justify-content: center;
}

.custom-carousel-controls .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 20px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
  font-family: "Montserrat", "Helvetica Neue", "Arial", sans-serif;
}

.custom-carousel-controls .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-item {
  padding: 1rem 0;
  transition: opacity 0.5s ease-in-out;
}

/* 标题样式 */
h6.mb-2 {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem !important;
  text-align: center;
  position: relative;
  padding-bottom: 0.5rem;
  font-family: "Montserrat", "Helvetica Neue", "Arial", sans-serif;
  min-height: 3.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
}

h6.mb-2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 1px;
}

/* 为轮播项中的标题单独设置样式 */
.carousel-item .row.align-items-start .col-6 > h6,
.carousel-item .row.align-items-start .col-md-6 > h6,
.carousel-item .row.align-items-start .col-lg-3 > h6 {
  min-height: 3.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* 确保列对齐 */
.row.align-items-start .col-6,
.row.align-items-start .col-md-6,
.row.align-items-start .col-lg-3 {
  display: flex;
  flex-direction: column;
}

.row.align-items-start .col-6 > *,
.row.align-items-start .col-md-6 > *,
.row.align-items-start .col-lg-3 > * {
  flex-shrink: 0;
}

.row.align-items-start .image-container {
  margin-top: auto;
}

/* 共享prompt样式 */
.shared-prompt-container {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.05) 0%,
    rgba(118, 75, 162, 0.05) 100%
  );
  border: 2px solid rgba(102, 126, 234, 0.3);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
  font-size: 1.1em;
  padding: 1rem;
  border-radius: 15px;
  margin-bottom: 1rem !important;
  height: auto !important;
  min-height: 3em;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  font-family: "Source Serif 4", "Georgia", "Times New Roman", serif;
  font-weight: 400;
  font-style: italic;
  text-align: left;
  width: 100%;
  line-height: 1.6;
}

/* 轮播项中的prompt容器固定高度 */
.carousel-item .shared-prompt-container {
  height: 5em;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  padding: 0.8rem 1rem;
}

/* 轮播项整体最小高度 */
.carousel-item {
  min-height: 380px;
  position: relative;
}

.carousel-item.active {
  display: flex;
  flex-direction: column;
}

.carousel-item > .row {
  flex-grow: 1;
}

/* 响应式调整轮播项高度 */
@media (max-width: 768px) {
  .carousel-item {
    min-height: 330px;
  }

  .carousel-item .shared-prompt-container {
    height: 4em;
    font-size: 0.95em;
  }
}

@media (max-width: 576px) {
  .carousel-item {
    min-height: 300px;
  }

  .carousel-item .shared-prompt-container {
    height: 3.5em;
    font-size: 0.9em;
    padding: 0.5rem;
  }
}

/* 确保轮播正常工作 */
.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-item {
  position: relative;
  display: none;
  float: left;
  width: 100%;
  margin-right: -100%;
  backface-visibility: hidden;
  transition: transform 0.6s ease-in-out;
}

.carousel-item.active {
  display: flex;
  flex-direction: column;
}

.shared-prompt-container strong {
  color: #5a67d8;
  font-size: 1.1em;
  font-family: "Montserrat", "Helvetica Neue", "Arial", sans-serif;
  font-weight: 600;
  font-style: normal;
}

/* 轮播项中的列对齐优化 */
.carousel-item .row.align-items-start .col-6,
.carousel-item .row.align-items-start .col-md-6,
.carousel-item .row.align-items-start .col-lg-3 {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carousel-item .row.align-items-start .image-container {
  width: 100%;
  margin-top: 0;
}

/* 非轮播项的列对齐优化 */
.row.align-items-start:not(.carousel-item .row) .col-6,
.row.align-items-start:not(.carousel-item .row) .col-md-6,
.row.align-items-start:not(.carousel-item .row) .col-lg-3 {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.row.align-items-start:not(.carousel-item .row) .image-container {
  width: 100%;
  margin-top: auto;
}
