/* 黑神话：钟馗 - 通用样式文件 */

/* 字体导入 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700;900&display=swap');

/* CSS变量定义 */
:root {
    --ancient-black: #0a0a0a;
    --dark-gold: #d4af37;
    --mystic-red: #8b0000;
    --ghost-white: #f8f8ff;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* 基础样式重置 */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Serif SC', serif;
    background-color: var(--ancient-black);
    color: var(--ghost-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 中文标题样式 */
.chinese-title {
    font-family: 'Noto Serif SC', serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* 传统边框样式 */
.traditional-border {
    border-image: linear-gradient(45deg, var(--dark-gold), var(--mystic-red), var(--dark-gold)) 1;
    border-style: solid;
    border-width: 2px;
}

/* 卡片样式 */
.card-base {
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(20,20,20,0.9) 100%);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.card-base:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.2);
}

/* 导航栏增强 */
.nav-enhanced {
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-enhanced.scrolled {
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.5);
}

/* 移动端菜单样式 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, var(--ancient-black) 0%, var(--gray-900) 100%);
    transition: right 0.3s ease;
    z-index: 999;
    padding: 2rem;
    border-left: 2px solid var(--dark-gold);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 英雄区域样式 */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.8)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="stars" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23d4af37" opacity="0.3"/><circle cx="80" cy="60" r="0.5" fill="%23d4af37" opacity="0.5"/><circle cx="50" cy="90" r="0.8" fill="%23d4af37" opacity="0.2"/></pattern></defs><rect width="100%" height="100%" fill="url(%23stars)"/></svg>');
    background-size: cover, 200px 200px;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* 按钮样式 */
.btn-primary {
    background: var(--dark-gold);
    color: var(--ancient-black);
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: #ffd700;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    border: 2px solid var(--dark-gold);
    color: var(--dark-gold);
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--dark-gold);
    color: var(--ancient-black);
}

/* 特色图标样式 */
.feature-icon {
    background: radial-gradient(circle, rgba(212, 175, 55, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* 时间轴样式 */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--dark-gold), var(--mystic-red), var(--dark-gold));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 2rem;
    width: 16px;
    height: 16px;
    background: var(--dark-gold);
    border-radius: 50%;
    border: 4px solid var(--ancient-black);
    transform: translateX(-50%);
    z-index: 10;
}

/* 响应式网格 */
.responsive-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* 加载动画 */
.loading-skeleton {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.1) 25%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(255,255,255,0.1) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* 视频播放器样式 */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: var(--gray-900);
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #1a1a1a 25%, transparent 25%),
                linear-gradient(-45deg, #1a1a1a 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #1a1a1a 75%),
                linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-placeholder:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

/* 画廊灯箱样式 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    background: var(--gray-900);
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dark-gold), var(--mystic-red));
    transition: width 0.3s ease;
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: var(--ghost-white);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--dark-gold);
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--dark-gold);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .chinese-title {
        font-size: 2.5rem !important;
    }
    
    .timeline::before {
        left: 1rem;
    }
    
    .timeline-item::before {
        left: 1rem;
    }
    
    .timeline-item {
        padding-left: 3rem;
        text-align: left !important;
    }
    
    .responsive-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .mobile-menu {
        width: 90%;
    }
}

@media (max-width: 480px) {
    .chinese-title {
        font-size: 2rem !important;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.5rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .card-base {
        padding: 1rem;
    }
}

/* 无障碍访问 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --dark-gold: #ffff00;
        --mystic-red: #ff0000;
        --ghost-white: #ffffff;
        --ancient-black: #000000;
    }
}

/* 打印样式 */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .nav-enhanced,
    .scroll-indicator,
    .mobile-menu,
    .lightbox {
        display: none !important;
    }
    
    .card-base {
        background: white;
        border: 1px solid black;
        box-shadow: none;
    }
}
