/* .divider {
    height: 1px;
    background-color: #eaeaea;
    margin: 20px 0;
} */

/* .confirm-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
    font-weight: 500;
}

.confirm-btn:hover {
    background-color: #2980b9;
} */

.main-container {
    display: flex;
    flex: 1;
    padding: 20px;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.purchase-section {
    padding: 20px;
    text-align: center;
}

.purchase-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1db012;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 82, 82, 0.3);
    width: 100%;
}

.purchase-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 82, 82, 0.4);
}

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

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.course-sidebar {
    width: 300px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: fit-content;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.modal {
    display: none;
    position: fixed;
    background-color: white;
    top: 50%;
    left: 50%;
    width: 40%;
    transform: translate(-50%, -50%);
    border: 3px solid var(--primary-color);
    z-index: 1001;
}

.video-list {
    max-height: 75vh;
    overflow-y: auto;
}

.video-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.video-item:hover {
    background-color: #f9f9f9;
}

.video-item.active {
    background-color: #f5e8e5;
    border-left: 3px solid var(--primary-color);
}

.video-item.locked {
    pointer-events: none;
    background-color: rgb(231, 230, 230);
}

.lock-icon {
    width: 24px;
    height: 24px;
    background-color: rgb(231, 230, 230);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.video-index {
    width: 24px;
    height: 24px;
    background-color: #f1f1f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 12px;
    color: #666;
}

.video-item.active .video-index {
    background-color: var(--primary-color);
    color: white;
}

.video-title {
    flex: 1;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-item.active .video-title {
    color: var(--primary-color);
    font-weight: 500;
}

.video-duration {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
}

/* 滚动条样式 */
.video-list::-webkit-scrollbar {
    width: 6px;
}

.video-list::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}

.video-list::-webkit-scrollbar-thumb:hover {
    background-color: #ccc;
}

/* 右侧内容区 */
.course-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.player-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 20px;
}

.content-header {
    margin-bottom: 20px;
}

.content-header h1 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.breadcrumb {
    display: flex;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 8px;
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background-color: #000;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

#video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eaeaea;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 24px;
}

.course-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.course-details {
    flex: 1;
}

.course-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.course-price {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

.payment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.payment-text {
    font-size: 1rem;
    color: #333;
    margin-bottom: 15px;
    text-align: right;
}

.qrcode-container {
    width: 160px;
    height: 160px;
    background-color: #f8f9fa;
    border: 1px dashed #ddd;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.qrcode-container #qrimg {
    width: 100%;
    height: 100%;
}

.hint-text {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-align: center;
}

.modal-footer {
    padding: 20px 24px;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.cancel-btn {
    background-color: var(--primary-light);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
    font-weight: 500;
}

.cancel-btn:hover {
    background-color: #c0392b;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
    }

    .course-sidebar {
        width: 100%;
    }

    .video-list {
        max-height: 300px;
    }
}