/* 午夜影院 - 完整样式表 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.8;
    scroll-behavior: smooth;
}

body.dark {
    background: #121212;
    color: #e0e0e0;
}

a {
    color: #b91c1c;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 头部导航 */
header {
    background: #1a1a2e;
    color: #fff;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(26, 26, 46, 0.95);
}

header .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e94560;
    text-shadow: 0 2px 10px rgba(233, 69, 96, 0.3);
}

header nav a {
    color: #fff;
    margin: 0 1rem;
    font-size: 1rem;
    transition: color 0.3s, transform 0.3s;
}

header nav a:hover {
    color: #e94560;
    transform: translateY(-2px);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid #e94560;
    color: #e94560;
    font-size: 1.5rem;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
}

.menu-toggle:hover {
    background: rgba(233, 69, 96, 0.1);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    header nav {
        display: none;
        width: 100%;
        margin-top: 1rem;
        flex-direction: column;
        align-items: center;
    }
    header nav.active {
        display: flex;
    }
    header nav a {
        margin: 0.5rem 0;
    }
}

/* 返回顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.dark #back-to-top {
    background: #b91c1c;
}

/* Banner 渐变轮播 */
.banner {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: #fff;
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(233, 69, 96, 0.1) 0%, transparent 70%);
    animation: bannerGlow 8s ease-in-out infinite;
}

@keyframes bannerGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.banner h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #e94560;
    text-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
    position: relative;
}

.banner p {
    font-size: 1.4rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.banner .slide {
    display: none;
    animation: fadeIn 1s ease;
}

.banner .slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 通用区块 */
section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 2rem;
    color: #1a1a2e;
    border-left: 5px solid #e94560;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.dark section h2 {
    color: #e0e0e0;
    border-color: #b91c1c;
}

section h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: #333;
}

.dark section h3 {
    color: #ccc;
}

section h4 {
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem;
    color: #555;
}

.dark section h4 {
    color: #aaa;
}

/* 网格布局 */
.grid-2, .grid-3 {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: 1fr 1fr;
}

.grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* 卡片 - 毛玻璃效果 */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .card {
    background: rgba(30, 30, 30, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

.dark .card:hover {
    background: rgba(40, 40, 40, 0.95);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

.card h3 {
    color: #1a1a2e;
    margin-top: 0;
}

.dark .card h3 {
    color: #e0e0e0;
}

.card p {
    color: #555;
    font-size: 0.95rem;
}

.dark .card p {
    color: #bbb;
}

/* 按钮 */
.btn {
    display: inline-block;
    background: #e94560;
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
}

.btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    text-decoration: none;
}

/* FAQ */
.faq-item, .howto-step {
    margin-bottom: 1rem;
    border: 1px solid rgba(221, 221, 221, 0.5);
    border-radius: 8px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s;
}

.dark .faq-item, .dark .howto-step {
    background: rgba(30, 30, 30, 0.8);
    border-color: rgba(68, 68, 68, 0.5);
}

.faq-item:hover, .howto-step:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-question {
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    display: none;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(238, 238, 238, 0.5);
    color: #555;
}

.dark .faq-answer {
    color: #bbb;
    border-color: rgba(68, 68, 68, 0.5);
}

.faq-item.active .faq-answer {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}

/* 文章列表 */
.article-list {
    list-style: none;
    padding: 0;
}

.article-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(238, 238, 238, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    transition: background 0.3s;
}

.article-list li:hover {
    background: rgba(233, 69, 96, 0.03);
}

.dark .article-list li {
    border-color: rgba(68, 68, 68, 0.5);
}

.dark .article-list li:hover {
    background: rgba(233, 69, 96, 0.05);
}

.article-list .article-title {
    font-weight: 600;
    color: #1a1a2e;
}

.dark .article-list .article-title {
    color: #e0e0e0;
}

.article-list .article-date {
    color: #888;
    font-size: 0.9rem;
}

.article-list .article-summary {
    width: 100%;
    margin-top: 0.5rem;
    color: #555;
    font-size: 0.95rem;
}

.dark .article-list .article-summary {
    color: #bbb;
}

.article-list .read-more {
    color: #e94560;
    font-weight: 600;
    margin-left: 1rem;
    transition: all 0.3s;
}

.article-list .read-more:hover {
    color: #b91c1c;
    transform: translateX(5px);
}

/* 使用教程 */
.howto-step ol {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.howto-step li {
    margin-bottom: 0.5rem;
}

/* 联系信息 */
.contact-info p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.contact-info strong {
    color: #1a1a2e;
}

.dark .contact-info strong {
    color: #e0e0e0;
}

/* 页脚 */
.footer {
    background: #1a1a2e;
    color: #ccc;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

.footer a {
    color: #e94560;
    transition: color 0.3s;
}

.footer a:hover {
    color: #fff;
}

.footer .links {
    margin-bottom: 1rem;
}

.footer .links a {
    margin: 0 0.8rem;
}

/* 暗黑模式切换按钮 */
.dark-switch {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 1001;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.dark-switch:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.dark .dark-switch {
    background: #e94560;
    color: #fff;
}

/* 数字动画 */
.number-animate {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e94560;
    display: inline-block;
}

/* 搜索框 */
.search-box {
    display: flex;
    margin: 1rem 0;
    max-width: 500px;
}

.search-box input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid rgba(221, 221, 221, 0.5);
    border-radius: 30px 0 0 30px;
    font-size: 1rem;
    outline: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #e94560;
}

.dark .search-box input {
    background: rgba(30, 30, 30, 0.8);
    color: #fff;
    border-color: rgba(68, 68, 68, 0.5);
}

.dark .search-box input:focus {
    border-color: #b91c1c;
}

.search-box button {
    background: #e94560;
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.search-box button:hover {
    background: #b91c1c;
}

/* 面包屑 */
.breadcrumb {
    background: rgba(238, 238, 238, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
    color: #666;
}

.dark .breadcrumb {
    background: rgba(42, 42, 42, 0.8);
    color: #aaa;
}

.breadcrumb a {
    color: #e94560;
}

.breadcrumb span {
    margin: 0 0.5rem;
}

/* Schema 隐藏 */
.schema-hidden {
    display: none;
}

/* 滚动动画 */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 图片懒加载 */
.lazy-img {
    opacity: 0;
    transition: opacity 0.5s;
}

.lazy-img.loaded {
    opacity: 1;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .banner h1 {
        font-size: 2rem;
    }
    .banner p {
        font-size: 1.1rem;
    }
    section h2 {
        font-size: 1.5rem;
    }
    .card {
        padding: 1rem;
    }
    header .logo {
        font-size: 1.4rem;
    }
}

/* 暗黑模式下的滚动条 */
.dark ::-webkit-scrollbar {
    width: 10px;
}

.dark ::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.dark ::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 5px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 选中文本样式 */
::selection {
    background: rgba(233, 69, 96, 0.3);
    color: #fff;
}

.dark ::selection {
    background: rgba(185, 28, 28, 0.5);
}

/* 表单元素通用 */
input, textarea, select {
    font-family: inherit;
}

/* 打印样式 */
@media print {
    header, .footer, #back-to-top, .dark-switch, .menu-toggle {
        display: none !important;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    .banner {
        padding: 2rem;
    }
}