/* ===== 金桔影院 style.css ===== */
/* 全局重置与基础 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #333;
    background: #fff;
    transition: background 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

a {
    color: #f39c12;
    text-decoration: none;
    transition: color 0.3s;
}
a:hover {
    color: #e67e22;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    padding-left: 1.5rem;
}

/* ===== 导航栏 ===== */
#navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #1a1a2e;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    font-family: Arial, sans-serif;
    transition: background 0.4s;
}

#navbar .logo-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#navbar .logo-area svg {
    width: 36px;
    height: 36px;
}

#navbar .logo-area span {
    color: #f39c12;
    font-size: 1.5rem;
    font-weight: bold;
}

#navbar .nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

#navbar .nav-links a {
    color: #eee;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.3s;
}

#navbar .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #f39c12;
    transition: width 0.3s ease;
}

#navbar .nav-links a:hover {
    color: #f39c12;
}

#navbar .nav-links a:hover::after {
    width: 100%;
}

#darkToggle {
    background: transparent;
    border: 1px solid #f39c12;
    color: #f39c12;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s, color 0.3s;
}

#darkToggle:hover {
    background: #f39c12;
    color: #1a1a2e;
}

#mobileMenuBtn {
    display: none;
    background: transparent;
    border: none;
    color: #f39c12;
    font-size: 1.8rem;
    cursor: pointer;
}

/* 移动端导航 */
@media (max-width: 768px) {
    #navbar {
        padding: 0.6rem 1rem;
    }
    #navbar .logo-area span {
        font-size: 1.2rem;
    }
    #navbar .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #1a1a2e;
        padding: 1rem;
        gap: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.5);
        z-index: 999;
    }
    #navbar .nav-links a {
        font-size: 1.1rem;
    }
    #mobileMenuBtn {
        display: block;
    }
}

/* ===== 面包屑 ===== */
.breadcrumb {
    background: #f5f5f5;
    padding: 0.5rem 2rem;
    font-size: 0.85rem;
    color: #555;
    font-family: Arial, sans-serif;
}

.breadcrumb a {
    color: #f39c12;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ===== Banner 轮播 ===== */
#banner {
    position: relative;
    overflow: hidden;
    height: 500px;
    background: #0f0f23;
    display: flex;
    align-items: center;
    justify-content: center;
}

#bannerSlides {
    display: flex;
    transition: transform 0.6s ease;
    width: 100%;
    height: 100%;
}

.banner-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    text-align: center;
    padding: 2rem;
    background-size: cover;
    background-position: center;
    position: relative;
}

.banner-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26,26,46,0.7) 0%, rgba(15,15,35,0.5) 100%);
    z-index: 1;
}

.banner-slide > * {
    position: relative;
    z-index: 2;
}

.banner-slide h1, .banner-slide h2 {
    font-size: 3rem;
    margin: 0;
    color: #f39c12;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.banner-slide p {
    font-size: 1.4rem;
    max-width: 700px;
    margin-top: 1rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.banner-slide .sub {
    font-size: 1rem;
    max-width: 600px;
    margin-top: 1rem;
}

.banner-btn {
    margin-top: 1.5rem;
    background: #f39c12;
    color: #1a1a2e;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
}

.banner-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(243,156,18,0.4);
}

/* 轮播指示器 */
.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.dot {
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.dot:hover {
    transform: scale(1.2);
}

.dot.active {
    background: #f39c12;
}

/* 轮播箭头 */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 5;
    transition: background 0.3s;
    border-radius: 4px;
}

.banner-arrow:hover {
    background: rgba(243,156,18,0.6);
}

.banner-arrow.prev {
    left: 10px;
}

.banner-arrow.next {
    right: 10px;
}

@media (max-width: 768px) {
    #banner {
        height: 350px;
    }
    .banner-slide h1, .banner-slide h2 {
        font-size: 2rem;
    }
    .banner-slide p {
        font-size: 1.1rem;
    }
}

/* ===== 主内容区 ===== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: Arial, sans-serif;
    line-height: 1.7;
    color: #333;
}

/* 通用标题样式 */
section h2 {
    color: #1a1a2e;
    border-left: 5px solid #f39c12;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    transition: color 0.3s;
}

