* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=Ma+Shan+Zheng&display=swap');

:root {
    --brick-red: #8b4513;
    --brick-dark: #654321;
    --brick-light: #a0522d;
    --wood-brown: #5d4037;
    --wood-dark: #3e2723;
    --wood-light: #795548;
    --tile-gray: #607d8b;
    --tile-dark: #455a64;
    --gold: #c9a227;
    --gold-light: #d4af37;
    --paper: #f5f0e6;
    --paper-dark: #e8dcc8;
}

body {
    font-family: 'Noto Serif SC', serif;
    background: var(--paper);
    color: var(--brick-dark);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.ancient-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.lantern {
    position: absolute;
    top: 120px;
    animation: swing 3s ease-in-out infinite;
}

.lantern-left {
    left: 5%;
}

.lantern-right {
    right: 5%;
}

@keyframes swing {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.lantern-body {
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    border-radius: 10px 10px 5px 5px;
    position: relative;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

.lantern-body::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 12px;
    background: var(--gold);
    border-radius: 3px 3px 0 0;
}

.lantern-body::after {
    content: '福';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: var(--gold);
    font-family: 'Ma Shan Zheng', cursive;
}

.lantern-tassel {
    width: 4px;
    height: 40px;
    background: linear-gradient(to bottom, var(--gold), #8b0000);
    margin: 0 auto;
    border-radius: 0 0 2px 2px;
}

.seal {
    position: absolute;
    font-size: 48px;
    color: rgba(139, 69, 19, 0.15);
    font-family: 'Ma Shan Zheng', cursive;
    border: 3px solid rgba(139, 69, 19, 0.15);
    padding: 10px;
    transform: rotate(-15deg);
}

.seal-1 {
    top: 20%;
    right: 10%;
}

.seal-2 {
    bottom: 25%;
    left: 8%;
    transform: rotate(12deg);
}

.ancient-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--paper);
}

.header-roof {
    height: 30px;
    background: linear-gradient(to bottom, var(--tile-gray) 0%, var(--tile-dark) 100%);
    position: relative;
}

.header-roof::before,
.header-roof::after {
    content: '';
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
}

.header-roof::before {
    left: -10px;
    border-width: 30px 20px 0 0;
    border-color: var(--tile-dark) transparent transparent transparent;
}

.header-roof::after {
    right: -10px;
    border-width: 30px 0 0 20px;
    border-color: var(--tile-dark) transparent transparent transparent;
}

.roof-tile {
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 28px,
        rgba(0, 0, 0, 0.1) 28px,
        rgba(0, 0, 0, 0.1) 30px
    );
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    border-bottom: 4px solid var(--brick-red);
    background: linear-gradient(to bottom, var(--paper-dark) 0%, var(--paper) 100%);
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.city-gate {
    text-align: center;
}

.gate-top {
    height: 40px;
    background: linear-gradient(to bottom, var(--tile-gray) 0%, var(--tile-dark) 100%);
    border-radius: 50% 50% 0 0;
    position: relative;
}

.gate-roof {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
    border-bottom: 20px solid var(--tile-dark);
}

.gate-body {
    width: 80px;
    height: 70px;
    background: linear-gradient(135deg, var(--brick-red) 0%, var(--brick-dark) 100%);
    border: 3px solid var(--wood-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 5px 5px;
}

.city-name {
    font-size: 28px;
    color: var(--gold);
    font-family: 'Ma Shan Zheng', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.title-section {
    text-align: center;
}

.main-title {
    font-size: 42px;
    color: var(--brick-dark);
    font-family: 'Ma Shan Zheng', cursive;
    margin-bottom: 8px;
    letter-spacing: 8px;
}

.subtitle {
    font-size: 18px;
    color: var(--brick-light);
    letter-spacing: 6px;
}

.ancient-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-plank {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--wood-brown) 0%, var(--wood-dark) 100%);
    border: 3px solid var(--wood-dark);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-plank::before,
.nav-plank::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.nav-plank::before {
    left: 8px;
}

.nav-plank::after {
    right: 8px;
}

.plank-text {
    color: var(--paper);
    font-size: 16px;
    font-family: 'Noto Serif SC', serif;
    letter-spacing: 4px;
}

.nav-plank:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.nav-plank.active {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border-color: var(--brick-dark);
}

.nav-plank.active .plank-text {
    color: var(--brick-dark);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

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

.hero-section {
    position: relative;
    margin-bottom: 50px;
    border: 4px solid var(--brick-red);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(139, 69, 19, 0.3);
}

.hero-image {
    position: relative;
    height: 450px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(20%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-frame {
    background: var(--paper);
    padding: 0;
    border-radius: 5px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 500px;
}

.scroll-top,
.scroll-bottom {
    height: 35px;
    background: linear-gradient(90deg, var(--wood-brown) 0%, var(--wood-dark) 50%, var(--wood-brown) 100%);
    position: relative;
}

.scroll-top::before,
.scroll-bottom::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(90deg, var(--gold) 0px, var(--gold) 20px, transparent 20px, transparent 40px);
}

.scroll-top::before { top: 0; }
.scroll-bottom::before { bottom: 0; }

.scroll-content {
    padding: 40px 50px;
    text-align: center;
}

.hero-title {
    font-size: 48px;
    color: var(--brick-dark);
    font-family: 'Ma Shan Zheng', cursive;
    margin-bottom: 15px;
    letter-spacing: 12px;
}

.hero-desc {
    font-size: 22px;
    color: var(--brick-light);
    margin-bottom: 10px;
    letter-spacing: 6px;
}

.hero-sub {
    font-size: 16px;
    color: var(--tile-gray);
    letter-spacing: 4px;
}

.stats-section {
    margin-bottom: 50px;
}

.wooden-frame {
    background: linear-gradient(135deg, var(--paper) 0%, var(--paper-dark) 100%);
    border: 4px solid var(--wood-brown);
    border-radius: 5px;
    padding: 40px;
    position: relative;
    box-shadow: inset 0 0 20px rgba(93, 64, 55, 0.1);
}

.wooden-frame::before,
.wooden-frame::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid var(--wood-dark);
}

.wooden-frame::before {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}

.wooden-frame::after {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--paper);
    border: 2px solid var(--brick-red);
    border-radius: 5px;
}

.stat-number {
    font-size: 42px;
    color: var(--brick-red);
    font-family: 'Ma Shan Zheng', cursive;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    color: var(--tile-gray);
    letter-spacing: 4px;
}

.bricks-wall {
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 28px,
            rgba(139, 69, 19, 0.05) 28px,
            rgba(139, 69, 19, 0.05) 30px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 98px,
            rgba(139, 69, 19, 0.05) 98px,
            rgba(139, 69, 19, 0.05) 100px
        ),
        var(--paper);
    padding: 40px;
    border: 4px solid var(--brick-red);
    border-radius: 5px;
    margin-bottom: 50px;
}

.section-title {
    font-size: 36px;
    color: var(--brick-dark);
    text-align: center;
    margin-bottom: 40px;
    font-family: 'Ma Shan Zheng', cursive;
    letter-spacing: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.title-decoration {
    font-size: 24px;
    color: var(--gold);
}

.intro-content {
    background: var(--paper);
    padding: 40px;
    border: 2px solid var(--brick-light);
    border-radius: 5px;
}

.intro-text p {
    font-size: 17px;
    line-height: 2.2;
    color: var(--brick-dark);
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-indent: 2em;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.highlight-card {
    background: var(--paper);
    padding: 35px 25px;
    text-align: center;
    border: 3px solid var(--wood-brown);
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, var(--tile-gray), var(--tile-dark), var(--tile-gray));
}

.highlight-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(93, 64, 55, 0.3);
}

.card-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.highlight-card h4 {
    font-size: 22px;
    color: var(--brick-dark);
    margin-bottom: 12px;
    font-family: 'Ma Shan Zheng', cursive;
    letter-spacing: 4px;
}

.highlight-card p {
    font-size: 15px;
    color: var(--tile-gray);
    line-height: 1.8;
    letter-spacing: 2px;
}

.scenery-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.scenery-item {
    display: flex;
    background: var(--paper);
    border: 3px solid var(--brick-light);
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scenery-item:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

.scenery-image {
    width: 280px;
    height: 200px;
    flex-shrink: 0;
}

.scenery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(15%);
}

.scenery-info {
    flex: 1;
    padding: 25px 30px;
}

.scenery-info h4 {
    font-size: 26px;
    color: var(--brick-dark);
    margin-bottom: 12px;
    font-family: 'Ma Shan Zheng', cursive;
    letter-spacing: 4px;
}

.scenery-info p {
    font-size: 15px;
    color: var(--tile-gray);
    line-height: 1.8;
    letter-spacing: 2px;
}

.culture-tabs,
.guide-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.tab-btn,
.guide-tab {
    padding: 14px 32px;
    background: var(--paper);
    border: 2px solid var(--brick-light);
    color: var(--tile-gray);
    font-size: 16px;
    cursor: pointer;
    font-family: 'Noto Serif SC', serif;
    transition: all 0.3s ease;
    letter-spacing: 3px;
}

.tab-btn:hover,
.guide-tab:hover {
    border-color: var(--brick-red);
    color: var(--brick-dark);
}

.tab-btn.active,
.guide-tab.active {
    background: linear-gradient(135deg, var(--brick-red) 0%, var(--brick-dark) 100%);
    color: var(--paper);
    border-color: var(--brick-dark);
}

.culture-content,
.guide-content {
    background: var(--paper);
    padding: 40px;
    border: 2px solid var(--brick-light);
    border-radius: 5px;
}

.content-section h4 {
    font-size: 24px;
    color: var(--brick-dark);
    margin-bottom: 20px;
    font-family: 'Ma Shan Zheng', cursive;
    letter-spacing: 5px;
}

.content-section p {
    font-size: 16px;
    line-height: 2;
    color: var(--brick-dark);
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-indent: 2em;
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.food-card {
    background: var(--paper);
    border: 3px solid var(--wood-brown);
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.food-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(93, 64, 55, 0.3);
}

.food-image {
    height: 180px;
}

.food-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(10%);
}

.food-info {
    padding: 25px;
}

.food-info h4 {
    font-size: 22px;
    color: var(--brick-dark);
    margin-bottom: 10px;
    font-family: 'Ma Shan Zheng', cursive;
    letter-spacing: 4px;
}

.food-info p {
    font-size: 14px;
    color: var(--tile-gray);
    line-height: 1.7;
    letter-spacing: 2px;
}

.guide-info {
    padding: 20px 0;
}

.guide-info h5 {
    font-size: 20px;
    color: var(--brick-red);
    margin: 25px 0 15px;
    font-family: 'Ma Shan Zheng', cursive;
    letter-spacing: 4px;
}

.guide-info p {
    font-size: 16px;
    line-height: 2;
    color: var(--brick-dark);
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.guide-info ul {
    margin-left: 2em;
    margin-bottom: 15px;
}

.guide-info li {
    font-size: 16px;
    line-height: 2;
    color: var(--brick-dark);
    letter-spacing: 2px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border: 3px solid var(--brick-light);
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.4);
    border-color: var(--brick-red);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(15%);
    transition: filter 0.3s ease;
}

.gallery-item:hover img {
    filter: sepia(0%);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(62, 39, 35, 0.9), transparent);
    color: var(--paper);
    padding: 25px 15px 15px;
    font-size: 16px;
    font-family: 'Ma Shan Zheng', cursive;
    letter-spacing: 3px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(62, 39, 35, 0.8);
}

