/* AI学习页面特定样式 */

/* 页面头部 */
.page-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}


.page-header .container {
    position: relative;
    z-index: 5;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255,255,255,0.05) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
    z-index: 4;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 2s ease-in-out infinite;
    z-index: 4;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 导航激活状态 */
.nav a.active {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    font-size: 0.9rem;
}

/* 课程概览 */
.course-overview {
    padding: 3rem 0;
    background: white;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.overview-card {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.overview-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.overview-card .number {
    font-size: 2rem;
    font-weight: 700;
}

/* 课程列表 */
.courses {
    padding: 3rem 0;
    background: #f8f9fa;
}

.courses h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: #333;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.course-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.course-card:hover::before {
    left: 100%;
}

.course-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.course-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
}

.lesson-number {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.course-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
}

.course-content {
    padding: 1.5rem;
}

.course-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.course-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.duration, .difficulty {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 500;
}

.course-actions {
    padding: 0 1.5rem 1.5rem;
}

/* 禁用状态按钮样式 */
.btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    opacity: 0.6;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

/* 学习单内容样式 */
.learning-sheet {
    line-height: 1.8;
}

.learning-sheet h3 {
    color: #667eea;
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.learning-sheet h3:first-child {
    margin-top: 0;
}

.learning-sheet ul, .learning-sheet ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.learning-sheet li {
    margin: 0.5rem 0;
}

.learning-sheet .highlight {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.learning-sheet .note {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.learning-sheet .exercise {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
}

.learning-sheet .exercise h4 {
    color: #856404;
    margin: 0 0 0.5rem 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-header {
        min-height: 40vh;
        padding: 2.5rem 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 0.8rem;
    }
    
    .page-header p {
        font-size: 0.95rem;
        line-height: 1.4;
        max-width: 90%;
        margin: 0 auto;
    }
    
    .course-overview {
        padding: 2rem 0;
    }
    
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .overview-card {
        padding: 1.5rem;
    }
    
    .card-icon {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .overview-card .number {
        font-size: 1.8rem;
    }
    
    .courses {
        padding: 2.5rem 0;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .course-card {
        border-radius: 15px;
    }
    
    .course-header {
        padding: 1.2rem;
    }
    
    .course-content {
        padding: 1.2rem;
    }
    
    .course-actions {
        padding: 0 1.2rem 1.2rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    /* 移动端导航优化 */
    .nav a.active {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .nav ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .nav li {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .page-header {
        min-height: 35vh;
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
        line-height: 1.1;
    }
    
    .page-header p {
        font-size: 0.9rem;
        max-width: 95%;
    }
    
    .course-overview {
        padding: 1.5rem 0;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .overview-card {
        padding: 1.2rem;
    }
    
    .card-icon {
        font-size: 1.8rem;
        margin-bottom: 0.6rem;
    }
    
    .overview-card h3 {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }
    
    .overview-card .number {
        font-size: 1.6rem;
    }
    
    .courses {
        padding: 2rem 0;
    }
    
    .courses h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .course-header {
        padding: 1rem;
    }
    
    .course-header h3 {
        font-size: 1.2rem;
    }
    
    .lesson-number {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
    
    .course-content {
        padding: 1rem;
    }
    
    .course-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 0.3rem;
        margin-bottom: 0.8rem;
    }
    
    .duration, .difficulty {
        font-size: 0.85rem;
    }
    
    .course-actions {
        padding: 0 1rem 1rem;
    }
    
    .modal-content {
        margin: 5% auto;
        max-height: 90vh;
        width: 98%;
        padding: 1.5rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}
