/* 全局重置 & 基础变量 */
:root {
    /* 暗黑模式变量 */
    --bg-primary: #121212;
    --bg-secondary: #1E1E1E;
    --text-primary: #FFFFFF;
    --text-secondary: #CCCCCC;
    --accent-primary: #9D4EDD;
    --accent-secondary: #38B000;
    --accent-tertiary: #FF7D00;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.light-mode {
    --bg-primary: #F9F9F9;
    --bg-secondary: #FFFFFF;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-primary: #7B2CBF;
    --accent-secondary: #2E8B57;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", "PingFang SC", sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* 模式切换按钮 */
.mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--accent-primary);
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: var(--shadow);
}

.mode-toggle:hover {
    background-color: var(--accent-primary);
    color: var(--text-primary);
}

/* 顶部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    padding: 15px 0;
    border-bottom: 1px solid rgba(157, 78, 221, 0.2);
}

.light-mode .header {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(123, 44, 191, 0.2);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo h1 {
    color: var(--accent-primary);
    font-size: 24px;
    font-weight: 700;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav a {
    color: var(--text-secondary);
    font-size: 15px;
    position: relative;
}

.main-nav a.active, .main-nav a:hover {
    color: var(--accent-primary);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-primary);
    border-radius: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    padding: 8px 15px;
    width: 250px;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
}

.search-box button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
}

.search-box button:hover {
    color: var(--accent-primary);
}

.quick-entry {
    background-color: var(--accent-primary);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.quick-entry:hover {
    background-color: #7B2CBF;
    transform: translateY(-2px);
}

/* 首屏Banner */
.hero-banner {
    height: 100vh;
    position: relative;
    overflow: hidden;
    margin-top: -70px;
    display: flex;
    align-items: center;
}

.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.banner-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.2));
}

.banner-content {
    position: relative;
    z-index: 2;
    padding-top: 70px;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #fff;
    line-height: 1.2;
}

.banner-content p {
    font-size: 20px;
    color: #eee;
    margin-bottom: 30px;
    max-width: 600px;
}

.banner-btns {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
}

.primary-btn {
    background-color: var(--accent-primary);
    color: #fff;
}

.primary-btn:hover {
    background-color: #7B2CBF;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(157, 78, 221, 0.3);
}

.secondary-btn {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.night-tag {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
    display: inline-block;
    color: var(--accent-secondary);
    font-size: 14px;
}

/* 主要内容区通用样式 */
.main-content {
    padding: 50px 0;
}

.section {
    margin-bottom: 80px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-primary);
}

.section-header h3 {
    font-size: 24px;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.scroll-controls {
    display: flex;
    gap: 10px;
}

.scroll-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-btn:hover {
    background-color: var(--accent-primary);
    color: #fff;
}

/* 横向滚动容器 */
.scroll-container {
    overflow: hidden;
    position: relative;
}

.card-list {
    display: flex;
    gap: 25px;
    transition: transform 0.5s ease;
    padding: 5px 0;
}

/* 影片卡片样式 */
.movie-card {
    min-width: 300px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(157, 78, 221, 0.2);
}

.card-poster {
    position: relative;
    height: 450px;
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duration-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(18, 18, 18, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
}

.night-tag-small {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-secondary);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
}

.card-info {
    padding: 20px;
}

.card-info h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.score {
    color: var(--accent-tertiary);
    font-weight: 700;
}

.type {
    color: var(--text-secondary);
}

.play-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background-color: var(--accent-primary);
    color: #fff;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
}

.play-btn:hover {
    background-color: #7B2CBF;
}

/* 通宵专区样式 */
.night-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
}

.night-card {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
}

.night-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.night-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.8));
    color: #fff;
    padding: 20px;
    text-align: center;
}

.big-card {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    height: 500px;
}

.small-card {
    height: 240px;
}

.night-card-overlay h4 {
    font-size: 24px;
    margin-bottom: 10px;
}

.big-card .night-card-overlay h4 {
    font-size: 32px;
}

.night-card-overlay p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.small-btn {
    width: auto;
    padding: 8px 20px;
    font-size: 12px;
}

/* 关于夜猫样式 */
.about-content {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.contact-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

/* 页脚样式 */
.footer {
    background-color: var(--bg-secondary);
    padding: 40px 0;
    border-top: 1px solid var(--accent-primary);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.copyright {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #7B2CBF;
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .night-grid {
        grid-template-columns: 1fr 1fr;
    }
    .big-card {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
        height: 300px;
    }
    .small-card {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .header-left {
        gap: 15px;
    }
    .main-nav {
        display: none;
    }
    .search-box {
        width: 180px;
    }
    .quick-entry {
        padding: 8px 12px;
        font-size: 12px;
    }
    .banner-content h2 {
        font-size: 32px;
    }
    .banner-content p {
        font-size: 16px;
    }
    .night-grid {
        grid-template-columns: 1fr;
    }
    .big-card {
        grid-column: 1 / 2;
        height: 250px;
    }
    .small-card {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .header-right {
        gap: 10px;
    }
    .search-box {
        width: 140px;
        padding: 6px 10px;
    }
    .quick-entry {
        display: none;
    }
    .banner-content h2 {
        font-size: 24px;
    }
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    .movie-card {
        min-width: 250px;
    }
    .card-poster {
        height: 375px;
    }
}