.modal-box {
    position: relative;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--paper);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--brick-red) 0%, var(--brick-dark) 100%);
    border: 2px solid var(--brick-dark);
    color: var(--paper);
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
    background: var(--brick-dark);
}

.modal-content-inner {
    padding: 30px;
}

.modal-content-inner h3 {
    font-size: 30px;
    color: var(--brick-dark);
    margin-bottom: 20px;
    font-family: 'Ma Shan Zheng', cursive;
    letter-spacing: 6px;
    text-align: center;
}

.modal-content-inner p {
    font-size: 16px;
    line-height: 2;
    color: var(--brick-dark);
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-indent: 2em;
}

.modal-image {
    width: 100%;
    height: 250px;
    margin-bottom: 25px;
    border: 3px solid var(--brick-light);
    border-radius: 5px;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(15%);
}

.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
    padding: 20px;
}

.image-viewer.show {
    display: flex;
}

.viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.viewer-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--brick-red) 0%, var(--brick-dark) 100%);
    border: 2px solid var(--gold);
    color: var(--paper);
    font-size: 28px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.viewer-close:hover {
    transform: rotate(90deg);
}

.viewer-content img {
    max-width: 100%;
    max-height: 80vh;
    border: 4px solid var(--brick-red);
    border-radius: 5px;
}

