/* 基础样式重置与全局设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background-color: #0d0d12;
    color: #ffffff;
    padding-top: 180px; /* 适配顶部固定区域高度 */
    padding-bottom: 70px; /* 适配底部5个导航项高度 */
    min-width: 320px;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 错误提示弹窗样式 */
.error-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -100%);
    background-color: rgba(255, 59, 48, 0.9);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    z-index: 9999;
    transition: transform 0.3s ease;
    font-size: 14px;
}

.error-toast.show {
    transform: translate(-50%, 0);
}

/* 顶部固定区域样式 */
.header.fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #161b28;
    z-index: 999;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* 顶部长条轮播 */
.top-carousel {
    width: 100%;
    height: 40px;
    position: relative;
    overflow: hidden;
    background-color: #0f141f;
}

.top-carousel .carousel-container {
    width: 100%;
    height: 100%;
    display: flex;
}

.top-carousel .carousel-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: none;
}

.top-carousel .carousel-slide.active {
    display: block;
}

.top-carousel .carousel-link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-carousel .carousel-img {
    height: 100%;
    object-fit: contain;
    max-width: 90%;
}

.top-carousel .carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background-color 0.2s;
}

.top-carousel .carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.top-carousel .prev {
    left: 5px;
}

.top-carousel .next {
    right: 5px;
}

.top-carousel .carousel-indicators {
    position: absolute;
    bottom: 5px;
    right: 10px;
    display: flex;
    gap: 3px;
}

.top-carousel .indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    transition: background-color 0.2s;
}

.top-carousel .indicator.active {
    background-color: #4cc9f0;
}

/* 导航栏 */
.nav-bar {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
    background-color: #1e293b;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #4cc9f0;
    text-shadow: 0 0 10px rgba(76, 201, 240, 0.4);
}

.search-box {
    width: 45%;
    height: 38px;
    display: flex;
    background-color: #334155;
    border-radius: 19px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.search-box:focus-within {
    box-shadow: 0 0 0 2px rgba(76, 201, 240, 0.3);
}

.search-box input {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    padding: 0 20px;
    color: #fff;
    outline: none;
    font-size: 14px;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-box button {
    width: 45px;
    height: 100%;
    background-color: #4cc9f0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.search-box button:hover {
    background-color: #22d3ee;
}

.user-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
}

.user-vip {
    color: #facc15;
    font-size: 11px;
    margin-top: 2px;
    display: inline-block;
}

.user-vip.vip {
    color: #fb923c;
    font-weight: bold;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

/* 分类标签 */
.category-tabs {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    overflow-x: auto;
    padding: 0 15px;
    gap: 15px;
    scrollbar-width: none;
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 6px 14px;
    font-size: 15px;
    white-space: nowrap;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.25s;
}

.tab:hover {
    color: #e2e8f0;
    background-color: rgba(76, 201, 240, 0.1);
}

.tab.active {
    color: #fff;
    background-color: #4cc9f0;
}

/* 主内容区样式 */
.content {
    width: 100%;
}

/* 大型轮播广告位 */
.big-carousel {
    width: 96%;
    height: 220px;
    margin: 20px auto;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.big-carousel .carousel-container {
    width: 100%;
    height: 100%;
    display: flex;
}

.big-carousel .carousel-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: none;
}

.big-carousel .carousel-slide.active {
    display: block;
}

.big-carousel .carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 15px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.big-carousel .carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    opacity: 0;
}

.big-carousel:hover .carousel-control {
    opacity: 1;
}

.big-carousel .carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.big-carousel .prev {
    left: 15px;
}

.big-carousel .next {
    right: 15px;
}

.big-carousel .carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.big-carousel .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    transition: all 0.2s;
}

.big-carousel .indicator.active {
    background-color: #4cc9f0;
    width: 28px;
    border-radius: 4px;
}

/* 5个方格广告 */
.small-ads {
    width: 96%;
    margin: 0 auto 25px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.small-ad-item {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s, box-shadow 0.25s;
}

.small-ad-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* 影片分类区域 */
#movieSectionsContainer {
    width: 100%;
    padding-bottom: 20px;
}

.movie-section {
    width: 96%;
    margin: 0 auto 35px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #e2e8f0;
}

.section-tag {
    padding: 3px 10px;
    background-color: #4cc9f0;
    border-radius: 6px;
    font-size: 15px;
    margin-right: 5px;
}

.section-buttons {
    display: flex;
    gap: 10px;
}

.section-buttons button {
    padding: 4px 14px;
    border-radius: 15px;
    font-size: 13px;
    transition: all 0.2s;
}

.change-btn {
    background-color: #334155;
}

.change-btn:hover {
    background-color: #475569;
}

.more-btn {
    background-color: #4cc9f0;
}

.more-btn:hover {
    background-color: #22d3ee;
}

.action-movies {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.movie-card {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s, box-shadow 0.25s;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.movie-card.large-card {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: 16/9;
}

.movie-card.small-card {
    aspect-ratio: 2/3;
}

.movie-link {
    display: block;
    width: 100%;
    height: 100%;
}

.movie-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.section-ad {
    width: 100%;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.section-ad-img {
    object-fit: cover;
}

/* 底部导航（5个导航项版本） */
.footer.fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: #1e293b;
    color: #94a3b8;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    font-size: 12px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4);
    z-index: 998;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 20%;
    height: 100%;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item i {
    font-size: 20px;
}

.nav-item.active {
    color: #4cc9f0;
}

.nav-item:hover {
    color: #e2e8f0;
}

/* 响应式适配（适配不同屏幕尺寸） */
@media (max-width: 1024px) {
    .big-carousel {
        height: 200px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 160px;
    }
    
    .search-box {
        width: 40%;
    }
    
    .big-carousel {
        height: 170px;
    }
    
    .action-movies {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .movie-card.large-card {
        grid-column: span 3;
        grid-row: span 1;
    }
    
    .small-ads {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 140px;
        padding-bottom: 65px;
    }
    
    .nav-bar {
        height: 55px;
        padding: 0 12px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .search-box {
        width: 45%;
        height: 34px;
    }
    
    .search-box input {
        padding: 0 12px;
        font-size: 13px;
    }
    
    .user-info {
        display: none;
    }
    
    .avatar {
        width: 32px;
        height: 32px;
    }
    
    .category-tabs {
        height: 40px;
        gap: 12px;
        padding: 0 10px;
    }
    
    .tab {
        padding: 5px 12px;
        font-size: 14px;
    }
    
    .big-carousel {
        height: 140px;
        margin: 15px auto;
    }
    
    .big-carousel .carousel-caption {
        font-size: 14px;
        padding: 15px 10px 8px;
    }
    
    .small-ads {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .action-movies {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .movie-card.large-card {
        grid-column: span 2;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .footer.fixed-bottom {
        height: 60px;
    }
    
    .nav-item i {
        font-size: 18px;
    }
}

@media (max-width: 375px) {
    .search-box {
        width: 40%;
    }
    
    .small-ads {
        gap: 6px;
    }
    
    .section-buttons button {
        padding: 3px 10px;
        font-size: 12px;
    }
}