/* 自定义样式增强 */

/* 自定义颜色变量 */
:root {
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --accent-400: #34d399;
    --accent-500: #10b981;
    --accent-600: #059669;
}

/* 自定义颜色类 */
.bg-primary-400 {
    background-color: var(--primary-400);
}

.bg-primary-500 {
    background-color: var(--primary-500);
}

.bg-primary-600 {
    background-color: var(--primary-600);
}

.bg-accent-400 {
    background-color: var(--accent-400);
}

.bg-accent-500 {
    background-color: var(--accent-500);
}

.bg-accent-600 {
    background-color: var(--accent-600);
}

.text-primary-400 {
    color: var(--primary-400);
}

.text-primary-500 {
    color: var(--primary-500);
}

.text-primary-600 {
    color: var(--primary-600);
}

.text-accent-400 {
    color: var(--accent-400);
}

.text-accent-500 {
    color: var(--accent-500);
}

.text-accent-600 {
    color: var(--accent-600);
}

.border-primary-400 {
    border-color: var(--primary-400);
}

.border-primary-500 {
    border-color: var(--primary-500);
}

.border-primary-600 {
    border-color: var(--primary-600);
}

.border-accent-400 {
    border-color: var(--accent-400);
}

.border-accent-500 {
    border-color: var(--accent-500);
}

.border-accent-600 {
    border-color: var(--accent-600);
}

/* 全局样式 */
* {
    box-sizing: border-box;
}

/* 修复小图标错位问题 */
.fas, .fa, .far, .fab, .svg, svg, i {
    transform: none !important;
    transition: none !important;
}

/* 修复输入框内图标错位 */
input + .fas,
input + .fa,
input + .far,
input + .fab,
input + svg,
input + i,
.relative .fas,
.relative .fa,
.relative .far,
.relative .fab,
.relative svg,
.relative i {
    transform: none !important;
    transition: none !important;
}

/* 修复搜索图标错位 */
.fa-search,
.fas.fa-search {
    transform: none !important;
    transition: none !important;
}

/* 修复用户图标错位 */
.fa-user,
.fas.fa-user {
    transform: none !important;
    transition: none !important;
}

/* 修复所有Font Awesome图标错位 */
[class*="fa-"] {
    transform: none !important;
    transition: none !important;
}

/* 修复输入框内的图标定位 */
.relative .absolute {
    transform: none !important;
}

/* 修复搜索框图标 */
.fa-search,
.fas.fa-search,
input ~ .fa-search,
input ~ .fas.fa-search {
    transform: none !important;
    transition: none !important;
}

/* 修复用户图标 */
.fa-user,
.fas.fa-user,
.fa-user-tie,
.fas.fa-user-tie {
    transform: none !important;
    transition: none !important;
}

/* 修复密码显示/隐藏图标 */
.fa-eye,
.fas.fa-eye,
.fa-eye-slash,
.fas.fa-eye-slash {
    transform: none !important;
    transition: none !important;
}

/* 修复所有SVG图标 */
svg {
    transform: none !important;
    transition: none !important;
}

/* 修复按钮内的图标 */
button .fas,
button .fa,
button .far,
button .fab,
button svg,
button i {
    transform: none !important;
    transition: none !important;
}

/* 修复链接内的图标 */
a .fas,
a .fa,
a .far,
a .fab,
a svg,
a i {
    transform: none !important;
    transition: none !important;
}

