/* H5页面专用样式 */

.h5-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    text-align: center;
    color: white;
}

.header-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-content p {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 300;
}

/* 业务分类导航 */
.category-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 二级分类导航 */
.subcategory-nav {
    background: rgba(0, 123, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subcategory-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.subcategory-tab {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 123, 255, 0.3);
    color: #007bff;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.subcategory-tab:hover {
    background: rgba(0, 123, 255, 0.1);
    border-color: #007bff;
    transform: translateY(-1px);
}

.subcategory-tab.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-tab {
    background: transparent;
    border: 2px solid #e0e0e0;
    color: #666;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-tab:hover {
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
}

.category-tab.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* 搜索区域 */
.search-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    display: flex;
}

.search-box input {
    flex: 1;
    padding: 12px 50px 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #007bff;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #0056b3;
    transform: translateY(-50%) scale(1.05);
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* 课件列表 */
.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* 课件卡片 */
.course-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 分享按钮样式 */
.share-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.share-btn:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.course-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.course-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.course-category {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.course-subcategory {
    display: inline-block;
    background: linear-gradient(135deg, #17a2b8, #20c997);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.rating-stars {
    color: #ffc107;
    font-size: 16px;
}

.course-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* 评分模态框 */
.rating-section {
    text-align: center;
    padding: 20px 0;
}

.rating-section p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 15px;
}

.star {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.star:hover,
.star.active {
    color: #ffc107;
    transform: scale(1.1);
}

.rating-text {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* 无数据提示 */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.no-data-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-data-text {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 500;
}

.no-data-desc {
    font-size: 14px;
    opacity: 0.8;
}

/* 加载状态 */
.loading-container {
    text-align: center;
    padding: 40px;
    color: white;
}

.loading-container .loading {
    margin-right: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 24px;
    }
    
    .header-content p {
        font-size: 14px;
    }
    
    .category-tabs {
        padding: 0 15px;
        gap: 8px;
    }
    
    .category-tab {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .search-section {
        padding: 15px;
    }
    
    .search-box input {
        font-size: 14px;
        padding: 10px 45px 10px 14px;
    }
    
    .search-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .course-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .course-card {
        padding: 15px;
    }
    
    .course-title {
        font-size: 16px;
    }
    
    .course-meta {
        gap: 10px;
        font-size: 13px;
    }
    
    .course-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .course-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 15px 0;
    }
    
    .header-content h1 {
        font-size: 20px;
    }
    
    .category-tabs {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .category-tab {
        flex: 0 0 auto;
        min-width: 80px;
        text-align: center;
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .search-box input {
        font-size: 13px;
    }
    
    .course-card {
        padding: 12px;
    }
    
    .course-title {
        font-size: 15px;
    }
    
    .star {
        font-size: 28px;
    }
}
