* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  max-width: 100%;
  margin: 10px auto;
  padding: 0 20px;
}

/* ====================== 轮播图区域（整合版）====================== */
.carousel {
  width: 100%;
  height: 260px;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  margin: 0 auto;
}

.carousel-inner {
  width: 100%;
  height: 100%;
}

.carousel-item {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.carousel-item.active {
  opacity: 1 !important;
  z-index: 10;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 表单样式 */
.carousel-form {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  padding: 20px 18px;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  width: 320px;
}

.form-item {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-item label {
  font-size: 15px;
  color: #333;
  white-space: nowrap;
  width: 50px;
  font-weight: 500;
}

.form-input,
.form-select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 15px;
  outline: none;
  height: 42px;
  line-height: 1.5;
  color: #999;
  transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus {
  border-color: #007bff;
  color: #333;
}

.form-input::placeholder {
  color: #ccc;
  opacity: 1;
}

.form-btn {
  width: 100%;
  padding: 10px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  height: 42px;
  line-height: 1.5;
  transition: background 0.3s ease;
}

.form-btn:hover {
  background: #0056b3;
}

.form-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ====================== 公用模块样式 ====================== */
.box1,
.box2,
.box3,
.box4 {
  padding: 0;
  margin-bottom: 20px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.box1 {
  border-left: 0px solid #f97316;
  overflow-x: auto;
}

.box2 {
  border-left: 5px solid #007bff;
  padding: 15px 20px;
}

.box3 {
  border-left: 5px solid #28a745;
  padding: 15px 20px;
}

.box4 {
  border-left: 5px solid #6c757d;
  padding: 15px 20px;
}

.module-title {
  font-size: 18px;
  color: #333;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.college-module,
.major-module,
.ksy-module {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-item {
  padding: 8px 16px;
  background: #fff;
  border-radius: 20px;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tab-item.active {
  background: #f97316;
  color: #fff;
}

.tab-item:hover:not(.active) {
  background: #eee;
}

.refresh-btn,
.refresh-major-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.refresh-btn:hover,
.refresh-major-btn:hover {
  background: #f97316;
  color: #fff;
  border-color: #f97316;
}

.refresh-btn:disabled,
.refresh-major-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.icon-refresh {
  font-size: 14px;
}

/* ====================== 院校模块 ====================== */
.college-content {
  display: flex;
  gap: 20px;
}

.main-college-card {
  width: 25%;
  height: 100%;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffedd5, #dcfce7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  opacity: 0.1;
  z-index: 1;
}

.main-card-content {
  position: relative;
  z-index: 2;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.main-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  object-fit: contain;
  border-radius: 12px;
}

.main-college-name {
  font-size: 20px;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
}

.view-college-btn {
  margin-top: 15px;
  padding: 8px 20px;
  background: #f97316;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.3s ease;
  display: inline-block;
}

.view-college-btn:hover {
  background: #ea580c;
}

.college-grid {
  width: 75%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

/* 院校卡片样式 */
.college-card {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.college-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.college-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.college-logo {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.college-name {
  flex: 1;
  font-size: 16px;
  margin: 0;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.college-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #666;
  flex-wrap: wrap;
  gap: 5px;
}

.college-province {
  font-size: 14px;
  color: #999;
}

.college-tag {
  font-size: 14px;
  color: #999;
  margin-left: 8px;
}

.view-link {
  font-size: 12px;
  color: #f97316;
  text-decoration: none;
  transition: color 0.3s ease;
}

.view-link:hover {
  color: #ea580c;
  text-decoration: underline;
}

/* ====================== 专业模块 ====================== */
.major-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

/* 专业卡片样式 */
.major-card {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.major-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.major-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.major-logo {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.major-name {
  flex: 1;
  font-size: 16px;
  margin: 0;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.major-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #666;
  flex-wrap: wrap;
  gap: 5px;
}

.major-men,
.major-class {
  font-size: 14px;
  color: #999;
  font-style: italic;
}

.major-class {
  margin-left: 8px;
}

/* ====================== 考试院模块 ====================== */
.ksy-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 考试院列表项样式 */
.ksy-item {
  border-bottom: 1px solid #eee;
  padding: 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ksy-item:hover {
  background-color: #f5f7fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ksy-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
  line-height: 1.4;
}

.ksy-date {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}

.ksy-abstract {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 分页样式 */
.ksy-pagination {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ksy-pagination button {
  padding: 8px 16px;
  margin: 0 4px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: all 0.3s ease;
}

.ksy-pagination button.active {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.ksy-pagination button:disabled {
  background: #eee;
  color: #999;
  cursor: not-allowed;
}

.ksy-pagination button:hover:not(.active):not(:disabled) {
  background: #f5f5f5;
}

/* ====================== 提示信息样式 ====================== */
.loading-tip {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
}

.error-tip {
  text-align: center;
  padding: 60px 20px;
  color: #f56c6c;
}

.error-tip div:first-child {
  font-size: 48px;
  margin-bottom: 16px;
}

.error-tip div:nth-child(2) {
  font-size: 16px;
}

.error-tip div:nth-child(3) {
  font-size: 14px;
  margin-top: 8px;
}

.empty-tip {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-tip div:first-child {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-tip div:nth-child(2) {
  font-size: 16px;
}

.empty-tip div:nth-child(3) {
  font-size: 14px;
  margin-top: 8px;
}

/* 排名输入框状态样式 */
#rankInput.success {
  border-color: #52c41a;
}

#rankInput.error {
  border-color: #ff4d4f;
}

/* 登录提示浮动层 */
#loginTip {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#loginTip.show {
  opacity: 1;
}

/* 按钮禁用样式 */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
}

/* ====================== 底部备案 ====================== */
.box5 {
  margin-bottom: 20px;
  border-radius: 10px;
  background: #007bff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #0056b3;
  padding: 15px 0;
  color: #fff;
}

.footer-module {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 50%;
  padding-left: 220px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 25px;
  width: 50%;
  justify-content: flex-end;
  padding-right: 220px;
}

.footer-left .copyright,
.footer-left .icp {
  font-size: 14px;
  margin: 0;
  line-height: 1.3;
}

.footer-right .tel {
  font-size: 14px;
  margin: 0;
  white-space: nowrap;
}

.wechat-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wechat-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border: 2px solid #fff;
  border-radius: 4px;
}

.wechat-tip {
  font-size: 14px;
  white-space: nowrap;
}

/* ====================== 响应式样式 ====================== */

/* 平板设备 (992px - 1200px) */
@media (max-width: 1200px) {
  .major-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-left {
    padding-left: 100px;
  }

  .footer-right {
    padding-right: 100px;
  }
}

/* 平板设备 (≤992px) */
@media (max-width: 992px) {
  .carousel {
    height: 240px;
  }

  .carousel-form {
    right: 20px;
    padding: 16px 14px;
    width: 280px;
  }

  .form-item {
    margin-bottom: 12px;
    gap: 10px;
  }

  .form-item label {
    font-size: 14px;
    width: 45px;
  }

  .form-input,
  .form-select,
  .form-btn {
    font-size: 14px;
    height: 38px;
    padding: 6px 10px;
  }

  .college-content {
    flex-direction: column;
  }

  .main-college-card,
  .college-grid {
    width: 100%;
  }

  .college-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .major-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-left {
    padding-left: 40px;
  }

  .footer-right {
    padding-right: 40px;
    gap: 15px;
  }

  .wechat-img {
    width: 70px;
    height: 70px;
  }
}

/* 手机设备 (≤768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }

  .carousel {
    height: 200px;
  }

  .carousel-form {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    margin-top: 10px;
    padding: 15px 12px;
  }

  .form-item {
    margin-bottom: 10px;
    gap: 8px;
  }

  .form-item label {
    font-size: 13px;
    width: 40px;
  }

  .form-input,
  .form-select,
  .form-btn {
    font-size: 13px;
    height: 36px;
    padding: 5px 8px;
  }

  .box1 {
    overflow-x: visible;
  }

  .module-title {
    font-size: 16px;
  }

  .college-module,
  .major-module,
  .ksy-module {
    padding: 15px;
  }

  .tab-item {
    padding: 6px 12px;
    font-size: 13px;
  }

  .refresh-btn,
  .refresh-major-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .college-grid,
  .major-grid {
    gap: 12px;
  }
}

/* 小手机设备 (≤576px) */
@media (max-width: 576px) {
  .college-grid,
  .major-grid {
    grid-template-columns: 1fr;
  }

  .tab-list {
    flex-wrap: wrap;
  }

  .module-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .college-name,
  .major-name {
    font-size: 14px;
  }

  .college-tag,
  .major-men,
  .major-class {
    font-size: 11px;
  }

  .ksy-title {
    font-size: 16px;
  }

  .ksy-abstract {
    font-size: 13px;
  }

  .footer-module {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 10px 15px;
  }

  .footer-left,
  .footer-right {
    width: 100%;
    padding: 0;
    justify-content: center;
  }

  .footer-left .copyright,
  .footer-left .icp,
  .footer-right .tel,
  .wechat-tip {
    font-size: 11px;
  }

  .footer-right {
    flex-direction: column;
    gap: 10px;
  }

  .wechat-wrap {
    justify-content: center;
  }

  .wechat-img {
    width: 60px;
    height: 60px;
  }

  .ksy-pagination button {
    padding: 4px 8px;
    font-size: 12px;
  }

  .college-card,
  .major-card,
  .ksy-item {
    padding: 12px;
  }

  .college-header,
  .major-header {
    gap: 8px;
  }

  .college-logo,
  .major-logo {
    width: 40px;
    height: 40px;
  }
}

/* 超小设备 (≤375px) */
@media (max-width: 375px) {
  .carousel {
    height: 180px;
  }

  .carousel-form {
    padding: 12px 10px;
  }

  .form-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .form-item label {
    width: auto;
  }

  .form-input,
  .form-select,
  .form-btn {
    width: 100%;
  }

  .tab-item {
    padding: 4px 10px;
    font-size: 12px;
  }

  .main-college-name {
    font-size: 16px;
  }

  .main-logo {
    width: 60px;
    height: 60px;
  }

  .view-college-btn {
    padding: 6px 16px;
    font-size: 12px;
  }

  .college-logo,
  .major-logo {
    width: 32px;
    height: 32px;
  }
}

/* 横屏适配 */
@media (max-height: 500px) and (orientation: landscape) {
  .carousel {
    height: 180px;
  }

  .carousel-form {
    padding: 10px 12px;
    width: 260px;
  }

  .form-item {
    margin-bottom: 8px;
  }

  .form-input,
  .form-select,
  .form-btn {
    height: 32px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .form-item label {
    font-size: 12px;
    width: 40px;
  }
}

/* 平板适配 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .college-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  .major-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  .main-card-content {
    min-height: 200px;
  }
}