/* 修复所有可能导致图标错位的动画 */
.absolute .fas,
.absolute .fa,
.absolute .far,
.absolute .fab,
.absolute svg,
.absolute i,
.relative .fas,
.relative .fa,
.relative .far,
.relative .fab,
.relative svg,
.relative i {
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* 修复输入框内的绝对定位图标 */
input ~ .absolute .fas,
input ~ .absolute .fa,
input ~ .absolute .far,
input ~ .absolute .fab,
input ~ .absolute svg,
input ~ .absolute i {
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* 修复搜索框内的图标 */
.search-input ~ .fas,
.search-input ~ .fa,
.search-input ~ .far,
.search-input ~ .fab,
.search-input ~ svg,
.search-input ~ i {
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* 修复所有图标的基础定位 */
.fas, .fa, .far, .fab, svg, i {
    position: static !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* 修复绝对定位的图标 */
.absolute .fas,
.absolute .fa,
.absolute .far,
.absolute .fab,
.absolute svg,
.absolute i {
    position: absolute !important;
    transition: none !important;
    animation: none !important;
}

/* 允许必要的transform用于垂直居中 */
.absolute.top-1\/2.transform.-translate-y-1\/2 {
    transform: translateY(-50%) !important;
}

/* 修复搜索图标的特殊定位 */
.fas.fa-search.absolute.left-3.top-1\/2.transform.-translate-y-1\/2 {
    transform: translateY(-50%) !important;
    position: absolute !important;
    left: 0.75rem !important;
    top: 50% !important;
}

/* 修复所有搜索图标的定位 */
.fa-search.absolute,
.fas.fa-search.absolute {
    transform: translateY(-50%) !important;
    position: absolute !important;
    top: 50% !important;
}

/* 修复输入框内的搜索图标 */
.relative .fa-search.absolute,
.relative .fas.fa-search.absolute {
    transform: translateY(-50%) !important;
    position: absolute !important;
    top: 50% !important;
    left: 0.75rem !important;
}

/* 确保搜索图标不受其他动画影响 */
.fa-search,
.fas.fa-search {
    animation: none !important;
    transition: none !important;
}

/* 修复登录页面输入框图标错位 */
.input-enhanced + .absolute svg,
.relative .absolute svg {
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* 修复登录页面密码显示/隐藏图标 */
#toggle-password svg,
#eye-icon {
    transform: none !important;
    transition: none !important;
    animation: none !important;
    position: static !important;
}

/* 专门修复眼睛图标按钮 */
#toggle-password {
    transform: none !important;
    transition: none !important;
    animation: none !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 确保眼睛图标在按钮内正确定位 */
#toggle-password svg {
    transform: none !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 强制修复眼睛图标 - 最高优先级 */
#eye-icon,
#toggle-password #eye-icon,
#toggle-password svg {
    transform: none !important;
    transition: none !important;
    animation: none !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

/* 确保眼睛图标按钮容器正确定位 */
#toggle-password {
    transform: none !important;
    transition: none !important;
    animation: none !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
}

/* 修复登录页面用户图标和锁图标 */
.absolute.inset-y-0.left-0 svg {
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* 确保所有输入框内的图标正确定位 */
.relative .absolute {
    transform: none !important;
}

.relative .absolute svg {
    transform: none !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 修复左侧菜单跳动问题 */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 2.5rem;
    position: relative;
    overflow: hidden;
}

/* 管理端样式（橙色主题） */
body:not(.school-layout):not(.teacher-layout) .nav-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #f97316;
    transform: translateX(4px);
}

body:not(.school-layout):not(.teacher-layout) .nav-item.active {
    background: white;
    color: #f97316;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

body:not(.school-layout):not(.teacher-layout) .nav-item.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(251, 146, 60, 0.1));
    z-index: 0;
}

/* 学校端样式（蓝绿色主题） */
.school-layout .nav-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #0891b2;
    transform: translateX(4px);
}

.school-layout .nav-item.active {
    background: white;
    color: #0891b2;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.2);
    border: 1px solid rgba(8, 145, 178, 0.2);
}

.school-layout .nav-item.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.1), rgba(6, 182, 212, 0.1));
    z-index: 0;
}

/* 教师端样式（绿色主题） */
.teacher-layout .nav-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #059669;
    transform: translateX(4px);
}

.teacher-layout .nav-item.active {
    background: white;
    color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.teacher-layout .nav-item.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(6, 182, 212, 0.1));
    z-index: 0;
}

.nav-item .nav-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
}

/* 管理端图标样式（橙色主题） */
body:not(.school-layout):not(.teacher-layout) .nav-item:not(.active) .nav-icon {
    background: #f3f4f6;
    color: #6b7280;
}

