* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  max-width: 100%;
  margin: 10px auto;
  padding: 0 20px;
}

/* ====================== 轮播图区域 ====================== */
.carousel {
  width: 100%;
  height: 360px;
  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: fill;
  display: block;
  background: none;
}

/* 表单样式 */
.carousel-form {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  padding: 30px 25px;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  width: 350px;
}

.form-item {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-item label {
  font-size: 18px;
  color: #333;
  white-space: nowrap;
  width: 55px;
  font-weight: 500;
}

.form-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  outline: none;
  height: 48px;
  line-height: 1.5;
  color: #999;
}

.form-input:focus {
  border-color: #007bff;
  color: #333;
}

.form-input::placeholder {
  color: #ccc;
  opacity: 1;
}

.form-btn {
  width: 100%;
  padding: 12px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  height: 48px;
  line-height: 1.5;
}

.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;
  flex-shrink: 0;
}

.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 {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  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: 10px;
  margin-bottom: 8px;
  width: 100%;
}

.college-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 8px;
}

.college-name {
  font-size: 16px;
  color: #333;
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.college-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.college-province, .college-tag {
  font-size: 14px;
  color: #999;
  margin: 0;
}

.view-link {
  font-size: 12px;
  color: #f97316;
  text-decoration: none;
  margin: 0;
}

.view-link:hover {
  color: #ea580c;
  text-decoration: underline;
}

/* ====================== 专业模块 ====================== */
.major-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.major-card {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  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: 10px;
  margin-bottom: 8px;
  width: 100%;
}

.major-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 8px;
}

.major-name {
  font-size: 16px;
  color: #333;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.major-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.major-men, .major-class {
  font-size: 14px;
  color: #999;
  font-style: italic;
  margin: 0;
}

/* ====================== 考试院模块 ====================== */
.ksy-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ksy-item {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ksy-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.ksy-title {
  font-size: 18px;
  color: #333;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.4;
  word-break: break-word;
}

.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: 6px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  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 {
  width: 100%;
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
  grid-column: 1 / -1;
}

/* 排名输入框状态样式 */
#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;
}

/* ====================== 响应式样式（参考 firstpage.css）====================== */
@media (max-width: 1200px) {
  .major-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .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);
  }
  .carousel {
    height: 300px;
  }
  .carousel-form {
    right: 30px;
    padding: 20px;
    width: 300px;
  }
  .form-item label {
    font-size: 16px;
    width: 50px;
  }
  .form-input, .form-btn {
    font-size: 16px;
    height: 44px;
  }
  .footer-left {
    padding-left: 40px;
  }
  .footer-right {
    padding-right: 40px;
  }
}

@media (max-width: 768px) {
  .carousel {
    height: 250px;
  }
  .carousel-form {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    margin-top: 10px;
    padding: 15px;
  }
  .form-item {
    margin-bottom: 12px;
  }
  .form-item label {
    font-size: 14px;
    width: 45px;
  }
  .form-input, .form-btn {
    font-size: 14px;
    height: 40px;
    padding: 8px 10px;
  }
  .module-title {
    font-size: 16px;
  }
  .college-module, .major-module, .ksy-module {
    padding: 15px;
  }
  .tab-item {
    padding: 6px 12px;
    font-size: 13px;
  }
  .main-logo {
    width: 60px;
    height: 60px;
  }
  .main-college-name {
    font-size: 18px;
  }
  .footer-left {
    padding-left: 20px;
  }
  .footer-right {
    padding-right: 20px;
    gap: 15px;
  }
  .wechat-img {
    width: 70px;
    height: 70px;
  }
}

@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-img {
    width: 55px;
    height: 55px;
  }
  .ksy-pagination button {
    padding: 4px 8px;
    font-size: 12px;
  }
  .college-card, .major-card, .ksy-item {
    padding: 12px;
  }
  .college-logo, .major-logo {
    width: 32px;
    height: 32px;
  }
}