/* Frame 1 - 本科二年级页面样式 */
.article-box {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  background: #FFFFFF;
  padding: 30px 20px;
  min-height: auto;
}

/* 本科二年级标题 */
.main-title {
  position: relative;
  width: auto;
  height: auto;
  margin: 0 auto;
  text-align: center;
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 40px;
  line-height: 60px;
  color: #701EA0;
  margin-bottom: 15px;
}

/* 发布信息 */
.publish-info {
  position: relative;
  width: auto;
  height: auto;
  margin: 0 auto;
  text-align: center;
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 25px;
  color: #3C3C3C;
  margin-bottom: 25px;
}

/* 分割线 */
.divider-line {
  width: 87%;
  max-width: 1200px;
  height: 0px;
  margin: 0 auto;
  border: 1px solid #330066;
  margin-bottom: 40px;
}

/* 每个模块的通用样式 */
.module-section {
  position: relative;
  width: 100%;
  margin-bottom: 50px;
}

/* 模块标题 */
.module-title {
  position: relative;
  width: auto;
  height: auto;
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 32px;
  line-height: 45px;
  color: #701EA0;
  margin-bottom: 30px;
  margin-left: 80px;
  display: flex;
  align-items: center;
}

.module-title::before {
  content: '';
  width: 24px;
  height: 24px;
  background: url('../images/arrow.png') no-repeat center;
  background-size: contain;
  margin-right: 15px;
  display: inline-block;
}

/* 卡片容器 */
.cards-container {
  position: relative;
  display: flex;
  justify-content: flex-start;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  margin-left: 80px;
}

/* 单个卡片 */
.card {
  position: relative;
  width: 350px;
  height: 335px;
  background: #FFFFFF;
  box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.25);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.35);
}

.card:hover .card-icon {
  transform: scale(1.1);
}

.card:hover .card-title {
  color: #5E1A8B;
}

/* 卡片顶部渐变区域 */
.card-header {
  position: absolute;
  width: 100%;
  height: 200px;
  top: 0;
  left: 0;
  background: url('../images/card-bg.png') no-repeat center;
  background-size: cover;
  /* box-shadow: 0px 8px 12px rgba(0, 0, 0, 0.2), inset 3px 0px 5px rgba(255, 255, 255, 0.25), inset 0px 3px 8px rgba(255, 255, 255, 0.25); */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px 20px 0 0;
  transition: background-size 0.3s ease;
}

