:root {
    --primary-color: #e74c3c;
    --primary-dark: #c0392b;
    --primary-light: #ec7063;
    --secondary-color: #f39c12;
    --accent-color: #9b59b6;
    --bg-color: #f8f9fa;
    --bg-white: #ffffff;
    --text-color: #2d3436;
    --text-muted: #636e72;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    z-index: 100;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.navbar {
    padding: 0.75rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-size: 1.15rem;
    font-weight: 600;
    font-family: 'Noto Serif SC', serif;
}

.nav-brand i {
    font-size: 1.3rem;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(231, 76, 60, 0.08);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-color);
    cursor: pointer;
}

.hero {
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.hero-overlay {
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.45);
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    z-index: 2;
    animation: fadeInUp 1s ease 1s forwards;
    opacity: 0;
}

.scroll-icon {
    animation: bounce 2s ease-in-out infinite;
    font-size: 1.5rem;
}

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

.hero-content {
    padding-top: 1rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.hero-date-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-size: 1rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.hero-btn i {
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(4px);
    }
}

.gallery-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 450px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1), var(--shadow-md);
}

.search-box i {
    color: var(--text-muted);
    margin-right: 0.75rem;
    font-size: 0.95rem;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.95rem;
    background: transparent;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

#gallery .gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

#gallery .gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.16);
}

#gallery .gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 200px;
}

#gallery .gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.4s ease;
    opacity: 0;
}

#gallery .gallery-image-wrapper img.loaded-image {
    opacity: 1;
}

#gallery .gallery-image-wrapper img.lazy-image {
    filter: blur(8px);
}

#gallery .gallery-image-wrapper img.loaded-image {
    filter: blur(0);
}

#gallery .gallery-item:hover .gallery-image-wrapper img {
    transform: scale(1.05);
}

#gallery .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
}

#gallery .gallery-item:hover .gallery-overlay {
    opacity: 1;
}

#gallery .gallery-overlay i {
    color: white;
    font-size: 2rem;
}

#gallery .gallery-caption {
    padding: 0.75rem;
    text-align: center;
    color: #e74c3c;
    font-weight: 500;
}

.footer {
    background: var(--primary-dark);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Noto Serif SC', serif;
    font-size: 1.1rem;
    color: white;
}

.footer-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-zoom-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.lightbox-zoom-container:active {
    cursor: grabbing;
}

.lightbox-zoom-container .lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    transform-origin: center center;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-caption {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    text-align: center;
    font-weight: 500;
}

.lightbox-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.lightbox.active .lightbox-hint {
    opacity: 1;
    animation: fadeOut 3s ease forwards;
    animation-delay: 2s;
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
}

.lightbox-prev {
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.page {
    min-height: 100vh;
    display: block;
}

.page.hidden {
    display: none;
}

.default-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    text-align: center;
}

.default-icon {
    font-size: 6rem;
    margin-bottom: 1.5rem;
    animation: bounce 2s ease infinite;
}

.default-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-family: 'Noto Serif SC', serif;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.default-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.default-instruction {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.default-instruction p {
    color: white;
    font-size: 1rem;
    margin: 0.5rem 0;
}

.default-instruction code {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
}

.default-example {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
}

.example-link {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.example-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.message-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.message-modal.active {
    opacity: 1;
    visibility: visible;
}

.message-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.message-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 90%;
    width: 420px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.message-modal.active .message-modal-content {
    transform: scale(1) translateY(0);
}

.message-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.message-modal-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'Noto Serif SC', serif;
}

.message-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.message-modal-close:hover {
    background: rgba(255,255,255,0.3);
}

.message-modal-body {
    padding: 1.5rem;
}

.message-modal-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 1rem;
    text-align: center;
    font-family: 'Noto Serif SC', serif;
}

.message-modal-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #4a4a4a;
    text-align: center;
    white-space: pre-line;
}

.message-modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    justify-content: center;
}

.message-modal-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.message-modal-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 0.5rem 1rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: all 0.3s ease;
        border-radius: 0 0 12px 12px;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        font-size: 1rem;
    }

    .nav-link.active::after {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        padding: 0.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-date-banner {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .hero-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }

    .gallery-item img {
        height: 140px;
    }

    .lightbox-zoom-container .lightbox-image {
        max-width: 95vw;
        max-height: 75vh;
    }

    .lightbox-hint {
        font-size: 0.75rem;
        bottom: 0.75rem;
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
        min-width: 44px;
        min-height: 44px;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-caption {
        bottom: 3rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

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

    .gallery-item img {
        height: 120px;
    }
}