/* 乐理学习中心交互式组件样式 */
.preface-section {
    margin-bottom: 30px;
}

.preface-card {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    border-top: 4px solid #4a7694;
}

.preface-card h2 {
    color: #4a7694;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 300;
    text-align: center;
}

.preface-content {
    line-height: 1.7;
    margin-bottom: 25px;
}

.preface-content p {
    margin-bottom: 15px;
    color: #555;
    font-size: 1rem;
}

.preface-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.start-learning-btn, .directory-nav-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.start-learning-btn {
    background: #4a7694;
    color: white;
}

.start-learning-btn:hover {
    background: #3a6684;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 118, 148, 0.4);
}

.directory-nav-btn {
    background: #f0f0f0;
    color: #555;
    border: 1px solid #d0d0d0;
}

.directory-nav-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.identity-modal, .confirm-modal {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    color: #4a7694;
    font-size: 1.4rem;
    font-weight: 400;
    margin: 0;
}

/* 身份选择卡片样式 */
.identity-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.identity-card {
    background: #f8f8f8;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.identity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #4a7694;
    transform: scaleX(0);
    transition: transform 0.3s;
}

.identity-card:hover {
    border-color: #4a7694;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(74, 118, 148, 0.2);
}

.identity-card:hover::before {
    transform: scaleX(1);
}

.identity-card.selected {
    border-color: #4a7694;
    background: #f0f4f7;
    box-shadow: 0 3px 10px rgba(74, 118, 148, 0.15);
}

.identity-card.selected::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #4a7694;
}

.identity-card h4 {
    color: #4a7694;
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 500;
}

.identity-card p {
    color: #777;
    font-size: 0.9rem;
    margin: 0;
}

/* 确认模态框样式 */
.confirm-content {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

.confirm-content p {
    margin: 0;
    color: #555;
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.btn-primary {
    background: #4a7694;
    color: white;
    box-shadow: 0 3px 10px rgba(74, 118, 148, 0.3);
}

.btn-primary:hover {
    background: #3a6684;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 118, 148, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #555;
    border: 1px solid #d0d0d0;
}

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* 音频播放器样式 */
.audio-player {
    margin: 20px 0;
    text-align: center;
}

.audio-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #4a7694;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.audio-btn:hover {
    background: #3a6684;
    transform: translateY(-2px);
}

.audio-btn.playing {
    background: #3a6684;
    box-shadow: 0 0 0 3px rgba(74, 118, 148, 0.3);
}

/* 学习进度指示器 */
.progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0d0d0;
    transition: all 0.3s;
}

.progress-dot.active {
    background: #4a7694;
    transform: scale(1.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .preface-card {
        padding: 20px;
    }
    
    .preface-card h2 {
        font-size: 1.5rem;
    }
    
    .identity-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .identity-modal, .confirm-modal {
        padding: 20px;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .preface-card {
        padding: 15px;
    }
    
    .preface-card h2 {
        font-size: 1.3rem;
    }
    
    .preface-content p {
        font-size: 0.9rem;
    }
    
    .start-learning-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .identity-card {
        padding: 20px 15px;
    }
    
    .card-icon {
        font-size: 2rem;
    }
}

/* 章节列表样式 */
.chapters-section {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #e8e8e8;
}

.chapters-container h2 {
    color: #4a7694;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 300;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.chapter-card {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.chapter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #4a7694;
    transform: scaleX(0);
    transition: transform 0.3s;
}

.chapter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.chapter-card:hover::before {
    transform: scaleX(1);
}

.chapter-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #4a7694;
}

.chapter-card h3 {
    color: #4a7694;
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 500;
}

.chapter-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.chapter-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #4a7694;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
    width: 100%;
}

.chapter-btn:hover {
    background: #3a6684;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(74, 118, 148, 0.3);
}

.chapter-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chapter-card.coming-soon {
    opacity: 0.7;
}

.chapter-card.coming-soon .chapter-icon {
    color: #999;
}

.chapter-card.coming-soon h3 {
    color: #777;
}

/* 章节页面样式 */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #e8e8e8;
}

.chapter-nav.bottom-nav {
    margin-top: 40px;
    border-top: 1px solid #e8e8e8;
    border-bottom: none;
    padding: 20px 0 0;
}

.nav-btn {
    padding: 10px 20px;
    background: #4a7694;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.nav-btn:hover {
    background: #3a6684;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.chapter-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 0.9rem;
}

.chapter-section {
    margin-bottom: 40px;
}

.chapter-section h2 {
    color: #4a7694;
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 400;
    border-bottom: 2px solid #4a7694;
    padding-bottom: 10px;
}

.content-card {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e8e8e8;
}

.theory-point {
    margin-bottom: 20px;
}

.theory-point h3 {
    color: #4a7694;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 500;
}

.theory-point ul {
    margin-left: 20px;
    color: #555;
}

.theory-point li {
    margin-bottom: 5px;
    line-height: 1.5;
}

.example-box {
    background: white;
    border-left: 4px solid #4a7694;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.example-box h4 {
    color: #4a7694;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.media-placeholder, .image-placeholder {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    margin: 15px 0;
    border-radius: 6px;
    color: #777;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chapters-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chapter-card {
        padding: 20px;
    }
    
    .chapter-nav {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .content-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .chapters-container h2 {
        font-size: 1.5rem;
    }
    
    .chapter-card {
        padding: 15px;
    }
    
    .chapter-icon {
        font-size: 2rem;
    }
    
    .chapter-card h3 {
        font-size: 1.2rem;
    }
    
    .chapter-section h2 {
        font-size: 1.4rem;
    }
    
    .content-card {
        padding: 15px;
    }
}