/* 卡片图标 */
.card-icon {
  width: 150px;
  height: 150px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 卡片内容区域 */
.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 180px);
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* 卡片标题 */
.card-title {
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  color: #803AA9;
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

/* 卡片描述 */
.card-description {
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 22px;
  color: #393939;
  text-align: left;
}

/* 单独卡片（科研探索模块） */
.single-card-container {
  display: flex;
  justify-content: flex-start;
  margin-left: 80px;
}

/* 响应式适配 */
@media (max-width: 1400px) {
  .cards-container {
    justify-content: flex-start;
    gap: 25px;
    margin-left: 40px;
  }
  
  .single-card-container {
    margin-left: 40px;
  }
  
  .module-title {
    margin-left: 40px;
  }
  
  .main-title {
    font-size: 42px;
    width: auto;
  }
  
  .publish-info {
    font-size: 16px;
    width: auto;
  }
  
  .divider-line {
    width: 75%;
  }
}

@media (max-width: 1200px) {
  .cards-container {
    justify-content: flex-start;
    gap: 25px;
    margin-left: 20px;
    margin-right: 20px;
  }
  
  .single-card-container {
    justify-content: center;
    margin-left: 20px;
    margin-right: 20px;
  }
  
  .card {
    width: 90%;
    max-width: 350px;
  }
  
  .module-title {
    margin-left: 20px;
    font-size: 28px;
  }
}

@media (max-width: 992px) {
  .cards-container {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-left: 15px;
    margin-right: 15px;
  }
  
  .single-card-container {
    margin-left: 15px;
    margin-right: 15px;
  }
  
  .card {
    width: 100%;
    max-width: 300px;
    height: 300px;
  }
  
  .card-header {
    height: 160px;
  }
  
  .card-content {
    height: calc(100% - 160px);
    padding: 18px;
  }
  
  .module-title {
    margin-left: 15px;
    font-size: 26px;
    text-align: center;
    justify-content: center;
  }
  
  .module-title::before {
    margin-right: 10px;
  }
}

@media (max-width: 768px) {
  .article-box {
    padding: 20px 10px;
  }
  
  .main-title {
    font-size: 32px;
    line-height: 40px;
  }
  
  .publish-info {
    font-size: 14px;
  }
  
  .cards-container {
    margin-left: 10px;
    margin-right: 10px;
  }
  
  .single-card-container {
    margin-left: 10px;
    margin-right: 10px;
  }
  
  .card {
    width: 100%;
    max-width: 300px;
    height: 280px;
  }
  
  
  .card-content {
    height: calc(100% - 140px);
    padding: 15px;
  }
  
  .card-title {
    font-size: 20px;
    line-height: 26px;
  }
  
  .card-description {
    font-size: 14px;
    line-height: 18px;
  }
  
  .module-title {
    font-size: 24px;
    margin-left: 10px;
  }
  
  .module-title::before {
    width: 20px;
    height: 20px;
    margin-right: 8px;
  }
}

@media (max-width: 480px) {
  .article-box {
    padding: 15px 5px;
  }
  
  .main-title {
    font-size: 28px;
    line-height: 36px;
  }
  
  .publish-info {
    font-size: 12px;
  }
  
  .cards-container {
    margin-left: 5px;
    margin-right: 5px;
    gap: 20px;
  }
  
  .single-card-container {
    margin-left: 5px;
    margin-right: 5px;
  }
  
  .card {
    width: 100%;
    max-width: 300px;
    height: 260px;
  }
  
  
  .card-content {
    height: calc(100% - 120px);
    padding: 12px;
  }
  
  .card-icon {
    width: 100px;
    height: 100px;
  }
  
  .card-title {
    font-size: 18px;
    line-height: 24px;
    margin-bottom: 8px;
  }
  
  .card-description {
    font-size: 12px;
    line-height: 16px;
  }
  
  .module-title {
    font-size: 20px;
    margin-left: 5px;
  }
  
  .module-title::before {
    width: 18px;
    height: 18px;
    margin-right: 6px;
  }
  
  .divider-line {
    width: 90%;
    margin-bottom: 25px;
  }
  
  .module-section {
    margin-bottom: 30px;
  }
}

/* 优化的弹窗模态框样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 1000;
  backdrop-filter: blur(0px);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-overlay.show {
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* 移除不需要的动画关键帧，使用CSS transition代替 */

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7) rotateX(10deg);
  background: #FFFFFF;
  border-radius: 24px;
  box-shadow: 
    0px 25px 60px rgba(0, 0, 0, 0.35),
    0px 10px 25px rgba(112, 30, 160, 0.25),
    inset 0px 1px 0px rgba(255, 255, 255, 0.8);
  max-width: 700px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  border: 2px solid rgba(112, 30, 160, 0.15);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
}

.modal-overlay.show .modal-content {
  transform: translate(-50%, -50%) scale(1) rotateX(0deg);
  opacity: 1;
}

/* modalSlideIn 动画已移除，使用CSS transition代替 */