body:not(.school-layout):not(.teacher-layout) .nav-item:hover .nav-icon {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

body:not(.school-layout):not(.teacher-layout) .nav-item.active .nav-icon {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

/* 学校端图标样式（蓝绿色主题） */
.school-layout .nav-item:not(.active) .nav-icon {
    background: #f3f4f6;
    color: #6b7280;
}

.school-layout .nav-item:hover .nav-icon {
    background: rgba(8, 145, 178, 0.1);
    color: #0891b2;
}

.school-layout .nav-item.active .nav-icon {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: white;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.3);
}

/* 教师端图标样式（绿色主题） */
.teacher-layout .nav-item:not(.active) .nav-icon {
    background: #f3f4f6;
    color: #6b7280;
}

.teacher-layout .nav-item:hover .nav-icon {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.teacher-layout .nav-item.active .nav-icon {
    background: linear-gradient(135deg, #059669, #06b6d4);
    color: white;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.nav-item .nav-text {
    font-weight: 500;
    font-size: 0.875rem; /* 14px */
    line-height: 1.25rem; /* 20px */
    z-index: 1;
    position: relative;
    color: #374151; /* 确保文字颜色一致 */
}

/* 管理端文字样式（橙色主题） */
body:not(.school-layout):not(.teacher-layout) .nav-item.active .nav-text {
    font-weight: 600;
    color: #f97316; /* 激活状态的颜色 */
}

/* 学校端文字样式（蓝绿色主题） */
.school-layout .nav-item.active .nav-text {
    font-weight: 600;
    color: #0891b2; /* 激活状态的颜色 */
}

/* 教师端文字样式（绿色主题） */
.teacher-layout .nav-item.active .nav-text {
    font-weight: 600;
    color: #059669; /* 激活状态的颜色 */
}

/* 背景动画效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 登录页面左侧区域动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 登录页面左侧区域样式 */
.login-left-section {
    animation: fadeInUp 1s ease-out;
}

.login-left-section .icon-container {
    animation: scaleIn 1.2s ease-out 0.3s both;
}

.login-left-section .title {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.login-left-section .description {
    animation: fadeInUp 1s ease-out 0.9s both;
}

.login-left-section .tags {
    animation: fadeInUp 1s ease-out 1.2s both;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* 装饰性背景元素动画 */
.bg-gradient-to-br .absolute:nth-child(1):not(.badge) {
    animation: float 6s ease-in-out infinite;
}

.bg-gradient-to-br .absolute:nth-child(2):not(.badge) {
    animation: float 8s ease-in-out infinite reverse;
}

.bg-gradient-to-br .absolute:nth-child(3):not(.badge) {
    animation: pulse-glow 4s ease-in-out infinite;
}

.bg-gradient-to-br .absolute:nth-child(4):not(.badge) {
    animation: float 7s ease-in-out infinite;
}

/* 输入框焦点效果增强 */
input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* 按钮悬停效果增强 */
/* button[type="submit"]:hover {
    box-shadow: 0 10px 25px rgba(254, 202, 202, 0.3);
} */

/* 身份切换按钮增强 */
#student-tab, #teacher-tab {
    position: relative;
    overflow: hidden;
}

#student-tab::before, #teacher-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

#student-tab:hover::before, #teacher-tab:hover::before {
    left: 100%;
}

/* 密码切换按钮增强 */
#toggle-password {
    transition: all 0.2s ease;
}



/* 复选框自定义样式 */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background-color: #0ea5e9;
    border-color: #0ea5e9;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* 全局链接样式 */
a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* 响应式优化 */
@media (max-width: 1024px) {
    .max-w-6xl {
        margin: 1rem;
    }
    
    .lg\:p-12 {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .text-3xl {
        font-size: 1.875rem;
    }
    
    .text-2xl {
        font-size: 1.5rem;
    }
    
    .w-64 {
        width: 12rem;
    }
    
    .h-64 {
        height: 12rem;
    }
    
    .w-32 {
        width: 8rem;
    }
    
    .h-32 {
        height: 8rem;
    }
}

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

.max-w-6xl {
    animation: fadeInUp 0.8s ease-out;
}

/* 表单验证样式 */
input:invalid {
    border-color: #ef4444;
}

input:invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* 错误提示样式 */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 错误消息样式 */
.error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    display: block;
}

/* 成功提示样式 */
.success-message {
    color: #22c55e;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 加载状态样式 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 无障碍访问增强 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .bg-gray-100 {
        background-color: #e5e7eb;
    }
    
    .text-gray-600 {
        color: #374151;
    }
    
    .border-gray-200 {
        border-color: #d1d5db;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #166534 100%);
    }
    
    .bg-white {
        background-color: #1f2937;
    }
    
    .text-gray-800 {
        color: #f9fafb;
    }
    
    .text-gray-600 {
        color: #d1d5db;
    }
    
    .text-gray-700 {
        color: #e5e7eb;
    }
    
    .border-gray-200 {
        border-color: #374151;
    }
    
    input {
        background-color: #374151;
        color: #f9fafb;
    }
    
    input::placeholder {
        color: #9ca3af;
    }
}

/* 课程管理页面特定样式 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 课程卡片悬停效果增强 */
.course-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.course-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* 状态标签样式 - 移除浮动效果 */
.bg-green-500, .bg-red-500, .bg-yellow-500, .bg-gray-500 {
    animation: none !important;
    transform: none !important;
}

/* 模态框动画 */
.modal-enter {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 状态标签样式 */
.status-active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.status-draft {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.status-inactive {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

/* 分类标签样式 */
.category-programming {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
}

.category-ai {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.category-robotics {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.category-game {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.category-web {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* 分页按钮样式 */
.pagination-btn {
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* 搜索框增强 */
.search-input:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* 操作按钮增强 */
.action-btn {
    transition: all 0.2s ease;
}

.action-btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 课程统计信息样式 */
.course-stats {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(34, 197, 94, 0.1));
    border: 1px solid rgba(14, 165, 233, 0.2);
}

/* 响应式课程网格优化 */
@media (max-width: 640px) {
    .course-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .course-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1025px) {
    .course-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 新增：卡片阴影和边框优化 */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-shadow-hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 新增：渐变背景优化 */
.gradient-bg-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
}

.gradient-bg-accent {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
}

.gradient-bg-mixed {
    background: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
}

/* 新增：按钮样式优化 */
.btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    transform: translateY(-1px);
    box-shadow: 0 8px 15px -3px rgba(14, 165, 233, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 8px 15px -3px rgba(34, 197, 94, 0.3);
}

/* 新增：输入框样式优化 */
.input-enhanced {
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    padding-left: 2rem;
    transition: all 0.3s ease;
    background: white;
}

.input-enhanced:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    outline: none;
}

/* 新增：统计卡片优化 */
.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 新增：表格样式优化 */
.table-enhanced {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.table-enhanced th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 1rem;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.table-enhanced td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.table-enhanced tr:hover td {
    background-color: #f8fafc;
}

/* 新增：徽章样式 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
/* 防止badge动画和上浮 */
.badge {
    animation: none !important;
    transform: none !important;
}

.badge-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.badge-info {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* 新增：加载动画 */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* 新增：滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0284c7, #16a34a);
}

/* 新增：工具提示样式 */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #374151;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* 新增：响应式间距优化 */
@media (max-width: 768px) {
    .p-8 {
        padding: 1rem;
    }
    
    .p-6 {
        padding: 0.75rem;
    }
    
    .gap-6 {
        gap: 1rem;
    }
    
    .gap-4 {
        gap: 0.75rem;
    }
}

/* 新增：班级卡片网格修复 */
.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .class-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .class-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 新增：页面布局优化 */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.page-main {
    flex: 1;
    overflow: auto;
    padding: 1.5rem;
}

/* 新增：侧边栏优化 */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-right: 1px solid #e5e7eb;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

/* 新增：顶部导航优化 */
.top-nav {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 新增：内容区域优化 */
.content-area {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: calc(100vh - 64px);
}

/* 新增：紧凑布局优化 */
.compact-layout {
    padding: 1rem;
}

.compact-layout .stat-card {
    padding: 1rem;
}

.compact-layout .course-card {
    margin-bottom: 0.75rem;
}

.compact-layout .class-card {
    margin-bottom: 0.75rem;
}

/* 新增：页面间距统一 */
.page-padding {
    padding: 1.5rem;
}

@media (max-width: 768px) {
    .page-padding {
        padding: 1rem;
    }
}

/* 新增：菜单项高度统一 */
.nav-item {
    min-height: 3rem;
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem; /* 确保内边距一致 */
}

/* 新增：Logo区域优化 */
.logo-section {
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
}

/* 新增：底部装饰优化 */
.bottom-decoration {
    margin-top: auto;
    padding: 1rem;
}

/* 新增：学员管理页面样式 */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .student-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .student-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.student-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.student-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    border-radius: 1rem 1rem 0 0;
}

.student-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #0ea5e9;
}

.student-avatar {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f1f5f9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.status-badge {
    position: absolute;
    top: -8px;
    right: 50%;
    transform: translateX(50%);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.status-badge.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.status-badge.completed {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.status-badge.inactive {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.student-info {
    text-align: center;
    margin-bottom: 1rem;
}

.student-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.student-phone {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.student-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.detail-item i {
    width: 16px;
    color: #0ea5e9;
}

.student-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.student-actions .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
}

/* 学员卡片响应式优化 */
@media (max-width: 640px) {
    .student-grid {
        grid-template-columns: 1fr;
    }
    
    .student-card {
        padding: 1rem;
    }
    
    .student-actions {
        flex-direction: column;
    }
    
    .student-actions .btn-sm {
        width: 100%;
    }
} 

/* 课程章节页面专用样式 */

/* 模块区域样式 */
.module-section {
    margin-bottom: 2rem;
}

.module-header {
    margin-bottom: 1rem;
}

/* 课节网格布局 */
.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .lesson-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .lesson-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .lesson-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 课节卡片样式 */
.lesson-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.lesson-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* 课节图片容器 */
.lesson-image {
    position: relative;
    overflow: hidden;
}

.lesson-image img {
    transition: transform 0.3s ease;
}

.lesson-card:hover .lesson-image img {
    transform: scale(1.03);
}

/* 课节状态角标 */
.lesson-status {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
}

/* 课节内容区域 */
.lesson-content {
    padding: 1rem;
}

.lesson-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

.lesson-description {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 课节标签样式 */
.lesson-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.5rem;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag:hover {
    background: #e5e7eb;
    color: #374151;
}

/* 模块色条样式 */
.module-section:nth-child(1) .lesson-card {
    border-left: 3px solid #f59e0b;
}

.module-section:nth-child(2) .lesson-card {
    border-left: 3px solid #0ea5e9;
}

.module-section:nth-child(3) .lesson-card {
    border-left: 3px solid #22c55e;
}

/* 路径导航样式 */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb-nav a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-nav a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.breadcrumb-nav .separator {
    color: #9ca3af;
}

/* 课程信息区域样式 */
.course-info {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.course-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.375rem;
}

.course-period {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.course-description {
    color: #6b7280;
    line-height: 1.5;
    font-size: 0.875rem;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .lesson-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .lesson-card {
        margin-bottom: 0;
    }
    
    .course-title {
        font-size: 1.25rem;
    }
    
    .module-header h2 {
        font-size: 1rem;
    }
    
    .lesson-content {
        padding: 0.875rem;
    }
}

/* 加载动画 */
.lesson-card {
    animation: fadeInUp 0.5s ease-out;
}

.lesson-card:nth-child(1) { animation-delay: 0.05s; }
.lesson-card:nth-child(2) { animation-delay: 0.1s; }
.lesson-card:nth-child(3) { animation-delay: 0.15s; }
.lesson-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 