:root {
    --primary-color: #e50914;
    --secondary-color: #221f1f;
    --dark-bg: #141414;
    --light-bg: #f8f9fa;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --card-bg: #2f2f2f;
    --hover-color: #e50914;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 100%);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.navbar.scrolled {
    background: rgba(20, 20, 20, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-text {
    background: linear-gradient(135deg, #e50914 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

/* 搜索框 */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3);
}

.search-box i {
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 200px;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

/* Hero轮播区 */
.hero-section {
    margin-top: 70px;
    height: 80vh;
    min-height: 600px;
}

.hero-slide {
    height: 80vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-content .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

.hero-content h1 {
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.hero-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 1.1rem;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-actions .btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-actions .btn-primary {
    background: var(--primary-color);
    border: none;
}

.hero-actions .btn-primary:hover {
    background: #b20710;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(229, 9, 20, 0.4);
}

.hero-actions .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

/* 筛选栏 */
.filter-section {
    padding: 1.5rem 0;
    position: sticky;
    top: 70px;
    z-index: 999;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    padding: 0.55rem 1.3rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.filter-tab:hover,
.filter-tab:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

.filter-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.35);
}

.filter-dropdowns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.filter-select:hover,
.filter-select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.filter-select option {
    background: var(--secondary-color);
    color: var(--text-primary);
}

/* 电影列表区 */
.movies-section {
    padding: 4rem 0;
}

.bg-light-section {
    background: var(--secondary-color);
}

.movies-section.bg-light {
    background: var(--secondary-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2 i {
    color: var(--primary-color);
}

.view-more {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-more:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

/* 电影卡片 */
.movie-card {
    transition: all 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-10px);
}

.movie-poster {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 2/3;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.1);
}

.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.btn-play,
.btn-favorite {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-play:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.movie-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.movie-rating i {
    color: #ffc107;
}

.movie-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.movie-info {
    padding: 1rem 0;
}

.movie-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.movie-title a:hover {
    color: var(--primary-color);
}

.movie-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 页脚 */
.footer {
    background: var(--secondary-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer h5,
.footer h6 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* 下拉菜单文字 */
.dropdown-item {
    color: #fff !important;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.1) !important;
}

/* 深色主题下 Bootstrap 覆盖 */
.text-muted {
    color: var(--text-secondary) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #b20710 !important;
    border-color: #b20710 !important;
}

/* 分页 */
.pagination {
    margin-top: 2rem;
}

.page-link {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}

.page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    background: rgba(255,255,255,0.05);
    color: #666;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero-section { height: 60vh; min-height: 500px; }
    .hero-slide { height: 60vh; min-height: 500px; }
    .hero-content h1 { font-size: 2.5rem; }
    .movies-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.5rem; }
}

@media (max-width: 768px) {
    .navbar-brand { font-size: 1.5rem; }
    .search-box { width: 100%; margin-top: 1rem; }
    .search-box input { width: 100%; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content .lead { font-size: 1rem; }
    .hero-actions .btn { padding: 0.6rem 1.5rem; font-size: 0.9rem; }
    .filter-bar { flex-direction: column; gap: 1rem; }
    .filter-tabs, .filter-dropdowns { width: 100%; justify-content: center; }
    .movies-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (max-width: 576px) {
    .hero-section { height: 50vh; min-height: 400px; }
    .hero-slide { height: 50vh; min-height: 400px; }
    .hero-content { padding: 0 1rem; }
    .hero-content h1 { font-size: 1.5rem; }
    .movies-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 滚动条样式 */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #b20710; }

/* 加载动画 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.loading { animation: pulse 1.5s ease-in-out infinite; }

/* 返回顶部按钮 */
.btn-back-to-top {
    position: fixed;
    bottom: 40px;
    right: 30px;
    z-index: 999;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-back-to-top:hover {
    background: #b20710;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}