section h3 {
    color: #1a1a2e;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

/* ===== 卡片样式 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    background: rgba(255,255,255,0.85);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.card h3 {
    color: #f39c12;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card .date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

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

.card a {
    color: #f39c12;
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
}

/* ===== FAQ 折叠面板 ===== */
details {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    transition: background 0.3s;
    border: 1px solid #e0e0e0;
}

details:hover {
    background: #f0f0f0;
}

details summary {
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::after {
    content: '+';
    font-size: 1.3rem;
    color: #f39c12;
    transition: transform 0.3s;
}

details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

details p {
    padding: 0.5rem 0 1rem 0;
    color: #555;
    line-height: 1.6;
}

/* ===== 列表与文章 ===== */
article {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

article:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 页脚 ===== */
footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 2rem;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.8;
}

footer a {
    color: #f39c12;
}

footer a:hover {
    text-decoration: underline;
}

/* ===== 返回顶部 ===== */
#backTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #f39c12;
    color: #1a1a2e;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    z-index: 999;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#backTop:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(243,156,18,0.4);
}

/* ===== 搜索框 ===== */
#searchBox {
    position: fixed;
    top: 60px;
    right: 20px;
    background: white;
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 12px;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

#searchInput {
    padding: 0.5rem;
    width: 200px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: #f39c12;
}

#searchBtn {
    background: #f39c12;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: background 0.3s;
}

#searchBtn:hover {
    background: #e67e22;
}

#openSearch {
    position: fixed;
    top: 70px;
    right: 20px;
    background: #f39c12;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    z-index: 998;
    transition: transform 0.3s;
}

#openSearch:hover {
    transform: scale(1.05);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    main {
        padding: 1rem;
    }
    section h2 {
        font-size: 1.4rem;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    #searchBox {
        top: 50px;
        right: 10px;
        padding: 0.8rem;
    }
    #searchInput {
        width: 150px;
    }
    #openSearch {
        top: 60px;
        right: 10px;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    #backTop {
        bottom: 1rem;
        right: 1rem;
        padding: 0.6rem 0.8rem;
        font-size: 1rem;
    }
    .banner-slide h1, .banner-slide h2 {
        font-size: 1.8rem;
    }
}

/* ===== 暗黑模式 ===== */
body.dark-mode {
    background: #121212;
    color: #eee;
}

body.dark-mode main {
    color: #ddd;
}

body.dark-mode section h2,
body.dark-mode section h3 {
    color: #f39c12;
}

body.dark-mode .card {
    background: rgba(30,30,30,0.9);
    border-color: #333;
}

body.dark-mode .card p {
    color: #bbb;
}

body.dark-mode details {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode details p {
    color: #bbb;
}

body.dark-mode .breadcrumb {
    background: #1e1e1e;
    color: #bbb;
}

body.dark-mode article {
    background: rgba(30,30,30,0.9);
    border-color: #333;
}

body.dark-mode #navbar {
    background: #0f0f23;
}

body.dark-mode #searchBox {
    background: rgba(30,30,30,0.95);
    border-color: #444;
}

body.dark-mode #searchInput {
    background: #333;
    color: #eee;
    border-color: #555;
}

/* ===== 滚动动画 (IntersectionObserver 配合) ===== */
section, article {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section.visible, article.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 网站地图 ===== */
.sitemap ul {
    columns: 3;
    list-style: none;
    padding: 0;
}

.sitemap li {
    margin-bottom: 0.5rem;
}

.sitemap a {
    color: #f39c12;
    transition: color 0.3s;
}

.sitemap a:hover {
    color: #e67e22;
}

@media (max-width: 768px) {
    .sitemap ul {
        columns: 2;
    }
}

/* ===== 友情链接 ===== */
.friend-links a {
    color: #f39c12;
    margin: 0 0.5rem;
    transition: color 0.3s;
}

.friend-links a:hover {
    color: #e67e22;
}

/* ===== 毛玻璃效果通用 ===== */
.glass {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
}

/* ===== 渐变Banner背景 ===== */
.banner-gradient {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #2c3e50 100%);
}

/* ===== 按钮通用 ===== */
.btn-primary {
    background: #f39c12;
    color: #1a1a2e;
    padding: 0.7rem 1.8rem;
    border-radius: 30px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243,156,18,0.4);
}

/* ===== 联系信息 ===== */
.contact-info p {
    margin-bottom: 0.5rem;
}

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

/* ===== 教程列表 ===== */
.tutorial-list ol {
    line-height: 2;
    padding-left: 1.5rem;
}

.tutorial-list li {
    margin-bottom: 0.8rem;
}

/* ===== 图片懒加载占位 ===== */
img[loading="lazy"] {
    background: #f0f0f0;
}

/* ===== 暗黑模式下的细节调整 ===== */
body.dark-mode .contact-info strong {
    color: #f39c12;
}

body.dark-mode .btn-primary {
    background: #f39c12;
    color: #1a1a2e;
}

body.dark-mode #navbar .logo-area span {
    color: #f39c12;
}

/* ===== 动画延迟 ===== */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }