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

:root {
    --primary-color: #2563eb;
    --secondary-color: #f8fafc;
    --background-color: #ffffff;
    --card-bg: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --accent-color: #f59e0b;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 头部样式 */
.header {
    padding: 60px 0 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-accent {
    color: var(--primary-color);
    -webkit-text-fill-color: var(--primary-color);
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* 主内容区 */
.main-content {
    padding: 20px 0 80px;
}

/* 电影排行榜样式 */
.ranking-section {
    margin-top: 40px;
    width: 100%;
}

/* 返回按钮 */
.back-link {
    margin-bottom: 24px;
}

.btn-back {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    font-size: 14px;
}

.btn-back:hover {
    background: #1d4ed8;
    transform: translateX(-4px);
}

/* 电影详情布局 */
.movie-detail-section {
    margin-top: 40px;
}

.movie-detail-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 60px;
    align-items: start;
}

/* 左侧海报区域 */
.movie-detail-left {
    position: relative;
}

.movie-poster-large {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.movie-poster-large:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.detail-poster {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* 右侧信息区域 */
.movie-detail-right {
    position: relative;
}

/* 排名和评分 */
.movie-top-info {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 24px;
}

.rank-large {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}

.movie-rating-large {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-score-large {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.rating-votes-large {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 电影标题 */
.movie-title-large {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.movie-original-title {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 32px;
}

/* 电影基本信息 */
.movie-meta-large {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
    padding: 24px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    gap: 12px;
}

.meta-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
    flex-shrink: 0;
}

.meta-value {
    color: var(--text-secondary);
    flex: 1;
}

.meta-value a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.meta-value a:hover {
    text-decoration: underline;
}

/* 网盘链接按钮 */
.movie-link-section {
    margin-bottom: 40px;
}

.btn-pan {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-pan:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* 剧情简介 */
.movie-synopsis {
    margin-bottom: 60px;
    padding: 32px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

/* 获奖情况 */
.movie-awards {
    margin-bottom: 60px;
    padding: 32px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    border-radius: 2px;
}

.synopsis-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.awards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.award-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.award-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.award-category {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 相关推荐 */
.related-movies-section {
    margin-top: 60px;
}

/* 电影网格布局 */
.movies-grid {
    display: grid;
    gap: 24px;
    margin-top: 32px;
    grid-auto-rows: 1fr;
    align-items: start;
}

/* 响应式设计 */
@media (min-width: 1200px) {
    .movies-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 28px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    /* 电影详情响应式 */
    .movie-detail-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .movie-poster-large {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .movies-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* 电影详情响应式 */
    .movie-detail-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .movie-top-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .rating-score-large {
        font-size: 28px;
    }
    
    .movie-title-large {
        font-size: 1.75rem;
    }
    
    .movie-meta-large {
        padding: 16px;
    }
    
    .movie-synopsis,
    .movie-awards {
        padding: 20px;
    }
    
    .btn-pan {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
}

/* 电影卡片样式 */
.movie-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
    height: 100%;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.movie-card:nth-child(1) { animation-delay: 0.1s; }
.movie-card:nth-child(2) { animation-delay: 0.2s; }
.movie-card:nth-child(3) { animation-delay: 0.3s; }
.movie-card:nth-child(4) { animation-delay: 0.4s; }
.movie-card:nth-child(5) { animation-delay: 0.5s; }
.movie-card:nth-child(6) { animation-delay: 0.6s; }
.movie-card:nth-child(7) { animation-delay: 0.7s; }
.movie-card:nth-child(8) { animation-delay: 0.8s; }
.movie-card:nth-child(9) { animation-delay: 0.9s; }
.movie-card:nth-child(10) { animation-delay: 1s; }

/* 排名标记 */
.rank {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    z-index: 10;
    transition: var(--transition);
}

.movie-card:hover .rank {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* 电影海报容器 */
.poster-container {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
}

/* 电影海报 */
.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.movie-card:hover .movie-poster {
    transform: scale(1.05);
}

/* 渐变遮罩 */
.poster-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(transparent, var(--card-bg));
    pointer-events: none;
}

/* 电影信息 */
.movie-info {
    padding: clamp(1rem, 2vw, 1.25rem);
    position: relative;
}

.movie-title {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.movie-original-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    font-style: italic;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-tertiary);
    flex-wrap: wrap;
}

.movie-director {
    font-weight: 500;
    color: var(--text-secondary);
}

.movie-stars {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.movie-year {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.movie-country-genre {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.movie-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 评分样式 */
.movie-rating {
    display: flex;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.rating-votes {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0 auto;
}

/* 评分显示在年份旁边的样式 */
.movie-meta .rating-score {
    background: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    display: inline-block;
    min-width: auto;
}

.rating-stars {
    display: none;
}

.movie-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.movie-link:hover {
    text-decoration: none;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 14px;
    background: var(--secondary-color);
}

.footer-text {
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 1199px) {
    .container {
        padding: 0 20px;
    }
    
    .movies-grid {
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .title {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }
    
    .subtitle {
        font-size: clamp(0.9rem, 1.8vw, 1rem);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header {
        padding: 32px 0 24px;
        text-align: left;
    }
    
    .header-content {
        max-width: 100%;
    }
    
    .title {
        font-size: 2.25rem;
        line-height: 1.2;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 16px 0 60px;
    }
    
    .ranking-section {
        margin-top: 24px;
    }
    
    .movies-grid {
        gap: 20px;
        margin-top: 20px;
    }
    
    .movie-card {
        border-radius: 12px;
        display: flex;
        flex-direction: row;
        height: 180px;
    }
    
    .rank {
        width: 36px;
        height: 36px;
        font-size: 16px;
        top: 12px;
        left: 12px;
    }
    
    .poster-container {
        aspect-ratio: auto;
        width: 120px;
        height: 100%;
    }
    
    .movie-info {
        padding: 16px;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .movie-title {
        font-size: 18px;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }
    
    .movie-meta {
        gap: 10px;
        margin-bottom: 8px;
        font-size: 13px;
        flex-wrap: wrap;
    }
    
    .movie-director {
        font-size: 13px;
        margin-bottom: 6px;
        -webkit-line-clamp: 1;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }
    
    .movie-year {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .movie-description {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 10px;
        -webkit-line-clamp: 2;
    }
    
    .movie-rating {
        padding-top: 10px;
    }
    
    /* 隐藏部分信息以适配平板屏幕 */
    .movie-stars {
        display: none;
    }
    
    .movie-original-title {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .movie-country-genre {
        font-size: 12px;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .header {
        padding: 24px 0 16px;
    }
    
    .title {
        font-size: 1.875rem;
    }
    
    .subtitle {
        font-size: 0.875rem;
    }
    
    .main-content {
        padding: 12px 0 40px;
    }
    
    .movies-grid {
        gap: 16px;
        margin-top: 16px;
    }
    
    .movie-card {
        border-radius: 10px;
        display: flex;
        flex-direction: row;
        height: 150px;
    }
    
    .rank {
        width: 30px;
        height: 30px;
        font-size: 13px;
        top: 8px;
        left: 8px;
    }
    
    .poster-container {
        aspect-ratio: auto;
        width: 90px;
        height: 100%;
    }
    
    .movie-info {
        padding: 12px;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .movie-title {
        font-size: 15px;
        margin-bottom: 4px;
        -webkit-line-clamp: 2;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }
    
    .movie-original-title {
        display: none;
    }
    
    .movie-director {
        font-size: 11px;
        margin-bottom: 4px;
        -webkit-line-clamp: 1;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }
    
    .movie-stars {
        display: none;
    }
    
    .movie-meta {
        gap: 6px;
        margin-bottom: 6px;
        font-size: 11px;
        flex-wrap: wrap;
    }
    
    .movie-country-genre {
        display: none;
    }
    
    .movie-year {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .movie-description {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }
    
    .movie-rating {
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
    }
    
    .rating-votes {
        display: none;
    }
    
    .footer {
        padding: 24px 0;
        margin-top: 32px;
    }
    
    .footer-text {
        font-size: 12px;
    }
    
    .footer-text a {
        color: inherit;
        text-decoration: none;
        transition: text-decoration 0.3s ease;
    }
    
    .footer-text a:hover {
        text-decoration: underline;
    }
}