/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
header {
    background: linear-gradient(90deg, #0ea5e9, #0d9488);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s;
}

/* 页面容器 */
.page {
    display: none;
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 首页 Hero 区域 */
.hero {
    text-align: center;
    padding: 5rem 0;
    background: linear-gradient(135deg, #0ea5e9, #0d9488);
    border-radius: 20px;
    margin: 2rem 0;
    color: white;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background: white;
    color: #0ea5e9;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: #f0f9ff;
}

/* 课程卡片网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.video-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid #e2e8f0;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    border-color: #bae6fd;
}

.video-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #0ea5e9, #0d9488);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3.5rem;
    position: relative;
    overflow: hidden;
}

.video-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.video-card:hover .video-thumbnail::after {
    transform: translateX(100%);
}

.video-info {
    padding: 1.8rem;
}

.video-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #0f172a;
    font-weight: 600;
}

.video-desc {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.5;
}

/* 课程列表页 */
.course-list-container {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.course-item {
    display: flex;
    align-items: center;
    padding: 1.8rem;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s;
    cursor: pointer;
    border-radius: 15px;
}

.course-item:hover {
    background: #f0f9ff;
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.1);
}

.course-item:last-child {
    border-bottom: none;
}

.course-thumbnail {
    width: 120px;
    height: 80px;
    background: linear-gradient(135deg, #0ea5e9, #0d9488);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin-right: 1.8rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.course-info {
    flex: 1;
}

.course-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.course-duration {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.course-duration::before {
    content: '⏱';
    margin-right: 5px;
}

.course-desc {
    color: #475569;
    font-size: 1rem;
    line-height: 1.5;
}

/* 播放页 */
.video-player-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

.main-video-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.video-player {
    background: #f1f5f9;
    border-radius: 15px;
    margin-bottom: 2.5rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    background: #000;
}

.video-container::after {
    content: '加载中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-container.loading::after {
    opacity: 1;
}

#localVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

.video-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 1.2rem;
}

.nav-btn {
    padding: 12px 24px;
    background: linear-gradient(90deg, #0ea5e9, #0d9488);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(14, 165, 233, 0.4);
}

.nav-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.video-details h2 {
    color: #0f172a;
    font-size: 2rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.video-details p {
    color: #475569;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.ad-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.ad-placeholder {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px dashed #f59e0b;
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    color: #92400e;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.ad-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f59e0b' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.ad-placeholder:hover {
    background: linear-gradient(135deg, #fffbeb, #fbbf24);
    transform: scale(1.02);
}

/* 课程大纲 - 分类折叠样式 */
.course-outline h3 {
    margin-bottom: 1.5rem;
    color: #0f172a;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-outline h3::before {
    content: '📋';
}

/* 分类大纲样式 */
.category-section {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #fff;
}

.category-header {
    background: #f1f5f9;
    padding: 1rem;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #0f172a;
    transition: background 0.3s;
}

.category-header:hover {
    background: #e2e8f0;
}

.toggle-icon {
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 1;
    background: #cbd5e1;
    color: #333;
    border-radius: 50%;
}

.category-items {
    border-top: 1px dashed #e2e8f0;
    padding: 0.5rem 0;
}

.outline-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    margin: 0 1rem;
    font-size: 0.95rem;
}

.outline-item:hover {
    background: #f0f9ff;
    color: #0ea5e9;
}

.outline-item.active {
    background: linear-gradient(90deg, #0ea5e9, #0d9488);
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

/* 关于我们 */
.about-content {
    background: white;
    padding: 3.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.about-content h2 {
    color: #0f172a;
    margin-bottom: 1.8rem;
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
}

.about-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0ea5e9, #0d9488);
    border-radius: 3px;
}

.about-content p {
    margin-bottom: 1.5rem;
    color: #475569;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-content ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.about-content li {
    margin-bottom: 0.8rem;
    color: #475569;
    position: relative;
    padding-left: 1.5rem;
}

.about-content li::before {
    content: '•';
    color: #0ea5e9;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

/* 密码模态框 */
.password-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.password-modal.active {
    display: flex;
}

.password-box {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid #e2e8f0;
}

.password-box h3 {
    margin-bottom: 1.5rem;
    color: #0f172a;
    font-size: 1.8rem;
}

.password-box p {
    color: #64748b;
    margin-bottom: 1.8rem;
    font-size: 1.1rem;
}

.password-input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.1rem;
    background: #f8fafc;
    color: #0f172a;
    transition: all 0.3s;
}

.password-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.error-message {
    color: #ef4444;
    margin-top: 1.2rem;
    display: none;
    font-size: 1rem;
    font-weight: 500;
}

/* 页脚 */
footer {
    background: linear-gradient(90deg, #0f172a, #1e293b);
    color: #cbd5e1;
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 4rem;
    font-size: 1.1rem;
    border-top: 1px solid rgba(94, 234, 212, 0.1);
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-links { gap: 1.2rem; }
    .hero h1 { font-size: 2.5rem; }
    .video-grid { grid-template-columns: 1fr; }
    .video-player-container { grid-template-columns: 1fr; }
    .course-item { flex-direction: column; text-align: center; }
    .course-thumbnail { margin-right: 0; margin-bottom: 1rem; }
    .video-controls { flex-direction: column; gap: 1rem; }
    .nav-btn { width: 100%; justify-content: center; }
    .about-content { padding: 2rem; }
}