
/* 全局变量 - 深色影院风格 */
:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #e50914; /* Netflix红 */
    --text-main: #ffffff;
    --text-secondary: #b3b3b3;
    --accent-gold: #f5c518; /* IMDb金 */
    --border-radius: 8px;
    --font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.cinema-header {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.main-nav a {
    margin: 0 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.main-nav a:hover, .main-nav a.active {
    color: var(--text-main);
}

.user-actions {
    display: flex;
    align-items: center;
    background: #333;
    padding: 5px 15px;
    border-radius: 20px;
}

.user-actions input {
    border: none;
    background: transparent;
    color: var(--text-main);
    outline: none;
    width: 120px;
    font-size: 0.9rem;
}

.search-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

/* 英雄区域 */
.hero-section {
    padding: 60px 0;
    background: linear-gradient(to right, #121212 40%, rgba(18, 18, 18, 0.8)), url('https://picsum.photos/seed/space-bg/1200/600') no-repeat center right;
    background-size: cover;
}

.hero-layout {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-info {
    flex: 1;
}

.tag.featured {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.hero-info h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.rating {
    color: var(--accent-gold);
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.synopsis {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.1rem;
    max-width: 600px;
}

.hero-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn-watch {
    padding: 12px 30px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: bold;
}

.btn-watch:hover {
    background: #f40612;
}

.btn-trailer {
    padding: 12px 30px;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: bold;
    backdrop-filter: blur(5px);
}

.btn-trailer:hover {
    background: rgba(255,255,255,0.3);
}

.hero-poster {
    flex: 0 0 300px;
}

.hero-poster img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: rotate(3deg);
    transition: transform 0.3s;
}

.hero-poster img:hover {
    transform: rotate(0deg) scale(1.02);
}

/* 电影网格 */
.movies-section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 1.8rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
}

.more-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.movie-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.card-image {
    position: relative;
    height: 330px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.movie-card:hover .card-image img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.movie-card:hover .overlay {
    opacity: 1;
}

.play-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-info {
    padding: 15px;
}

.card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.genre {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.score {
    color: var(--accent-gold);
    font-weight: bold;
}

.date {
    color: #666;
}

/* 排行榜 */
.ranking-section {
    padding: 60px 0;
    background: #181818;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rank-item {
    display: flex;
    align-items: center;
    background: var(--surface-color);
    padding: 15px;
    border-radius: var(--border-radius);
    transition: background 0.3s;
}

.rank-item:hover {
    background: #252525;
}

.rank-num {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    width: 50px;
    text-align: center;
}

.rank-item img {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 20px;
}

.rank-info {
    flex: 1;
}

.rank-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.rank-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.rank-score {
    color: var(--accent-gold);
    font-weight: bold;
}

.btn-detail {
    padding: 8px 20px;
    border: 1px solid var(--text-secondary);
    border-radius: 20px;
    font-size: 0.9rem;
}

.btn-detail:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 页脚 */
.site-footer {
    background: #000;
    padding: 60px 0 20px;
    color: var(--text-secondary);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--text-main);
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.85rem;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }

    .main-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .hero-layout {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-poster {
        flex: 0 0 auto;
        width: 200px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-meta {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
