body {
    margin: 0;
    font-family: 'Inter', 'Noto Serif SC', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
        Roboto, Arial, sans-serif;
    background-color: #0b0c0f;
    color: rgba(255, 255, 255, 0.88);
    overflow: hidden;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    box-sizing: border-box;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

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

/* 首页 */
#home-view {
    background-color: #0b0c0f;
}

#home-view .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    transform: scale(1.02);
    filter: saturate(0.98) contrast(1.05);
}

#home-view .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(1200px 800px at 15% 20%, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.46)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.24));
}

#home-view .hero-content {
    z-index: 1;
    width: min(980px, 92vw);
    padding: 64px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

#home-view .hero-topline {
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
}

#home-view .name {
    font-family: 'Noto Serif SC', serif;
    font-size: clamp(44px, 7vw, 86px);
    line-height: 1.05;
    margin: 0;
    letter-spacing: -0.02em;
}

#home-view .tagline {
    font-family: 'Noto Serif SC', serif;
    font-size: clamp(18px, 2.2vw, 28px);
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    max-width: 38ch;
}

#home-view .works-button {
    margin-top: 18px;
    padding: 14px 22px;
    font-size: 13px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#home-view .works-button:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.42);
    transform: translateY(-1px);
}

/* 作品总览页 */
#gallery-overview-view {
    background: #02030a url("./universe1.jpg") center center / cover no-repeat fixed;
    justify-content: flex-start;
    padding-top: 48px;
    gap: 24px;
    position: relative;
}

#gallery-overview-view::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.65;
    background:
        radial-gradient(2px 2px at 18% 22%, rgba(255, 255, 255, 0.60), rgba(255, 255, 255, 0)),
        radial-gradient(1.5px 1.5px at 36% 18%, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0)),
        radial-gradient(1px 1px at 62% 28%, rgba(255, 255, 255, 0.40), rgba(255, 255, 255, 0)),
        radial-gradient(1.8px 1.8px at 78% 16%, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0)),
        radial-gradient(1.2px 1.2px at 84% 42%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0)),
        radial-gradient(1.6px 1.6px at 12% 56%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0)),
        radial-gradient(1.1px 1.1px at 44% 62%, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0)),
        radial-gradient(1.4px 1.4px at 68% 70%, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0)),
        radial-gradient(900px 500px at 55% 30%, rgba(160, 190, 255, 0.10), rgba(0, 0, 0, 0));
    mix-blend-mode: screen;
}

.overview-header,
.gallery-grid,
.secondary-button {
    position: relative;
    z-index: 1;
}

#gallery-overview-view .page-title {
    font-family: 'Noto Serif SC', serif;
    font-size: clamp(28px, 3.2vw, 44px);
    margin: 0;
    letter-spacing: 0.02em;
}

.overview-header {
    width: min(1200px, 92vw);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.overview-kicker {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.60);
}

.overview-subtitle {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.70);
    max-width: 72ch;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    max-width: 1200px;
    width: min(1200px, 92vw);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    outline: none;
    background: rgba(255, 255, 255, 0.04);
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.gallery-item:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16), 0 24px 60px rgba(0, 0, 0, 0.55);
}

.gallery-item img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.45s ease, filter 0.45s ease;
    filter: saturate(0.98) contrast(1.05);
}

.gallery-item:hover img {
    transform: scale(1.07);
    filter: saturate(1.02) contrast(1.08);
}

.gallery-item .series-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 18px 18px 16px 18px;
    margin: 0;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.78));
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
}

.series-cn {
    font-family: 'Noto Serif SC', serif;
    font-size: 16px;
    letter-spacing: 0.02em;
}

.series-en {
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.secondary-button {
    margin: 12px 0 24px 0;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

/* Quote 过渡页 */
#quote-view {
    background: #02030a url("./universe2.jpg") center center / cover no-repeat fixed;
    text-align: center;
}

.quote-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 700px at 70% 25%, rgba(255, 255, 255, 0.10), rgba(0, 0, 0, 0)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.10));
    filter: blur(0px);
    opacity: 0.9;
    pointer-events: none;
}

.glass-card {
    width: min(920px, 92vw);
    padding: clamp(22px, 3.2vw, 44px);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.60);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    position: relative;
    overflow: hidden;
}

.glass-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    filter: blur(1px) saturate(1.05) contrast(1.05);
    transform: scale(1.06);
    mix-blend-mode: overlay;
    pointer-events: none;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: -80px;
    background:
        repeating-linear-gradient(
            115deg,
            rgba(255, 255, 255, 0.10),
            rgba(255, 255, 255, 0.10) 2px,
            rgba(255, 255, 255, 0.00) 10px,
            rgba(255, 255, 255, 0.00) 18px
        );
    opacity: 0.16;
    transform: rotate(12deg);
    pointer-events: none;
}

#quote-view .quote-text {
    font-family: 'Noto Serif SC', serif;
    font-size: clamp(15px, 1.7vw, 21px);
    line-height: 1.62;
    max-width: 74ch;
    margin: 0;
    position: relative;
    font-weight: 300;
    letter-spacing: 0.004em;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    text-wrap: pretty;
}

#quote-view .quote-text p {
    margin: 0.45em 0;
}

.quote-hint {
    margin-top: 18px;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.60);
    position: relative;
}

/* 照片廊页 */
#photo-gallery-view {
    background: radial-gradient(1200px 900px at 20% 5%, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0));
    justify-content: flex-start;
    padding-top: 46px;
    gap: 18px;
}

.series-header {
    width: min(1200px, 92vw);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.series-title-cn {
    font-family: 'Noto Serif SC', serif;
    font-size: clamp(22px, 3vw, 34px);
    letter-spacing: 0.02em;
}

.series-title-en {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    margin-top: 6px;
}

#photo-gallery-view .series-quote-text {
    font-family: 'Noto Serif SC', serif;
    font-size: 14px;
    line-height: 1.95;
    color: rgba(255, 255, 255, 0.74);
    max-width: 86ch;
    font-weight: 300;
    letter-spacing: 0.008em;
    text-wrap: pretty;
}

#photo-gallery-view .series-quote-text p {
    margin: 0.35em 0;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: min(1200px, 92vw);
    padding-bottom: 24px;
}

.photo-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
    cursor: zoom-in;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.photo-grid img:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.photo-grid img.placeholder {
    background-color: #ccc;
    min-height: 200px; /* Placeholder height */
}

.series-footer {
    width: min(1200px, 92vw);
    padding: 12px 0 18px 0;
    display: flex;
    justify-content: flex-start;
}

#photo-gallery-view .back-button {
    padding: 10px 14px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

#photo-gallery-view .back-button:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

/* Image Modal for Fullscreen Preview */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    padding: 24px;
    box-sizing: border-box;
}

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

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
}

@media (max-width: 900px) {
    .gallery-item img {
        height: 300px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .view {
        transition: none;
    }
    #home-view .works-button,
    .gallery-item,
    .gallery-item img,
    .photo-grid img,
    .secondary-button,
    #photo-gallery-view .back-button {
        transition: none;
    }
}
