/* ==========================================
   CSS变量定义 - 基于汾阳文化设计系统
   ========================================== */
:root {
    /* 主色调 */
    --color-deep-brown: #2c1810;
    --color-saddle-brown: #8b4513;
    --color-light-brown: #d4a574;
    --color-gold: #c9a961;
    --color-deep-gold: #a08247;
    --color-cream: #f5f0e8;
    --color-white: #ffffff;

    /* 语义化颜色 (HSL) */
    --background: 40 33% 95%;
    --foreground: 15 35% 12%;
    --primary: 25 75% 30%;
    --primary-foreground: 40 33% 95%;
    --secondary: 40 30% 90%;
    --accent: 43 50% 58%;
    --muted: 40 20% 92%;
    --border: 40 20% 85%;

    /* 圆角 */
    --radius: 0.5rem;

    /* 缓动函数 */
    --ease-ink: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-brush: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-scroll: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-reveal: cubic-bezier(0.77, 0, 0.175, 1);
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-dramatic: cubic-bezier(0.87, 0, 0.13, 1);
}

/* ==========================================
   全局样式
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
    background-color: var(--color-cream);
    color: var(--color-deep-brown);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Noto Serif SC', 'Source Han Serif CN', serif;
    font-weight: 600;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================
   自定义滚动条
   ========================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--color-light-brown);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold);
}

/* ==========================================
   容器
   ========================================== */
.section-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 640px) {
    .section-container {
        padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .section-container {
        padding: 2rem;
    }
}

@media (min-width: 1280px) {
    .section-container {
        padding: 3rem;
    }
}

/* ==========================================
   导航栏
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-deep-brown);
    letter-spacing: 0.1em;
}

.nav-menu {
    display: none;
    list-style: none;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .nav-menu {
        display: flex;
    }
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-deep-brown);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-gold);
    transition: width 0.3s var(--ease-ink);
}

.nav-link:hover {
    color: var(--color-gold);
}

.nav-link:hover::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background-color: var(--color-deep-brown);
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover span {
    background-color: var(--color-gold);
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s var(--ease-ink);
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu ul {
    list-style: none;
    padding: 1rem;
}

.mobile-menu li {
    border-bottom: 1px solid var(--color-cream);
}

.mobile-menu a {
    display: block;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-deep-brown);
    transition: all 0.3s ease;
}

.mobile-menu a:hover,
.mobile-download-link {
    color: var(--color-gold);
}

/* ==========================================
   按钮
   ========================================== */
.btn-primary {
    display: none;
    border-radius: calc(var(--radius) - 2px);
    padding: 0.75rem 2rem;
    font-weight: 500;
    font-size: 1rem;
    background-color: var(--color-gold);
    color: #fff;
    border: 1px solid var(--color-gold);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1024px) {
    .btn-primary {
        display: inline-block;
    }
}

.btn-primary:hover {
    background-color: var(--color-deep-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 169, 97, 0.35);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
}

.btn-secondary:hover {
    background-color: var(--color-gold);
    color: #fff;
}

/* ==========================================
   英雄区
   ========================================== */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-deep-brown);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
    transition: background-image 0.5s ease-in-out;
}

/* 背景图片加载完成后显示 */
.hero-section.bg-loaded {
    background-image: url('https://hhh5.nineland.cn/img/1.png');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(44, 24, 16, 0.7) 0%,
            rgba(44, 24, 16, 0.5) 50%,
            rgba(245, 240, 232, 0.9) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 6rem;
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    color: var(--color-gold);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 2rem;
    }
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-left: 2px solid var(--color-gold);
    border-bottom: 2px solid var(--color-gold);
    transform: rotate(-45deg);
}

/* ==========================================
   区块通用样式
   ========================================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-deep-brown);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 3rem;
    }
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-saddle-brown);
    letter-spacing: 0.05em;
}

/* ==========================================
   游戏特色区
   ========================================== */
