/* ========================================
   大学英语复习系统 - 全局样式 (亮色主题)
   设计风格: Modern Study Lounge Light
   ======================================== */

/* 全局重置与基础 */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ========================================
   导航栏样式
   ======================================== */

/* 桌面端导航链接 */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.nav-link:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.06);
}
.nav-link.active,
.nav-link-active {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    font-weight: 600;
}

/* 移动端导航项 */
.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.mobile-nav-item:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.06);
}

/* 汉堡按钮样式 */
.hamburger-btn {
    position: relative;
}
.hamburger-line,
.hamburger-line::before,
.hamburger-line::after {
    display: block;
    width: 18px;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hamburger-line {
    position: relative;
}
.hamburger-line::before,
.hamburger-line::after {
    content: '';
    position: absolute;
    left: 0;
}
.hamburger-line::before { top: -5px; }
.hamburger-line::after { top: 5px; }

/* 汉堡按钮激活状态（X 形状） */
.hamburger-btn.active .hamburger-line {
    background-color: transparent;
}
.hamburger-btn.active .hamburger-line::before {
    top: 0;
    transform: rotate(45deg);
}
.hamburger-btn.active .hamburger-line::after {
    top: 0;
    transform: rotate(-45deg);
}

/* 移动端导航面板 */
.mobile-nav {
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   卡片系统
   ======================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px -8px rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.12);
}

.card-hover { transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
.card-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(22, 163, 74, 0.25);
    box-shadow:
        0 24px 48px -12px rgba(0, 0, 0, 0.08),
        0 0 60px -15px rgba(22, 163, 74, 0.08);
}

/* ========================================
   按钮系统
   ======================================== */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px -4px rgba(37, 99, 235, 0.45);
}
.btn-primary:active { transform: scale(0.97) translateY(0); }

.btn-ghost {
    background: #f1f5f9;
    color: #475569;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-ghost:hover {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

/* ========================================
   标签/徽章
   ======================================== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.tag-green { background: #ecfdf5; color: #059669; }
.tag-blue { background: #eff6ff; color: #2563eb; }
.tag-purple { background: #f5f3ff; color: #7c3aed; }
.tag-orange { background: #fff7ed; color: #ea580c; }
.tag-pink { background: #fdf2f8; color: #db2777; }

/* ========================================
   题目相关样式
   ======================================== */
.option-hover {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.option-hover:hover {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.option-hover:active { transform: scale(0.98); }

.btn-hover {
    transition: all 0.2s ease;
    cursor: pointer;
}
.btn-hover:hover { opacity: 0.9; }
.btn-hover:active { transform: scale(0.97); }

/* 网格按钮 */
.grid-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    background: #ffffff;
}
.grid-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}
.grid-btn-active {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.35);
}
.grid-btn-wrong { border-color: #dc2626 !important; color: #dc2626 !important; background: #fef2f2 !important; }
.grid-btn-correct { border-color: #16a34a !important; color: #16a34a !important; background: #f0fdf4 !important; }

/* 答题反馈颜色 */
.border-correct { border-color: #16a34a !important; }
.bg-correct\/10 { background: rgba(22, 163, 74, 0.08) !important; }
.text-correct { color: #16a34a !important; }
.border-incorrect { border-color: #dc2626 !important; }
.bg-incorrect\/10 { background: rgba(220, 38, 38, 0.08) !important; }
.text-incorrect { color: #dc2626 !important; }

.answer-correct { border-color: #16a34a !important; background: rgba(22, 163, 74, 0.04) !important; }
.answer-wrong { border-color: #dc2626 !important; background: rgba(220, 38, 38, 0.04) !important; }
.status-correct { color: #16a34a; font-weight: 600; }
.status-wrong { color: #dc2626; font-weight: 600; }

.rotate-180 { transform: rotate(180deg); }

/* 解析技巧提示 */
.skill-tip {
    display: block;
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.04));
    color: #b45309;
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ========================================
   动画
   ======================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* 页面入场动画延迟 */
.stagger-1 { animation-delay: 0.05s; opacity: 0; animation-fill-mode: forwards; }
.stagger-2 { animation-delay: 0.1s; opacity: 0; animation-fill-mode: forwards; }
.stagger-3 { animation-delay: 0.15s; opacity: 0; animation-fill-mode: forwards; }
.stagger-4 { animation-delay: 0.2s; opacity: 0; animation-fill-mode: forwards; }
.stagger-5 { animation-delay: 0.25s; opacity: 0; animation-fill-mode: forwards; }
.stagger-6 { animation-delay: 0.3s; opacity: 0; animation-fill-mode: forwards; }

/* ========================================
   响应式调整
   ======================================== */

/* 选题网格在小屏幕上的响应式调整 */
@media (max-width: 480px) {
    .grid-cols-6 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

@media (min-width: 481px) and (max-width: 640px) {
    .grid-cols-6 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

/* 底部固定导航栏在移动端的 padding 调整 */
@media (max-width: 768px) {
    .pb-20 {
        padding-bottom: 5rem !important;
    }
}