.modal-header {
  background: linear-gradient(135deg, #A77DC1 0%, #701EA0 100%);
  color: white;
  padding: 18px 70px 14px 30px;
  position: relative;
  border-radius: 24px 24px 0 0;
  box-shadow: 0px 3px 15px rgba(112, 30, 160, 0.3);
  overflow: hidden;
}

.modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.modal-overlay.show .modal-header::before {
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.modal-title {
  margin: 0;
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
}

.modal-stats {
  position: relative;
  z-index: 2;
}

.click-count {
  display: inline-block;
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  flex-shrink: 0;
}

.modal-close {
  position: absolute;
  top: 50%;
  right: 25px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-family: Arial, sans-serif;
  font-weight: bold;
  backdrop-filter: blur(10px);
  z-index: 3;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.15) rotate(90deg);
  box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-close:active {
  transform: translateY(-50%) scale(0.95) rotate(90deg);
}

.modal-body {
  padding:0px !important;
  /* padding: 25px 30px 30px; */
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  max-height: 70vh;
  overflow-y: auto;
  position: relative;
  
  /* 自定义滚动条 */
  scrollbar-width: thin;
  scrollbar-color: rgba(112, 30, 160, 0.3) transparent;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(112, 30, 160, 0.3);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(112, 30, 160, 0.5);
}

/* iframe样式优化 */
#modalIframe {
  width: 100%;
  height: 60vh;
  border: none;
  background: #ffffff;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s ease-out 0.2s;
}

.modal-overlay.show #modalIframe {
  transform: translateY(0);
  opacity: 1;
}

/* 优化的加载动画样式 */
.modal-loading {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 25px;
  border: 5px solid #f0f0f0;
  border-top: 5px solid #701ea0;
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
  position: relative;
}

.loading-spinner::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border: 3px solid transparent;
  border-top: 3px solid #A77DC1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite reverse;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.modal-loading p {
  font-size: 16px;
  font-weight: 500;
  color: #701ea0;
  margin: 0;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.loading-error {
  color: #e74c3c;
  padding: 20px;
}

.loading-error p:first-child {
  font-weight: bold;
  margin-bottom: 15px;
}

.fallback-content {
  color: #555;
  font-size: 14px;
  line-height: 1.6;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #701ea0;
}

/* 优化的弹窗响应式适配 */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 90vh;
    border-radius: 20px;
    transform: translate(-50%, -50%) scale(0.6) rotateX(15deg);
  }
  
  .modal-overlay.show .modal-content {
    transform: translate(-50%, -50%) scale(1) rotateX(0deg);
  }
  
  .modal-header {
    padding: 20px 60px 20px 25px;
    border-radius: 20px 20px 0 0;
  }
  
  .modal-title-row {
    gap: 15px;
    flex-wrap: wrap;
  }
  
  .modal-title {
    font-size: 22px;
    margin-bottom: 6px;
  }
  
  .click-count {
    font-size: 13px;
    padding: 3px 10px;
  }
  
  .modal-close {
    font-size: 24px;
    width: 38px;
    height: 38px;
    right: 20px;
  }
  
  .modal-body {
    max-height: 70vh;
  }
  
  #modalIframe {
    height: 50vh;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 98%;
    max-height: 95vh;
    border-radius: 16px;
    box-shadow: 
      0px 15px 40px rgba(0, 0, 0, 0.4),
      0px 5px 15px rgba(112, 30, 160, 0.3);
  }
  
  .modal-header {
    padding: 18px 55px 18px 20px;
    border-radius: 16px 16px 0 0;
  }
  
  .modal-title-row {
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .modal-title {
    font-size: 20px;
    margin-bottom: 5px;
  }
  
  .click-count {
    font-size: 12px;
    padding: 3px 8px;
  }
  
  .modal-close {
    font-size: 22px;
    width: 36px;
    height: 36px;
    right: 15px;
  }
  
  .modal-body {
    max-height: 75vh;
  }
  
  #modalIframe {
    height: 45vh;
  }
  
  .modal-loading {
    padding: 40px 15px;
  }
  
  .loading-spinner {
    width: 35px;
    height: 35px;
  }
  
  .modal-loading p {
    font-size: 14px;
  }
}

/* 添加弹窗打开时的页面效果 */
body.modal-open {
  overflow: hidden;
}

/* 移除页面模糊效果，可能影响点击 */

/* 键盘导航优化 */
.modal-close:focus {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* 无障碍优化 */
@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal-content,
  .modal-close,
  #modalIframe,
  .loading-spinner {
    transition: none !important;
    animation: none !important;
  }
  
  .modal-overlay.show .modal-header::before {
    animation: none !important;
  }
}