/**
 * 错题专练模块样式
 */

/* ==================== 首页：错题专练按钮 ==================== */

.mistake-practice-btn {
    position: relative;
    overflow: hidden;
}

.mistake-practice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    animation: mistake-shine 3s ease-in-out infinite;
}

@keyframes mistake-shine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

/* ==================== 完成页：专练按钮 ==================== */

.practice-errors-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    margin-top: 16px;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 12px;
}

.practice-errors-btn .btn-desc {
    font-size: 13px;
    opacity: 0.8;
    font-weight: normal;
}

.practice-errors-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}

/* ==================== 暗色模式 ==================== */

body.dark-mode .practice-errors-btn:hover {
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
}

/* ==================== 响应式 ==================== */

@media (max-width: 480px) {
    .practice-errors-btn {
        padding: 10px 16px;
        font-size: 15px;
    }

    .mistake-practice-btn {
        animation: none;
    }

    .mistake-practice-btn::before {
        display: none;
    }
}

/* ==================== 无障碍：尊重减少动画偏好 ==================== */

@media (prefers-reduced-motion: reduce) {
    .mistake-practice-btn::before {
        animation: none;
        display: none;
    }

    .practice-errors-btn:hover {
        transform: none;
    }
}
