/* 单元测试页面自定义样式 */

/* 文本截断工具类 */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 考试卡片动画效果 */
.exam-card {
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.exam-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(59, 130, 246, 0.2);
}

/* 标签样式优化 */
.exam-tag {
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.exam-tag:hover {
  transform: scale(1.05);
}

/* 按钮动画 */
.exam-button {
  position: relative;
  overflow: hidden;
}

.exam-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.exam-button:active::before {
  width: 300px;
  height: 300px;
}

/* 响应式调整 */
@media (max-width: 640px) {
  .exam-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .exam-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .exam-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1025px) {
  .exam-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 状态徽章动画 */
.status-badge {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 渐变边框效果 */
.gradient-border {
  position: relative;
  background: white;
}

.gradient-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* 深色模式适配 */
.dark .gradient-border {
  background: #1f2937;
}

/* 卡片内容垂直对齐 */
.card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-footer {
  margin-top: auto;
}