﻿/* ===== 全局样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== 顶部蓝色条带 ===== */
.topbar {
    background: linear-gradient(135deg, #0a1e30 0%, #1a3f5c 50%, #1f4a6a 100%);
    padding: 0.6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 24px rgba(10, 30, 48, 0.35);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid rgba(255, 215, 100, 0.3);
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    min-height: 74px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.logo-icon {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #f0c97a;
    border: 1px solid rgba(255, 215, 100, 0.25);
    backdrop-filter: blur(4px);
    flex-shrink: 0;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.logo-text .main {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.logo-text .sub {
    font-size: 0.52rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
    max-width: 100%;
}

.logo-text .main span {
    color: #f0c97a;
    font-weight: 300;
    margin: 0 4px;
}

/* ===== 导航菜单 ===== */
.nav-menu {
    display: flex;
    gap: 0.2rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 40px;
    padding: 0.3rem 0.3rem;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.nav-item {
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.nav-item i {
    margin-right: 0.4rem;
    font-size: 0.75rem;
}

.nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
}

.nav-item.active {
    color: #0a1e30;
    background: #f0c97a;
    box-shadow: 0 4px 16px rgba(240, 201, 122, 0.35);
    font-weight: 600;
}

.nav-item.active i {
    color: #0a1e30;
}

/* ===== 主容器 ===== */
.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 2rem 1rem;
    flex: 1 0 auto;
    width: 100%;
}

/* ===== 页面切换 ===== */
.page-content {
    display: none;
    animation: fadeUp 0.5s ease;
}

.page-content.active {
    display: flex;
    gap: 2.5rem;
    align-items: stretch;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 首页左栏 ===== */
.project-intro {
    flex: 1.1;
    background: #ffffff;
    border-radius: 28px;
    padding: 2.5rem 2.8rem;
    box-shadow: 0 8px 40px rgba(10, 30, 48, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: none;
    user-select: none;
}

.project-intro h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #0a1e30;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.project-intro h2 span {
    color: #1a4a6a;
    border-bottom: 3px solid #f0c97a;
    padding-bottom: 2px;
}

.project-intro .desc {
    font-size: 1rem;
    color: #4a637a;
    line-height: 1.8;
    margin-bottom: 1.8rem;
    max-width: 95%;
}

.project-stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0a1e30;
    letter-spacing: -0.5px;
}

.stat-item .label {
    font-size: 0.75rem;
    color: #7a94ab;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.1rem;
}

.stat-item .number .accent {
    color: #f0c97a;
}

/* ===== 首页右栏：轮播 ===== */
.hero-carousel {
    flex: 1.2;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    background: #0a1e30;
    min-height: 420px;
    box-shadow: 0 8px 40px rgba(10, 30, 48, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 215, 100, 0.15);
    border: 1px solid rgba(255, 215, 100, 0.2);
    border-radius: 40px;
    padding: 0.3rem 1.2rem;
    color: #f0c97a;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    backdrop-filter: blur(8px);
    z-index: 5;
}

.carousel-indicators {
    position: absolute;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    z-index: 5;
}

.carousel-indicators span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: background 0.3s, transform 0.3s;
    cursor: default;
}

.carousel-indicators span.active {
    background: #f0c97a;
    transform: scale(1.3);
}

/* ===== 效果展示页面：侧边栏 + 主内容 ===== */
.gallery-layout {
    display: flex;
    gap: 2rem;
    width: 100%;
    align-items: flex-start;
}

.gallery-sidebar {
    flex: 0 0 200px;
    background: #ffffff;
    border-radius: 20px;
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 90px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a637a;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-left: 3px solid transparent;
}

.category-item i {
    width: 1.2rem;
    font-size: 0.9rem;
    color: #8ba0b5;
}

.category-item:hover {
    background: #f0f4f9;
    color: #1a3f5c;
}

.category-item.active {
    background: #eef4fa;
    color: #1a3f5c;
    border-left-color: #f0c97a;
    font-weight: 600;
}

.category-item.active i {
    color: #f0c97a;
}

.gallery-main {
    flex: 1;
    min-width: 0;
}

/* 工具栏：结果计数在左，搜索框在右 */
.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-count {
    font-size: 0.85rem;
    color: #7a94ab;
    font-weight: 500;
    white-space: nowrap;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 60px;
    padding: 0.3rem 0.3rem 0.3rem 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid #e6edf4;
    transition: box-shadow 0.25s;
    flex: 0 1 320px;
    max-width: 400px;
    margin-left: auto;
}

.search-box:focus-within {
    box-shadow: 0 8px 24px rgba(10, 30, 48, 0.08);
    border-color: #1a3f5c40;
}

.search-box i {
    color: #8ba0b5;
    font-size: 0.9rem;
    margin-right: 0.6rem;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    color: #1e293b;
}

.search-box input::placeholder {
    color: #a7bccf;
}

.search-box button {
    background: linear-gradient(145deg, #1a3f5c, #0f2a44);
    border: none;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.search-box button:hover {
    background: linear-gradient(145deg, #234a6e, #12324f);
    transform: scale(0.97);
}

/* ===== 图库网格 ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.gallery-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-5px);
}

.gallery-card .card-img {
    aspect-ratio: 16 / 10;
    background: #e8edf3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gallery-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.gallery-card:hover .card-img img {
    transform: scale(1.03);
}

.gallery-card .card-img .badge-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(10, 30, 48, 0.8);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.gallery-card .card-body {
    padding: 1rem 1.2rem 1.2rem;
}

.gallery-card .card-body .title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0a1e30;
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.gallery-card .card-body .meta {
    font-size: 0.7rem;
    color: #7a94ab;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.gallery-card .card-body .meta i {
    margin-right: 0.15rem;
    font-size: 0.6rem;
}

.gallery-card .card-body .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.4rem;
}

.gallery-card .card-body .tags span {
    background: #e8f0fe;
    color: #4285f4;
    font-size: 0.6rem;
    font-weight: 500;
    padding: 0.1rem 0.6rem;
    border-radius: 30px;
}

/* ===== 占位页面 ===== */
.placeholder-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 8px 40px rgba(10, 30, 48, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.02);
    min-height: 400px;
    text-align: center;
}

.placeholder-page i {
    font-size: 4rem;
    color: #c5d6e6;
    margin-bottom: 1.2rem;
}

.placeholder-page h3 {
    font-size: 1.5rem;
    color: #1a3f5c;
    margin-bottom: 0.5rem;
}

.placeholder-page p {
    color: #7a94ab;
    max-width: 500px;
    font-size: 0.95rem;
}

/* ===== 全屏预览遮罩 ===== */
.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(6px);
}

.preview-overlay.active {
    display: flex;
    opacity: 1;
}

.preview-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
}

.preview-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    user-select: none;
}

.preview-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 10;
    background: rgba(0,0,0,0.3);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

.preview-close:hover {
    opacity: 1;
    transform: scale(1.05);
    background: rgba(255,255,255,0.15);
}

.preview-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 3rem;
    cursor: pointer;
    z-index: 10;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    user-select: none;
}

.preview-arrow:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
    transform: translateY(-50%) scale(1.1);
}

