/* ================= 基础布局 ================= */
.return-link {
    font-size: 13px;
    transition: color 0.3s ease;
}

.nav-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.hide-by-default {
    display: none !important;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 75vh;
    display: flex;
    flex-direction: column;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 40px;
}

.page-title {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--text-main);
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 5px;
}

.view-toggle {
    background: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
    padding: 8px 15px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: var(--font-mono);
}

.view-toggle:hover {
    background: var(--text-main);
    color: var(--bg-main);
}

.loading-state {
    text-align: center;
    padding: 100px 0;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    width: 100%;
}

/* ================= 伪造加载屏 ================= */
.fake-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-main);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-content {
    text-align: center;
    color: var(--theme-gold);
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px auto;
    border: 1px solid var(--border-color);
    border-top: 1px solid var(--theme-gold);
    border-radius: 50% !important;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 10px;
    letter-spacing: 2px;
}

/* ================= 幻灯片基础 UI ================= */
.slider-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    min-height: 60vh;
    animation: fadeIn 0.6s ease;
}

.slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
    position: relative;
}

.arrow-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    padding: 20px;
}

.left-arrow {
    left: -60px;
}

.right-arrow {
    right: -60px;
}

.arrow-btn:hover {
    color: var(--theme-gold);
}

.left-arrow:hover {
    transform: translate(-10px, -50%);
}

.right-arrow:hover {
    transform: translate(10px, -50%);
}

.slide-content {
    flex: 1;
    min-width: 0;
    text-align: center;
    position: relative;
    width: 100%;
    padding: 0 40px;
}

.slide-counter {
    font-size: 12px;
    color: var(--theme-gold);
    letter-spacing: 2px;
    margin-bottom: 30px;
}

/* ================= 🌟 三图同屏 Cover Flow 景深轮播 ================= */
.coverflow-viewport {
    position: relative;
    width: 100%;
    height: 55vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    overflow: hidden;
}

.coverflow-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
}

.coverflow-img {
    position: absolute;
    max-width: 60%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
        opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
        filter 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity, filter;
    cursor: pointer;
}

[data-theme="dark"] .coverflow-img {
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
}

/* 状态 1：中间激活的图片 */
.coverflow-img.is-center {
    transform: translateX(0) translateZ(0) scale(1);
    opacity: 1;
    filter: blur(0);
    z-index: 3;
    pointer-events: auto;
}

/* 状态 2：左侧的图片 */
.coverflow-img.is-left {
    transform: translateX(-60%) translateZ(-200px) scale(0.8);
    opacity: 0.5;
    filter: blur(5px);
    z-index: 2;
    pointer-events: none;
}

/* 状态 3：右侧的图片 */
.coverflow-img.is-right {
    transform: translateX(60%) translateZ(-200px) scale(0.8);
    opacity: 0.5;
    filter: blur(5px);
    z-index: 2;
    pointer-events: none;
}

/* 状态 4：隐藏在更远处的图片 */
.coverflow-img.is-hidden {
    transform: translateX(0) translateZ(-400px) scale(0.5);
    opacity: 0;
    filter: blur(10px);
    z-index: 1;
    pointer-events: none;
}

/* 悬浮时的微动效 */
.slide-content:hover .coverflow-img.is-center {
    transform: translateX(0) translateZ(0) scale(1) translateY(-10px);
}

.slide-info-area {
    margin-top: 40px;
}

.slide-title {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--text-main);
}

.slide-tags {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.concept-hint {
    font-size: 10px;
    color: var(--theme-gold);
    margin-top: 15px;
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity 0.4s;
}

.slide-content:hover .concept-hint {
    opacity: 1;
}

/* ================= 网格视图 UI ================= */
.grid-view {
    animation: fadeIn 0.6s ease;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 60px 40px;
}

.portfolio-item {
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
}

.portfolio-img-wrapper {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 250px;
}

.portfolio-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
    transition: transform 0.4s ease;
}

[data-theme="dark"] .portfolio-img {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.portfolio-item:hover .portfolio-img {
    transform: translateY(-8px) scale(1.02);
}

.p-title {
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 5px;
    color: var(--text-main);
    transition: color 0.3s;
}

.portfolio-item:hover .p-title {
    color: var(--theme-gold);
}

.p-tags {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

@media (max-width: 900px) {
    .left-arrow {
        left: -20px;
    }

    .right-arrow {
        right: -20px;
    }

    .slide-content {
        padding: 0 20px;
    }
}