/* 学习专区样式 */

/* 学习头部 */
.study-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

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

/* 学习概览 */
.study-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.overview-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.overview-icon {
    font-size: 2.5rem;
    margin-right: 1.5rem;
    color: #667eea;
}

.overview-content h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.overview-content p {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
}

/* 学习类别 */
.study-categories {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.study-category {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.category-header {
    padding: 2rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    text-align: center;
}

.category-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.category-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 学习阶段 */
.study-phases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.phase {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.phase:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.phase-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.phase-header i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.phase-header h3 {
    font-size: 1.3rem;
    color: #333;
    margin: 0;
}

.phase-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 学习项目 */
.study-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.study-item:hover {
    transform: translateY(-2px);
}

.study-item h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.study-item p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* 学习进度 */
.study-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
}

/* 按钮样式 */
.btn-start {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-start:active {
    transform: translateY(0);
}

/* 学习弹窗 */
.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: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

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

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

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

.close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 2rem;
}

.study-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #dee2e6;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 100;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .study-header h1 {
        font-size: 2rem;
    }

    .study-header p {
        font-size: 1rem;
    }

    .study-overview {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .overview-card {
        padding: 1.5rem;
    }

    .study-phases {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .phase {
        padding: 1rem;
    }

    .study-item {
        padding: 1rem;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        max-height: 90vh;
    }

    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }

    .study-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .study-header {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }

    .study-header h1 {
        font-size: 1.8rem;
    }

    .study-categories {
        gap: 2rem;
    }

    .category-header {
        padding: 1.5rem 1rem;
    }

    .category-header h2 {
        font-size: 1.5rem;
    }

    .phase {
        padding: 0.8rem;
    }

    .study-item h4 {
        font-size: 1.1rem;
    }

    .study-item p {
        font-size: 0.9rem;
    }

    .btn-start {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* 动画效果 */
.study-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.study-item:nth-child(1) { animation-delay: 0.1s; }
.study-item:nth-child(2) { animation-delay: 0.2s; }
.study-item:nth-child(3) { animation-delay: 0.3s; }

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

/* 特殊状态 */
.study-item.completed {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #d4edda, #f8fff9);
}

.study-item.completed h4::after {
    content: " ✓";
    color: #28a745;
    font-weight: bold;
}

.study-item.locked {
    opacity: 0.6;
    background: #f8f9fa;
    cursor: not-allowed;
}

.study-item.locked .btn-start {
    background: #6c757d;
    cursor: not-allowed;
}

.study-item.locked .btn-start:hover {
    transform: none;
    box-shadow: none;
}