/* 家长检测系统 - 自定义样式 */

/* 主题色变量 */
:root {
    --cn-red: #DC2626;
    --cn-red-light: #FEE2E2;
    --math-blue: #2563EB;
    --math-blue-light: #DBEAFE;
    --en-teal: #0891B2;
    --en-teal-light: #CFFAFE;
    --phys-orange: #EA580C;
    --phys-orange-light: #FFF7ED;
    --chem-purple: #7C3AED;
    --chem-purple-light: #EDE9FE;
    --bio-green: #059669;
    --bio-green-light: #D1FAE5;
}

/* 基础 */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 卡片 hover 效果 */
.subject-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.subject-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0,0,0,0.1);
}

/* 答案展开动画 */
.answer-reveal {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.answer-reveal.show {
    max-height: 500px;
}

/* 进度条动画 */
.progress-bar {
    transition: width 0.6s ease;
}

/* 收藏星标动画 */
.bookmark-btn {
    transition: transform 0.15s ease, color 0.15s ease;
    user-select: none;
}
.bookmark-btn:hover {
    transform: scale(1.2);
}
.bookmark-btn.active {
    color: #F59E0B;
}

/* 隐藏滚动条 */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* 导航栏 */
nav {
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.95);
}

/* 按钮通用 */
button, .btn-link {
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 状态标签颜色 */
.status-mastered { background: #D1FAE5; color: #065F46; }
.status-review { background: #FEF3C7; color: #92400E; }
.status-failed { background: #FEE2E2; color: #991B1B; }
.status-new { background: #F3F4F6; color: #6B7280; }

/* 题目卡片进入动画 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.quiz-card-enter {
    animation: fadeInUp 0.3s ease;
}

/* Toast 通知 */
.toast {
    animation: slideInRight 0.3s ease;
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 移动端适配 */
@media (max-width: 640px) {
    .mobile-stack {
        flex-direction: column;
    }

    /* 移动端导航栏简化 */
    nav .flex {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    nav a {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    /* 移动端题目卡片加大触控区域 */
    .quiz-card button {
        min-height: 44px;
    }

    /* 移动端评估按钮 */
    .quiz-card .flex.gap-3 > button {
        min-height: 48px;
        font-size: 0.875rem;
    }

    /* 移动端统计卡片 */
    .grid-cols-3 {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    /* 超小屏幕字体缩小 */
    .text-2xl { font-size: 1.25rem; }
    .text-xl { font-size: 1.125rem; }
}

/* 打印样式（隐藏导航） */
@media print {
    nav, footer { display: none; }
}
