﻿/* =============================================
   电影空间 - kpkuang风格布局
   保留红色主题色，复刻kpkuang布局结构
============================================= */

:root {
    --primary-color: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #ef4444;
    --bg-dark: #e5e5e5;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f0;
    --bg-hover: #d4d4d4;
    --text-white: #1f1f1f;
    --text-gray: #525252;
    --text-light: #737373;
    --border-color: #d4d4d4;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* =============================================
   页面加载遮罩层
============================================= */
.page-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.page-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.page-loading-text {
    color: #fff;
    margin-top: 20px;
    font-size: 1rem;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    min-height: 100vh;
}

/* 标签区域分隔线 */
.movie-tags-inline {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 10px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =============================================
   顶部导航栏
============================================= */
.top-nav-bar {
    background: #3a3a3a;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
}

.hot-search-bar {
    padding: 8px 0 3px 0;
    height: 24px;
}

.hot-search-bar a:hover {
    color: var(--primary-color) !important;
}

.top-nav-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ff4444;
}

.logo-icon {
    flex-shrink: 0;
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-section {
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.nav-section:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background: #666;
}

.nav-link {
    padding: 9px 16px;
    border-radius: 5px;
    color: #d4d4d4;
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.nav-link:hover {
    color: #ffffff;
    background: #666666;
    border-radius: 5px;
}

.nav-link.active {
    color: #ffffff;
    background: #808080;
    border-radius: 5px;
}

.nav-divider {
    color: #888;
    font-size: 0.9rem;
    margin: 0 5px;
    user-select: none;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    background: var(--bg-card);
    border-radius: 3px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    min-width: 150px;
    padding: 10px 0;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    margin-left: auto;
    background: #e0e0e0;
    border-radius: 12px;
    padding: 0px 10px;
    border: 1px solid #d4d4d4;
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: #1f1f1f;
    font-size: 0.9rem;
    width: 200px;
    padding: 5px 0;
    line-height: 1.2;
}

.search-box input::placeholder {
    color: #737373;
}

.search-box button {
    color: #737373;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    color: var(--primary-color);
}

/* =============================================
   移动端底部导航
============================================= */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 8px 0;
    z-index: 1000;
    border-top: 1px solid var(--border-color);
    justify-content: space-around;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-gray);
    font-size: 0.7rem;
    padding: 5px 10px;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--primary-color);
}

.mobile-nav-item svg {
    flex-shrink: 0;
}

/* =============================================
   主内容区域
============================================= */
.main-content {
    padding-top: 80px;
    padding-bottom: 40px;
}

/* =============================================
   搜索区域
============================================= */
.search-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 60px 0;
    margin-bottom: 40px;
}

.search-section h1 {
    text-align: center;
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 30px;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
}

.search-form button {
    padding: 15px 30px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
}

.search-form button:hover {
    background: var(--primary-dark);
}

/* =============================================
   分页组件样式（共享）- 统一采用 latest50.html 风格
============================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
}

.pagination-bottom {
    justify-content: flex-end;
    margin-top: 20px;
    margin-bottom: 20px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-width: 32px;
    padding: 0 12px;
    background: #e0e0e0;
    color: #525252;
    border-radius: 3px;
    transition: var(--transition);
    font-size: 0.85rem;
    vertical-align: middle;
    box-sizing: border-box;
    border: none;
    cursor: pointer;
}

.page-btn:hover:not(.disabled):not(:disabled) {
    background: var(--primary-color);
    color: #ffffff;
}

.page-btn.disabled,
.page-btn:disabled:not(.active) {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    cursor: default;
    opacity: 1;
}

.page-info {
    color: #525252;
    padding: 0 10px;
    font-size: 0.85rem;
}

/* =============================================
   页脚
============================================= */
.footer {
    background: #d4d4d4;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #525252;
}

.footer-logo p {
    color: #525252;
    font-size: 0.85rem;
    line-height: 1.8;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #1f1f1f;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #525252;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: #dc2626;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #b0b0b0;
    color: #525252;
    font-size: 0.85rem;
}

/* =============================================
   响应式设计
============================================= */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-nav {
        display: none;
    }
    
    .search-box {
        display: none;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    .main-content {
        padding-top: 70px;
        padding-bottom: 80px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
