@charset "utf-8";

body {
    background-color: #f4f4f4;
    font-size: 14px;
}

.am-container {
    max-width: 1200px;
}

/* 顶部导航栏背景色 */
.am-topbar {
    background: #fff;
}
/* 左上角站标颜色 */
.web-name {
    color: #6D7C84!important;
}

/* 顶部观看记录 */
@media only screen and (max-width: 640px) {
    .am-dropdown {
        display: block;
    }
}

.am-slides {
    background-color: #000;
}

/* 幻灯片美化样式 */
.am-slider-d2 {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    position: relative;
}

/* 确保 viewport 和 slides 容器都隐藏溢出 */
.am-slider-d2 .am-viewport {
    overflow: hidden !important;
    position: relative;
}

.am-slider-d2 .am-slides {
    overflow: hidden !important;
    position: relative;
}

.am-slider-d2 .am-slides li {
    position: relative;
    overflow: hidden;
    /* 先隐藏所有幻灯片，避免初始化前全部同时闪现 */
    display: none;
}

/* 默认只显示第一张，等 AmazeUI / FlexSlider 初始化后再接管显示逻辑 */
.am-slider-d2 .am-slides li:first-child {
    display: block;
}

.am-slider-d2 .am-slides img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.am-slider-d2:hover .am-slides img {
    transform: scale(1.05);
}

/* 幻灯片描述区域美化 */
.am-slider-desc {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    padding: 30px 20px 20px;
    color: #fff;
}

.am-slider-content {
    margin-bottom: 15px;
}

.am-slider-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.am-slider-desc p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 立即观看按钮美化 */
.am-slider-more {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border: none;
}

.am-slider-more:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: #fff !important;
}

.am-slider-more:active {
    transform: translateY(0);
}

/* 幻灯片指示器美化 */
.am-slider-d2 .am-control-nav {
    bottom: 15px;
    z-index: 10;
}

