* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #2d3748;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    gap: 20px;
}

.course-section {
    flex: 1;
    background: #ffffff;
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.course-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a202c;
    letter-spacing: -0.5px;
}

.loading, .error {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    font-size: 15px;
}

.error {
    color: #e53e3e;
}

.stage-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stage-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stage-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    transition: all 0.3s ease;
}

.stage-header:active {
    transform: scale(0.98);
}

.stage-item.active .stage-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.stage-name {
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
    letter-spacing: -0.3px;
}

.stage-item.active .stage-name {
    color: #fff;
}

.stage-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #718096;
    flex-shrink: 0;
}

.stage-item.active .stage-icon {
    transform: rotate(90deg);
    color: #fff;
}

.course-list {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stage-item.active .course-list {
    max-height: 1000px;
}

.course-item {
    padding: 10px 16px 10px 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.course-item:first-child {
    border-top: none;
}

.course-item::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e0;
    transition: all 0.25s ease;
}

.course-item:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
    padding-left: 36px;
}

.course-item:hover::before {
    background: #667eea;
    width: 8px;
    height: 8px;
}

.course-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    border-left: 3px solid #667eea;
}

.course-item.active::before {
    background: #667eea;
    width: 8px;
    height: 8px;
}

.course-name {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.5;
    transition: color 0.25s ease;
}

.course-item.active .course-name {
    color: #667eea;
    font-weight: 500;
}

.player-section {
    background: #ffffff;
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.player-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a202c;
    letter-spacing: -0.5px;
}

#player {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

#player > div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .container {
        gap: 16px;
    }
    
    .course-section {
        padding: 10px;
        border-radius: 20px;
    }
    
    .course-title {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .stage-header {
        padding: 10px 14px;
    }
    
    .course-item {
        padding: 8px 14px 8px 28px;
    }
    
    .player-section {
        padding: 10px;
        border-radius: 20px;
    }
    
    .player-title {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    #player {
        padding-bottom: 56.25%;
    }
}