.features-section {
    padding: 6rem 0;
    background-color: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-card {
    background-color: var(--color-cream);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    border-color: var(--color-gold);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: var(--color-gold);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-deep-brown);
    margin-bottom: 1rem;
}

.feature-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #666;
}

/* ==========================================
   世界观区
   ========================================== */
.world-section {
    padding: 6rem 0;
    background-color: var(--color-cream);
}

.world-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .world-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.world-card {
    background-color: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
}

.world-card:hover {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    transform: translateY(-4px);
}

.world-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.world-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.world-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(44, 24, 16, 0.9), transparent);
}

.world-name {
    font-size: 1.875rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.1em;
}

.world-content {
    padding: 1.5rem;
}

.world-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-deep-brown);
    margin-bottom: 0.75rem;
}

.world-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #666;
}

/* ==========================================
   游戏画廊区
   ========================================== */
.gallery-section {
    padding: 6rem 0;
    background-color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================
   最新动态区
   ========================================== */
.news-section {
    padding: 6rem 0;
    background-color: var(--color-cream);
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.news-card {
    background-color: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.news-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    transform: translateY(-4px);
    border-left-color: var(--color-gold);
}

.news-date {
    font-size: 0.875rem;
    color: var(--color-gold);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.news-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-deep-brown);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-excerpt {
    font-size: 1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1.5rem;
}

.news-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-gold);
    transition: all 0.3s ease;
    display: inline-block;
}

.news-link:hover {
    color: var(--color-deep-gold);
    transform: translateX(4px);
}

/* ==========================================
   页脚
   ========================================== */
/* .footer {
    background-color: var(--color-deep-brown);
    color: var(--color-cream);
    padding: 4rem 0 2rem;
} */

/* .footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
} */

footer {
    background: var(--footer-bg);
    padding: 60px 0 40px;
    border-top: 1px solid #eee;
    color: var(--footer-text);
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-brand {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.footer-brand a {
    color: inherit;
    text-decoration: none;
    margin-left: 10px;
    font-weight: normal;
}

.footer-brand a:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.footer-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-light-brown);
}

.footer-heading {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-gold);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    font-size: 1rem;
    color: var(--color-light-brown);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
    color: var(--color-light-brown);
}

/* ==========================================
   图片缩放效果
   ========================================== */
.image-zoom {
    overflow: hidden;
    border-radius: var(--radius);
}

.image-zoom img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-zoom:hover img {
    transform: scale(1.08);
}

/* ==========================================
   动画
   ========================================== */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s var(--ease-ink) forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* 滚动触发动画 */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 0;
    transition: opacity 0.8s var(--ease-ink),
        transform 0.8s var(--ease-ink);
}

.reveal {
    transform: translateY(30px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-scale {
    transform: scale(0.9);
    transition: opacity 0.6s var(--ease-elastic),
        transform 0.6s var(--ease-elastic);
}

.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-scale.active {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* 交错延迟 */
.stagger-delay-1 {
    transition-delay: 0ms;
}

.stagger-delay-2 {
    transition-delay: 100ms;
}

.stagger-delay-3 {
    transition-delay: 200ms;
}

.stagger-delay-4 {
    transition-delay: 300ms;
}

/* ==========================================
   无障碍设计
   ========================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================
   视频播放模态框
   ========================================== */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-ink), visibility 0.3s;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 24, 16, 0.95);
    backdrop-filter: blur(8px);
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 10000;
    transform: scale(0.9);
    transition: transform 0.3s var(--ease-elastic);
}

.video-modal.active .video-modal-content {
    transform: scale(1);
}

.video-modal-content video {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--color-gold);
}

.video-close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background-color: var(--color-gold);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.video-close-btn:hover {
    background-color: var(--color-deep-gold);
    transform: rotate(90deg) scale(1.1);
}

.video-close-btn svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
    }

    .video-close-btn {
        top: -45px;
        width: 36px;
        height: 36px;
    }

    .video-close-btn svg {
        width: 18px;
        height: 18px;
    }
}