.viewer-caption {
    text-align: center;
    color: var(--paper);
    font-size: 20px;
    margin-top: 20px;
    font-family: 'Ma Shan Zheng', cursive;
    letter-spacing: 4px;
}

.ancient-footer {
    margin-top: 60px;
}

.footer-roof {
    height: 25px;
    background: linear-gradient(to bottom, var(--tile-gray) 0%, var(--tile-dark) 100%);
}

.footer-content {
    background: linear-gradient(to bottom, var(--brick-dark) 0%, var(--brick-red) 100%);
    padding: 40px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.footer-seal {
    font-size: 36px;
    color: var(--gold);
    font-family: 'Ma Shan Zheng', cursive;
    border: 2px solid var(--gold);
    padding: 8px 12px;
    opacity: 0.8;
}

.footer-content p {
    color: var(--paper);
    font-size: 16px;
    letter-spacing: 4px;
}

@media (max-width: 768px) {
    .header-content {
        padding: 20px;
    }

    .logo-section {
        flex-direction: column;
        gap: 20px;
    }

    .main-title {
        font-size: 32px;
        letter-spacing: 4px;
    }

    .ancient-nav {
        gap: 8px;
    }

    .nav-plank {
        padding: 10px 20px;
    }

    .plank-text {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .scenery-item {
        flex-direction: column;
    }

    .scenery-image {
        width: 100%;
        height: 200px;
    }

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

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lantern {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
}
