﻿/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #121212;
    color: #ffffff;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    color: #ffffff;
}

    .logo span {
        color: #165DFF;
    }

nav {
    display: none;
}

@media (min-width: 768px) {
    nav {
        display: flex;
        align-items: center;
        gap: 32px;
    }
}

nav a {
    color: #8A8F98;
    text-decoration: none;
    transition: color 0.3s;
}

    nav a:hover {
        color: #ffffff;
    }

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-icon {
    display: none;
    color: #8A8F98;
    font-size: 18px;
    cursor: pointer;
}

@media (min-width: 768px) {
    .search-icon {
        display: block;
    }
}

.login-btn {
    background-color: #165DFF;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
}

    .login-btn:hover {
        background-color: #0E4CD1;
        transform: scale(1.05);
    }

.menu-icon {
    font-size: 24px;
    color: #8A8F98;
    cursor: pointer;
}

@media (min-width: 768px) {
    .menu-icon {
        display: none;
    }
}

/* 主内容区 */
main {
    padding-top: 100px;
    padding-bottom: 60px;
}

.breadcrumb {
    color: #8A8F98;
    font-size: 14px;
    margin-bottom: 30px;
}

    .breadcrumb a {
        color: #8A8F98;
        text-decoration: none;
        transition: color 0.3s;
    }

        .breadcrumb a:hover {
            color: #ffffff;
        }

    .breadcrumb span {
        margin: 0 8px;
    }

.main-content {
    display: grid;
    gap: 40px;
}

@media (min-width: 1024px) {
    .main-content {
        grid-template-columns: 2fr 1fr;
    }
}

/* 视频区域 */
.video-section {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
}

    .video-section:hover {
        transform: translateY(-5px);
    }

.video-container {
    position: relative;
    width: 100%;
   
    background-color: #1E1E1E;
}

.video-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(22, 93, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

    .play-button:hover {
        background-color: #165DFF;
        transform: translate(-50%, -50%) scale(1.1);
    }

.play-icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent white;
    margin-left: 5px;
}

.video-duration {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
}

/* 课程信息区 */
.course-info {
    background-color: #1E1E1E;
    border-radius: 12px;
    padding: 25px;
    /* 移除了 position: sticky 和 top: 100px 属性 */
}

.course-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tag {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
}

    .tag.bestseller {
        background-color: rgba(22, 93, 255, 0.2);
        color: #165DFF;
    }

    .tag.level {
        background-color: #333333;
        color: #8A8F98;
    }

.course-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.3;
}

.course-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.student-avatars {
    display: flex;
}

    .student-avatars img {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 2px solid #1E1E1E;
        margin-left: -8px;
    }

        .student-avatars img:first-child {
            margin-left: 0;
        }

.student-count {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #333333;
    border: 2px solid #1E1E1E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: -8px;
}

.rating {
    color: #FFD700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rating-score {
    color: #8A8F98;
    font-size: 14px;
}

.course-price {
    margin-bottom: 25px;
}

.price-current {
    font-size: 28px;
    font-weight: bold;
    color: white;
}

.price-original {
    color: #8A8F98;
    text-decoration: line-through;
    margin-left: 10px;
}

.price-discount {
    background-color: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
}

.limited-time {
    color: #8A8F98;
    font-size: 14px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.buy-btn {
    background-color: #165DFF;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

    .buy-btn:hover {
        background-color: #0E4CD1;
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(22, 93, 255, 0.2);
    }

.cart-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .cart-btn:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

.course-details {
    border-top: 1px solid #333333;
    padding-top: 25px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.detail-label {
    color: #8A8F98;
}

/* 课程描述 */
.course-description {
    grid-column: 1 / -1;
    background-color: #1E1E1E;
    border-radius: 12px;
    padding: 30px;
}

.section-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
}

.description-text {
    color: #BBBBBB;
    margin-bottom: 20px;
    line-height: 1.8;
}

.features-grid {
    display: grid;
    gap: 20px;
    margin-top: 40px;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background-color: #121212;
    border-radius: 8px;
    padding: 25px;
}

.feature-icon {
    color: #165DFF;
    font-size: 36px;
    margin-bottom: 15px;
}

.feature-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-desc {
    color: #8A8F98;
    font-size: 14px;
}

/* 页脚 */
footer {
    background-color: #1E1E1E;
    padding: 50px 0 30px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.footer-logo {
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    color: #ffffff;
}

    .footer-logo span {
        color: #165DFF;
    }

.footer-tagline {
    color: #8A8F98;
    font-size: 14px;
    margin-top: 5px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    color: #8A8F98;
    font-size: 18px;
    transition: color 0.3s;
}

    .social-link:hover {
        color: white;
    }

.footer-bottom {
    border-top: 1px solid #333333;
    margin-top: 30px;
    padding-top: 30px;
    text-align: center;
    color: #8A8F98;
    font-size: 14px;
}
