/* 猫眼电影网站样式 - index.css */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f5f5f5;
    min-width: 1200px;
}

a {
    text-decoration: none;
    color: #333;
}

ul, li {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* 通用容器 */
.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部导航栏 */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    height: 80px;
}

.logo {
    margin-right: 40px;
}

.logo img {
    height: 40px;
}

.main-nav ul {
    display: flex;
    align-items: center;
}

.main-nav li {
    margin: 0 20px;
    font-size: 16px;
    position: relative;
}

.main-nav li.active a {
    color: #FF4D64;
    font-weight: bold;
}

.main-nav li.city-select {
    margin-right: 30px;
}

.user-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.user-actions a {
    margin-left: 20px;
    font-size: 15px;
}

.app-download .fa-mobile {
    font-size: 20px;
    margin-left: 5px;
}

/* 主要内容区 */
.site-main {
    padding: 30px 0;
}

.main-content {
    display: flex;
    justify-content: space-between;
}

.content-left {
    width: 70%;
}

.content-right {
    width: 28%;
}

/* 电影区块 */
.movie-section {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
}

.section-header h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background-color: #FF4D64;
    margin-right: 8px;
    border-radius: 2px;
}

/* 左侧内容区标题 */
.now-playing .section-header h2,
.coming-soon .section-header h2 {
    font-size: 22px;
    color: #ef4238; /* 猫眼红色 */
    letter-spacing: 1px;
}

/* 右侧排行榜标题 */
.box-office .section-header h2 {
    font-size: 16px;
    color: #ef4238; /* 猫眼红色 */
    letter-spacing: 0.5px;
}

.most-expected .section-header h2 {
    font-size: 16px;
    color: #ffb400; /* 金黄色 */
    letter-spacing: 0.5px;
}

.top-100 .section-header h2 {
    font-size: 16px;
    color: #ffb400; /* 金黄色 */
    letter-spacing: 0.5px;
}

/* 标题前装饰线颜色 */
.now-playing .section-header h2::before,
.coming-soon .section-header h2::before,
.box-office .section-header h2::before {
    background-color: #ef4238; /* 猫眼红色 */
}

.most-expected .section-header h2::before,
.top-100 .section-header h2::before {
    background-color: #ffb400; /* 金黄色 */
}

.section-header .count {
    font-size: 14px;
    color: #999;
    font-weight: normal;
    margin-left: 5px;
}

.section-header .more {
    color: #999;
    font-size: 14px;
}

.section-header .more:hover {
    color: #FF4D64;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 电影卡片 */
.movie-card {
    position: relative;
    transition: transform 0.3s;
    display: block;
    text-decoration: none;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-card .poster {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
    width: 180px;
}

.movie-card .poster img {
    width: 100%;
    display: block;
    /* aspect-ratio: 2/3; */
    /* object-fit: cover; */
    /* width: 170px; */
    height: 255px;
}

.movie-card .score {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(255, 189, 0, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 12px;
}

.movie-card .wish-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(255, 77, 100, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.movie-card .title {
    font-size: 16px;
    margin: 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 180px;
}

.movie-card .btn-buy {
    display: inline-block;
    background-color: #FF4D64;
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.movie-card .release-date {
    color: #999;
    font-size: 13px;
}

/* 排行榜区域 */
.ranking-section {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ranking-list {
    margin-bottom: 15px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item .rank {
    width: 24px;
    height: 24px;
    background-color: #f5f5f5;
    color: #999;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-weight: bold;
}

.ranking-item.top .rank {
    background-color: #FF4D64;
    color: #fff;
}

.ranking-item .info {
    flex: 1;
    display: flex;
    align-items: center;
}

.ranking-item .info h3 {
    font-size: 15px;
    margin-bottom: 5px;
}

.ranking-item .info .data,
.ranking-item .info .score,
.ranking-item .info .wish {
    color: #FFBD00;
    font-size: 13px;
}

.ranking-item .poster {
    width: 60px;
    height: 80px;
    margin-right: 10px;
    border-radius: 3px;
    overflow: hidden;
}

.ranking-item .detail {
    flex: 1;
}

.ranking-item .release {
    color: #999;
    font-size: 12px;
    margin-bottom: 5px;
}

/* 票房总计 */
.total-box-office {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
}

.total-box-office .title {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.total-box-office .amount {
    font-size: 28px;
    font-weight: bold;
    color: #FF4D64;
    margin-bottom: 5px;
}

.total-box-office .unit {
    font-size: 14px;
    font-weight: normal;
}

.total-box-office .compare {
    font-size: 12px;
    color: #999;
}

.total-box-office .up {
    color: #FF4D64;
}

.total-box-office .down {
    color: #4CAF50;
}

/* 底部信息 */
.site-footer {
    background-color: #2d2d2d;
    color: #999;
    padding: 30px 0;
    font-size: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-links a {
    color: #999;
    margin: 0 15px;
}

.footer-links a:hover {
    color: #ccc;
}

.footer-info {
    text-align: center;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-certificates {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-certificates img {
    height: 30px;
}

/* 响应式设计 */
@media screen and (min-width: 1600px) {
    .container {
        width: 1540px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media screen and (min-width: 1920px) {
    .container {
        width: 1860px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .content-left {
        width: 75%;
    }
    
    .content-right {
        width: 23%;
    }
}
