/* 移动端网校样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.container {
    max-width: 100%;
    padding: 10px;
}

/* 课程封面样式 - 采用4:3固定宽高比 */
.course-cover-container {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 宽高比 (3/4 = 0.75 = 75%) */
    overflow: hidden;
    background-color: #f8f9fa;
}

.course-cover-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-cover-container img {
    transform: scale(1.05);
}



/* 响应式设计 - 不同屏幕尺寸下的课程封面 */
@media (max-width: 576px) {
    /* 小屏幕设备 - 保持4:3比例 */
    .course-cover-container {
        padding-top: 75%;
    }
}

@media (min-width: 576px) and (max-width: 768px) {
    /* 中等屏幕设备 - 可以考虑16:9比例 */
    .course-cover-container {
        padding-top: 56.25%; /* 16:9 宽高比 (9/16 = 0.5625 = 56.25%) */
    }
}

@media (min-width: 768px) {
    /* 大屏幕设备 - 可以考虑16:9比例 */
    .course-cover-container {
        padding-top: 56.25%; /* 16:9 宽高比 */
    }
}

/* 课程卡片样式优化 */
.course-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Bootstrap网格间距调整 */
.row-cols-2 .col {
    padding-left: 5px;
    padding-right: 5px;
}

.row-cols-2 .g-3 {
    gap: 0.5rem;
}

.header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px 0;
}

.course-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s;
}

.course-card:hover {
    transform: translateY(-3px);
}

.course-cover {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f8f9fa;
}

.course-title {
    padding: 10px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

.lesson-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 15px 0;
    padding: 10px;
}

.lesson-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-title {
    font-size: 16px;
    font-weight: 500;
    word-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    display: block;
    max-width: 100%;
    overflow-wrap: break-word;
}

.lesson-duration {
    font-size: 12px;
    color: #666;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 防下载样式 */
.video-container video {
    /* 禁用拖拽 */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    
    /* 禁用选择 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* 禁用右键菜单 */
    -webkit-touch-callout: none;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-block {
    display: block;
    width: 100%;
    margin: 10px 0;
}

.progress-bar {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s;
}

.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.d-grid {
    display: grid;
}

/* 模块标题样式 */
.module-header {
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}

.module-header h5 {
    color: #007bff;
    font-weight: bold;
    font-size: 18px;
    margin: 0;
    padding: 5px 0;
}

/* 课程有效期样式 */
.course-expiry {
    padding: 5px 10px;
    font-size: 12px;
    color: #666;
    text-align: center;
    background-color: #f8f9fa;
}

.gap-2 {
    gap: 0.5rem;
}