/**
 * 赛博寺庙 - 公共样式
 * 包含：CSS变量、重置样式、公共组件
 */

/* ========================================
   CSS 变量定义
   ======================================== */
:root {
    /* 主色调 */
    --temple-red: #8b1a1a;
    --temple-red-dark: #4a0e0e;
    --cinnabar: #e02222;
    --cinnabar-dark: #8b1a1a;
    
    /* 金色系 */
    --gold: #d4af37;
    --gold-glow: #ffd700;
    --gold-dark: #b8860b;
    
    /* 木色系 */
    --wood-light: #f0d5a0;
    --wood-dark: #b8956e;
    
    /* 背景色 */
    --bg-dark: #0a0608;
    --bg-purple: #1a0a2e;
    
    /* 文字色 */
    --text-light: #f0e6d3;
    --text-muted: rgba(240, 230, 211, 0.7);
    
    /* 纸张色 */
    --paper-bg: #fcf6e8;
    --paper-alt: #f5f0e6;
}

/* ========================================
   重置样式
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', 'Noto Serif TC', serif;
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
}

/* ========================================
   公共组件 - 顶部导航栏
   ======================================== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(10, 6, 8, 0.98), rgba(10, 6, 8, 0.92));
    border-bottom: 1px solid var(--gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 500;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(212, 175, 55, 0.2) inset;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    font-size: 28px;
    animation: navSpin 10s linear infinite;
}

@keyframes navSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.nav-title {
    font-family: 'Ma Shan Zheng', 'Noto Serif SC', 'Noto Serif TC', serif;
    font-size: 24px;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    letter-spacing: 4px;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: var(--text-light);
    text-decoration: none;
    font-family: 'Noto Serif SC', 'Noto Serif TC', serif;
    font-size: 15px;
    letter-spacing: 2px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link.active {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.nav-link.active::before {
    width: 100%;
}

.nav-icon {
    font-size: 18px;
}

.nav-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.nav-text {
    font-weight: 500;
}

/* 移动端导航适配 */
@media (max-width: 600px) {
    .top-nav {
        padding: 0 15px;
        height: 55px;
    }
    
    .nav-title {
        font-size: 18px;
        letter-spacing: 2px;
    }
    
    .nav-logo {
        font-size: 22px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-icon {
        font-size: 20px;
    }
}

/* ========================================
   公共组件 - 返回首页按钮（已弃用，保留兼容）
   ======================================== */
.back-home {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 10px 18px;
    background: rgba(10, 8, 18, 0.8);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: 'Noto Serif SC', 'Noto Serif TC', serif;
    font-size: 14px;
    cursor: pointer;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.back-home:hover {
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* ========================================
   公共组件 - 立柱装饰
   ======================================== */
.pillar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(90deg, #0f0202, #2a0808, #0f0202);
    z-index: 1;
}

.pillar.left {
    left: 0;
}

.pillar.right {
    right: 0;
}

/* ========================================
   公共动画
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes glow {
    from { opacity: 0.3; }
    to { opacity: 0.8; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ========================================
   公共工具类
   ======================================== */
.hidden {
    display: none !important;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 4px;
}

/* ========================================
   响应式断点
   ======================================== */
@media (max-width: 800px) {
    .pillar {
        width: 40px;
    }
}

@media (max-width: 500px) {
    .pillar {
        width: 20px;
    }
    
    .back-home {
        padding: 8px 12px;
        font-size: 12px;
    }
}