.am-slider-d2 .am-control-nav li a {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.am-slider-d2 .am-control-nav li a:hover,
.am-slider-d2 .am-control-nav li a.am-active {
    background: #fff;
    border-color: #fff;
    transform: scale(1.2);
}

/* 响应式优化 */
@media only screen and (max-width: 640px) {
    .am-slider-title {
        font-size: 20px;
    }
    
    .am-slider-desc {
        padding: 20px 15px 15px;
    }
    
    .am-slider-desc p {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }
    
    .am-slider-more {
        padding: 8px 20px;
        font-size: 12px;
    }
    
    .am-slider-d2 .am-control-nav {
        bottom: 10px;
    }
    
    .am-slider-d2 .am-control-nav li a {
        width: 10px;
        height: 10px;
    }
}

@media only screen and (max-width: 480px) {
    .am-slider-title {
        font-size: 18px;
    }
    
    .am-slider-desc {
        padding: 15px 10px 10px;
    }
}

/* 方向导航按钮美化 */
.am-slider-d2 .am-direction-nav a {
    width: 50px;
    height: 50px;
    line-height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    opacity: 0.8;
}

.am-slider-d2:hover .am-direction-nav a {
    opacity: 1;
}

.am-slider-d2 .am-direction-nav a:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.am-slider-d2 .am-direction-nav .am-prev,
.am-slider-d2 .am-direction-nav .am-next {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media only screen and (max-width: 640px) {
    .am-slider-d2 .am-direction-nav a {
        width: 40px;
        height: 40px;
        line-height: 40px;
    }
}

/* 标题栏统一样式 - 确保左右对齐 */
.am-titlebar-default {
    margin-left: 0;
    margin-right: 0;
    margin-top: 20px;
    margin-bottom: 0;
    padding: 12px 15px;
    background: linear-gradient(135deg, #2f80ed 0%, #56ccf2 100%);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    position: relative;
    overflow: hidden;
    min-height: 48px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* 每个区域（左侧或右侧）的第一个标题栏 */
.am-u-lg-9 > .am-titlebar-default:first-child {
    margin-top: 0;
}

/* 右侧第一个标题栏 */
.am-u-lg-3 > .am-titlebar-default:first-child {
    margin-top: 0;
}

.am-titlebar-default::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.am-titlebar-default .am-titlebar-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    padding: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

/* 隐藏标题栏的 before 伪元素 */
.am-titlebar-default .am-titlebar-title::before {
    display: none !important;
    content: none !important;
}

/* 响应式调整 */
@media only screen and (max-width: 640px) {
    .am-titlebar-default {
        padding: 10px 12px;
        margin-top: 15px;
        min-height: 44px;
    }
    
    .am-titlebar-default .am-titlebar-title {
        font-size: 14px;
    }
    
    .am-titlebar-default .am-titlebar-title::before {
        display: none !important;
        content: none !important;
    }
}

.friend-links>div>a {
    margin-right: 10px;
}

/* 电影展示块 */
.movie-description, .movie-title, .movie-tags, .right-list li a {
    transition: all 0.5s ease;
    -webkit-transition: all 0.5s ease;
    -moz-transition: all 0.5s ease;
    -o-transition: all 0.5s ease;
    -ms-transition: all 0.5s ease;
}
.movie-item {
    display: block;
    width: 100%;
    max-width: 178px;
    height: auto;
    cursor: pointer;
    margin: 10px auto;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.movie-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}
.movie-cover {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}
.movie-cover>img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}
.movie-item:hover .movie-cover>img {
    transform: scale(1.05);
}
/* 电影列表：448x670 (宽高比约 0.67:1，竖向) */
.movie-lists .movie-item {
    max-width: 178px;
}
.movie-lists .movie-cover {
    /* 保持电影竖向比例：670/448 ≈ 1.495 */
    padding-bottom: 149.5%;
    height: 0;
    position: relative;
}
.movie-lists .movie-cover>img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.movie-description {
    position: absolute;
    width: 100%;
    bottom: 0;
    height: auto;
    min-height: 60px;
    padding: 8px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
}
.movie-description>.description-bg {
    display: none;
}
.movie-description>p {
    height: auto;
    min-height: 20px;
    line-height: 20px;
    overflow: hidden;
    margin: 2px 10px;
    color: #fff;
    font-size: 11px;
    position: relative;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.movie-item:hover .movie-description {
    opacity: 1;
}
.movie-title {
    background-color: #fff;
    width: 100%;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s ease;
}
.movie-item:hover>.movie-title {
    background-color: #f60;
    color: #fff;
}
.movie-item:hover>.movie-title>.movie-name {
    color: #fff;
}
.movie-title>p {
    font-size: 14px;
    padding: 0 10px;
    margin: 0;
    height: auto;
    min-height: 22px;
    line-height: 22px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.movie-title>.movie-tags {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    height: auto;
    min-height: 18px;
    line-height: 18px;
}
.movie-item:hover>.movie-title>.movie-tags {
    color: rgba(255, 255, 255, 0.9);
}

/* 隐藏规则仅应用于首页（.index-container），筛选页不受影响 */
/* iPad端：电影列表隐藏最后两条数据 */
@media only screen and (min-width: 640px) and (max-width: 1025px) {
    .index-container .movie-lists li:nth-last-child(2),
    .index-container .movie-lists li:nth-last-child(1) {
        display: none!important;
    }
    
    .index-container .tv-lists li:nth-child(19),.index-container .tv-lists li:nth-child(20) {
        display: none!important;
    }
}

/* 手机端：所有列表各隐藏最后一条数据 */
/* 电影列表 */
@media only screen and (max-width: 640px) {
    .index-container .movie-lists li:nth-last-child(1) {
        display: none!important;
    }
    
    /* 电视剧列表（第一个tv-lists） */
    .index-container .am-u-lg-9 > .am-titlebar-default:nth-of-type(2) + .tv-lists li:nth-last-child(1) {
        display: none!important;
    }
    
    /* 综艺列表（第二个tv-lists） */
    .index-container .am-u-lg-9 > .am-titlebar-default:nth-of-type(3) + .tv-lists li:nth-last-child(1) {
        display: none!important;
    }
    
    /* 动漫列表（第三个tv-lists） */
    .index-container .am-u-lg-9 > .am-titlebar-default:nth-of-type(4) + .tv-lists li:nth-last-child(1) {
        display: none!important;
    }
    
    /* 儿童列表（第四个tv-lists） */
    .index-container .am-u-lg-9 > .am-titlebar-default:nth-of-type(5) + .tv-lists li:nth-last-child(1) {
        display: none!important;
    }
}

/* 电视剧、综艺、动漫、儿童列表：500x353 (宽高比约 1.42:1，横向) */
.tv-lists .movie-item,
.variety-lists .movie-item,
.cartoon-lists .movie-item,
.kids-lists .movie-item { 
    height: auto;
}

.tv-lists .movie-cover,
.variety-lists .movie-cover,
.cartoon-lists .movie-cover,
.kids-lists .movie-cover {
    /* 保持横向比例：178 / 1.42 ≈ 125 */
    padding-bottom: 70.6%; /* 353/500 ≈ 0.706 */
    height: 0;
    position: relative;
}
.tv-lists .movie-cover>img,
.variety-lists .movie-cover>img,
.cartoon-lists .movie-cover>img,
.kids-lists .movie-cover>img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 右侧列表 */
.right-list {
    padding-left: 0;
    margin-top: 10px;
}
.right-list li {
    background-color: #fdfdfd;
    padding: 0 10px;
    list-style: none;
}
.right-list li a {
    display: block;
    line-height: 44px;
    color: #555;
}
.right-list li a:hover {
    color: #f60;
}

.right-list .r-l-right {
    float: right;
    font-size: 12px;
    color: #999;
    display: inline-block;
    margin-left: 10px;
}
/* 右侧列表排行 */
.right-list li:nth-child(1) .am-round {
    background-color: #dd514c;
}
.right-list li:nth-child(2) .am-round {
    background-color: #F37B1D;
}
.right-list li:nth-child(3) .am-round {
    background-color: #5eb95e;
}

/* 首页上次播放 */
#last-watch a {
    color: #DD514C;
}

/* 播放器盒子 */
.player-box {
    height: 600px;
    padding: 0;
    background: #000;
    position: relative;
}
.player-box.loading {
    background: #000 url(../i/loading.gif) no-repeat center;
}
.player-box.loading iframe {
    opacity: 0;
}
.player-box iframe {
    opacity: 1;
    transition: opacity 0.3s ease;
}
@media only screen and (max-width: 600px) {
    .player-box {
        height: 300px;
    }
}

/*弹动效果*/
.hover-bounce:hover {
    -webkit-animation:bounce 1s .1s ease both;
    -moz-animation:bounce 1s .1s ease both;
}
@-webkit-keyframes bounce {
    0% {
        -webkit-transform:scale(1)
    }
    10%, 20% {
        -webkit-transform:scale(0.8) rotate(-2deg)
    }
    30%, 50%, 70%, 90% {
        -webkit-transform:scale(1.1) rotate(2deg)
    }
    40%, 60%, 80% {
        -webkit-transform:scale(1.1) rotate(-2deg)
    }
    100% {
        -webkit-transform:scale(1) rotate(0)
    }
}

/* 底部导航栏 */ 
.am-navbar .am-navbar-nav, .am-navbar-default .am-navbar-actions {
    background-color: #fff;
    border-top: 1px solid #eee;
}

.am-navbar-default .am-navbar-actions a {
    border-bottom: 0;
}

.am-navbar-default a {
    color: #868686;
}
.am-navbar-nav a .am-navbar-label {
    padding-top: 4px;
}
@media only screen and (min-width: 640px) {
    .am-with-fixed-navbar {
        padding-bottom: 0;
    }
}