/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding-bottom: 60px; /* 为底部导航留出空间 */
}

a {
    text-decoration: none;
    color: #007bff;
}

a:hover {
    color: #0056b3;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 0;
    margin-bottom: 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* 轮播广告 */
.carousel {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.carousel-item img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
}

.carousel-control-prev,
.carousel-control-next {
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* APP列表 */
.app-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.app-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 -5px;
}

.app-item {
    width: 48%;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.app-item:hover {
    transform: translateY(-5px);
}

.app-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    border-radius: 15px;
    object-fit: contain;
}

.app-name {
    font-size: 14px;
    margin-bottom: 10px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-btn {
    display: block;
    background: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    transition: background 0.3s ease;
}

.download-btn:hover {
    background: #0069d9;
    color: white;
}

/* 视频列表 */
.video-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.video-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
}

.video-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 比例 */
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.video-info {
    padding: 10px;
}

.video-title {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
}

/* 底部广告 */
.bottom-ad {
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.bottom-ad img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}

/* 悬浮广告 */
.float-ad {
    position: fixed;
    z-index: 1000;
    transition: all 0.3s ease;
}

.float-ad.left {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.float-ad.right {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.float-ad img {
    width: 60px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.float-ad:hover {
    transform: translateY(-50%) scale(1.05);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 5px 0;
}

.nav-items {
    display: flex;
    justify-content: space-around;
}

.nav-item {
    text-align: center;
    padding: 5px 0;
    flex: 1;
}

.nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 3px;
}

.nav-item span {
    font-size: 12px;
}

.nav-item.active a {
    color: #007bff;
}

/* 分页 */
.pagination {
    margin: 20px 0;
    justify-content: center;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.page-link {
    color: #007bff;
}

/* 视频播放页 */
.video-player-container {
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.video-details {
    padding: 15px;
    background: #fff;
}

.video-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.video-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.back-btn {
    margin-bottom: 20px;
}

/* 响应式调整 */
@media (min-width: 768px) {
    .app-item {
        width: 23%;
    }
    
    .video-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .carousel-item img {
        max-height: 300px;
    }
    
    .float-ad img {
        width: 80px;
    }
}

@media (min-width: 992px) {
    .video-list {
        grid-template-columns: repeat(4, 1fr);
    }
}