.preview-arrow.prev {
    left: 1.5rem;
}

.preview-arrow.next {
    right: 1.5rem;
}

.preview-footer {
    position: absolute;
    bottom: 2.5rem;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;
    z-index: 10;
    pointer-events: none;
}

.preview-title {
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    font-weight: 500;
    background: rgba(0,0,0,0.3);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    backdrop-filter: blur(4px);
    pointer-events: auto;
    letter-spacing: 0.3px;
}

.preview-download {
    background: rgba(255, 215, 100, 0.9);
    color: #0a1e30;
    padding: 0.5rem 1.6rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

.preview-download:hover {
    background: #f0c97a;
    transform: scale(1.02);
}

/* ===== 页脚 ===== */
.site-footer {
    background: linear-gradient(135deg, #0a1e30 0%, #1a3f5c 50%, #1f4a6a 100%);
    border-top: 2px solid rgba(255, 215, 100, 0.2);
    padding: 0.6rem 4rem;
    margin-top: 2rem;
    flex-shrink: 0;
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
}

.footer-copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    letter-spacing: 0.3px;
}

.footer-copyright .year {
    font-weight: 600;
    color: #f0c97a;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1.2rem;
    font-size: 0.85rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.25s ease;
    font-weight: 450;
    letter-spacing: 0.3px;
    cursor: pointer;
}

.footer-links a:hover {
    color: #f0c97a;
}

.footer-links .sep {
    color: rgba(255, 255, 255, 0.2);
    font-weight: 300;
    user-select: none;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .page-content.active {
        flex-direction: column;
    }

    .project-intro {
        padding: 2rem;
        pointer-events: none;
    }

    .project-intro .desc {
        max-width: 100%;
    }

    .hero-carousel {
        min-height: 300px;
    }

    .topbar {
        padding: 0.6rem 1.2rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        min-height: auto;
    }

    .topbar-left {
        justify-content: center;
    }

    .nav-menu {
        justify-content: center;
        background: transparent;
        padding: 0;
        border: none;
        gap: 0.1rem;
        flex-wrap: wrap;
    }

    .nav-item {
        padding: 0.35rem 0.9rem;
        font-size: 0.75rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 20px;
    }

    .nav-item.active {
        background: #f0c97a;
    }

    .logo-text .sub {
        font-size: 0.5rem;
        text-align: center;
    }
    .logo-text .main {
        font-size: 1rem;
        text-align: center;
        white-space: normal;
    }

    .gallery-layout {
        flex-direction: column;
    }

    .gallery-sidebar {
        flex: none;
        width: 100%;
        position: static;
        padding: 0.8rem 0;
        border-radius: 16px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
        background: transparent;
        box-shadow: none;
        border: none;
    }

    .category-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem;
        justify-content: center;
    }

    .category-item {
        padding: 0.4rem 1rem;
        border-radius: 30px;
        border-left: none;
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        font-size: 0.8rem;
    }

    .category-item.active {
        border-left: none;
        background: #1a3f5c;
        color: white;
    }
    .category-item.active i {
        color: white;
    }

    .gallery-toolbar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .search-box {
        flex: 1 1 200px;
        margin-left: 0;
        max-width: 100%;
    }

    .result-count {
        order: 0;
    }

    .site-footer {
        padding: 0.5rem 3rem;
    }
    .footer-copyright {
        font-size: 0.7rem;
    }
    .footer-links {
        font-size: 0.8rem;
        gap: 0.3rem 0.8rem;
    }

    .preview-image-wrap {
        padding: 0.5rem 1rem;
    }
    .preview-arrow.prev {
        left: 0.5rem;
    }
    .preview-arrow.next {
        right: 0.5rem;
    }
    .preview-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }
    .preview-footer {
        padding: 0 1.5rem;
        bottom: 1.5rem;
        flex-wrap: wrap;
        gap: 0.8rem;
        justify-content: center;
    }
    .preview-title {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .main-container {
        padding: 1rem 1rem 0.5rem;
    }

    .topbar-left .logo-text .main {
        font-size: 0.9rem;
    }
    .topbar-left .logo-text .sub {
        font-size: 0.42rem;
    }
    .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .project-intro h2 {
        font-size: 1.6rem;
    }
    .project-stats {
        gap: 1.2rem;
    }
    .stat-item .number {
        font-size: 1.4rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .nav-item {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
    }
    .nav-item i {
        display: none;
    }

    .site-footer {
        padding: 0.5rem 1.5rem;
    }
    .footer-copyright {
        font-size: 0.6rem;
    }
    .footer-links {
        font-size: 0.7rem;
        gap: 0.2rem 0.6rem;
    }
    .footer-links .sep {
        display: inline;
    }

    .gallery-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        margin-left: 0;
        flex: 1 1 auto;
    }
    .result-count {
        text-align: left;
    }

    .preview-image-wrap {
        padding: 0.3rem 0.5rem;
    }
    .preview-arrow {
        font-size: 2rem;
        padding: 0.3rem 0.6rem;
    }
    .preview-arrow.prev {
        left: 0.2rem;
    }
    .preview-arrow.next {
        right: 0.2rem;
    }
    .preview-close {
        top: 0.8rem;
        right: 0.8rem;
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }
    .preview-footer {
        padding: 0 1rem;
        bottom: 1rem;
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
    }
    .preview-title {
        font-size: 0.8rem;
        padding: 0.2rem 0.8rem;
    }
    .preview-download {
        font-size: 0.8rem;
        padding: 0.3rem 1.2rem;
    }
}

@media (max-width: 450px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .footer-links {
        flex-direction: column;
        gap: 0.1rem;
    }
    .footer-links .sep {
        display: none;
    }
}