.carousel-container {
  width: 800px; /* 容器宽度 */
  margin: 10px auto 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 14px rgba(0,0,0,0.15);
  min-height: 440px;
  max-height: 440px;
  display: flex;
  flex-direction: column;
  padding: 10px 0 40px;
  position: relative;
  overflow: hidden;
}

.carousel-header {
  font-weight: bold;
  font-size: 1.5em; /* 标题字体增大 */
  text-align: center;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  background: #fafafa;
  width: 100%;
  box-sizing: border-box;
}

#carousel {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.carousel-slide {
  position: absolute;
  top: 45px;
  left: 0;
  right: 0;
  bottom: 45px;
  margin: auto;
  max-width: 100%;
  max-height: 290px;
  display: none;
  padding: 5px 8px;
  box-sizing: border-box;
}

.carousel-slide.active {
  display: flex;
  flex-direction: row; /* 横向排列 */
  justify-content: space-between; /* 图片和文字块两端对齐 */
  align-items: flex-start; /* 顶部对齐 */
}

.carousel-slide a {
  display: inline-block;
  width: auto;
  max-width: 65%;            /* 控制链接的最大宽度 */
  line-height: 0;
  text-decoration: none;
}

.carousel-slide img {
  display: block;            /* 去除图片下方空隙 */
  max-width: 100%;           /* 填满父元素宽度 */
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  cursor: zoom-in;
  user-select: none;
  margin-left: 50px;         /* 图片和文字间距 */
  margin-top: -8px;          /* 使图片上移 */
  margin-bottom: 12px;       /* 图片下方增加间距 */
}

.carousel-slide img:hover {
  transform: scale(1.2);
  z-index: 10;
}

.info {
  width: 28%;                /* 增大文字区域的宽度 */
  text-align: left;          /* 文字靠左对齐 */
  margin-top: 5px;
  padding-left: 0;
}

.info h3 {
  margin: 8px 0 4px;
  font-size: 1.1em;
}

.info p {
  font-size: 0.9em;
  color: #666;
  height: 38px;
  overflow: hidden;
}

.info a {
  display: inline-block;
  margin-top: 6px;
  color: #007BFF;
  text-decoration: none;
}

.info a:hover {
  text-decoration: underline;
}

.carousel-slide .info a {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 500;
  line-height: 1; /* 关键：让上下内边距看起来一致 */
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.carousel-slide .info a:hover {
  background-color: #0056b3;
  transform: scale(1.06);
}

.carousel-slide .info a:active {
  background-color: #003d80;
}


.nav-buttons {
  width: 100%;
  text-align: right;
  position: absolute;
  bottom: 10px;
  padding-right: 15px;
  box-sizing: border-box;
}

/* Updated input-area styles */
.input-area {
  width: 800px;
  margin: 20px auto 30px; /* 这一行 */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.input-area a[href$="News.html"] {
  display: inline-block;
  text-align: center;
  width: 120px;
  padding: 8px 12px;
  font-size: 1em;
  border-radius: 6px;
  background-color: #28a745; /* 绿色按钮 */
  color: white;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.input-area a[href$="News.html"]:hover {
  background-color: #218838;
}



/* Styles for the row containing select and input */
.input-row {
  display: flex;
  gap: 8px; /* Gap between select and input */
  width: 100%; /* Take full width of parent input-area */
  justify-content: center; /* Center the select and input */
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Styles for the row containing buttons */
.button-row {
  display: flex;
  gap: 8px; /* Gap between buttons */
  width: 100%; /* Take full width of parent input-area */
  justify-content: center; /* Center the buttons */
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Common button styles */
.nav-buttons button,
.input-area button { /* Apply to all buttons within these containers */
  width: 120px;
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: 1em;
  border-radius: 6px;
  border: none;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.nav-buttons button:hover,
.input-area button:hover {
  background-color: #0056b3;
}

/* Styles for the new select dropdown */
.input-area select#rssSelect {
  width: 180px; /* Reduced width for dropdown */
  padding: 8px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23444" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 20px;
  cursor: pointer;
}

/* Styles for the new custom input field */
.input-area input#customRssInput {
  width: 250px; /* Reduced width for custom input */
  padding: 8px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}