.wall-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, rgba(255, 235, 245, 0.9), rgba(248, 251, 255, 0.95));
    color: var(--text-primary);
}

/* 导航栏样式 - 与 project.html 保持一致 */
.navbar {
    background: var(--gradient-primary);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.nav-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 2px 0 0 0;
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

#navbarActions {
    display: inline-flex;
    gap: 8px;
}

#btnEnterProject span {
    margin-right: 4px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-btn[data-variant="outline"] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.35);
}

.nav-btn[data-variant="outline"]:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
}

.nav-btn.cta-highlight {
    animation: navPulse 1.6s ease-in-out 2;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

@keyframes navPulse {

    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 4px 18px rgba(255, 107, 157, 0.25);
    }

    50% {
        transform: translateY(-2px);
        box-shadow: 0 8px 28px rgba(255, 107, 157, 0.35);
    }
}

.nav-btn svg {
    width: 16px;
    height: 16px;
}

.wall-main {
    flex: 1;
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding: 0 24px 48px;
}

.wall-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    align-items: center;
}

.hero-content {
    background: rgba(255, 255, 255, 0.8);
    padding: 36px;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero-eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary-pink-dark);
}

.hero-content h2 {
    font-size: 2.1rem;
    line-height: 1.3;
}

.hero-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-top: 8px;
}

.filter-group {
    display: inline-flex;
    background: var(--light-gray);
    border-radius: var(--border-radius-xl);
    padding: 6px;
    gap: 6px;
}

.filter-btn,
.view-btn {
    border: none;
    padding: 10px 18px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.filter-btn.active,
.view-btn.active {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow);
}

/* 收藏标签样式 */
.filter-btn .tab-icon {
    font-size: 1.1em;
}

.filter-btn .favorite-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.filter-btn.active .favorite-count {
    background: rgba(255, 255, 255, 0.3);
}

/* 未登录状态 - 收藏标签置灰 */
.filter-btn[data-filter="favorite"].disabled {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.filter-btn[data-filter="favorite"].disabled::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: var(--white);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 8px;
}

.filter-btn[data-filter="favorite"].disabled:hover::after {
    opacity: 1;
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.sort-group select {
    border-radius: var(--border-radius);
    border: 1px solid var(--medium-gray);
    padding: 8px 12px;
    background: var(--white);
    color: var(--text-primary);
}

.hero-preview {
    display: flex;
    justify-content: center;
}

.preview-card {
    width: 100%;
    max-width: 320px;
    border-radius: var(--border-radius-xl);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.glass {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 227, 239, 0.95));
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
}

.preview-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.preview-stat {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: var(--primary-pink-dark);
}

.preview-stat+.preview-stat {
    border-top: 1px dashed rgba(255, 107, 157, 0.2);
    padding-top: 10px;
    margin-top: 10px;
}

.stat-label {
    color: var(--text-secondary);
}

.preview-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.wall-grid-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
}

.grid-count {
    color: var(--text-secondary);
}

/* 风格卡片网格 - 使用 Grid 布局实现每行5列 */
.wall-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 5列，每列等宽 */
    gap: 16px;
    width: 100%;
}

.wall-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    /* Grid 布局不需要 inline-block 和 break-inside */
}

.wall-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-image-wrap {
    position: relative;
    padding-top: 120%;
    overflow: hidden;
}

.card-image-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.wall-card:hover .card-overlay {
    opacity: 1;
}

.card-tag {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    color: var(--primary-pink-dark);
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.card-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-height: 28px;
}

.card-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.card-tag-chip.is-placeholder {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.05);
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    border: none;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.icon-btn span:first-child {
    font-size: 1rem;
}

.icon-btn:hover {
    background: rgba(255, 107, 157, 0.12);
    color: var(--primary-pink-dark);
}

.icon-btn.active {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow);
}

.series-load-more {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.grid-empty {
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.wall-footer {
    margin: 24px auto 32px;
    max-width: 1120px;
    width: 100%;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 24px;
}

.preview-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.preview-modal.hidden {
    display: none;
}

.preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 28, 0.65);
}

.preview-panel {
    position: relative;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    background: var(--white);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 320px);
    z-index: 1;
    box-shadow: var(--shadow-xl);
}

.preview-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.preview-image-wrap {
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-meta h4 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.preview-tags {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.preview-desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

.preview-nav {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.wall-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 32, 44, 0.92);
    color: var(--white);
    padding: 12px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 2500;
}

.wall-toast.hidden {
    display: none;
}

/* ===== 响应式布局 (瀑布流 2-5列) ===== */

/* 超大屏幕 (1200px+): 5列 */
@media (min-width: 1200px) {
    .wall-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }
}

/* 中等屏幕 (900px - 1199px): 4列 */
@media (min-width: 900px) and (max-width: 1199px) {
    .wall-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }

    .wall-main {
        padding: 0 20px 40px;
    }
}

/* 平板屏幕 (600px - 899px): 3列 */
@media (min-width: 600px) and (max-width: 899px) {
    .wall-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .wall-main {
        padding: 0 16px 32px;
    }

    .hero-content {
        padding: 28px 24px;
    }
}

/* 手机横屏/小平板 (480px - 599px): 2列 */
@media (min-width: 480px) and (max-width: 599px) {
    .wall-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .wall-main {
        padding: 0 12px 24px;
        gap: 32px;
    }

    .hero-content {
        padding: 24px 20px;
    }

    .filter-group {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* 手机竖屏 (< 480px): 2列 */
@media (max-width: 479px) {
    .wall-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .wall-main {
        padding: 0 10px 24px;
        gap: 20px;
    }

    .navbar {
        padding: 8px 12px;
    }

    .nav-brand h1 {
        font-size: 1.1rem;
        margin: 0;
    }

    .nav-subtitle {
        display: none;
    }

    .nav-actions {
        gap: 6px;
    }

    .nav-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    #btnEnterProject {
        margin-right: 0 !important;
        padding: 6px 10px;
    }

    #btnEnterProject span {
        display: none;
    }

    .hero-content {
        padding: 20px 16px;
    }

    .hero-content h2 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .filter-group {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
    }

    .filter-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 4px;
        font-size: 0.85rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .sort-group {
        justify-content: space-between;
    }

    .preview-card {
        max-width: none;
        padding: 20px;
    }
}

/* 超小屏幕 (< 360px): 1列 */
@media (max-width: 359px) {
    .wall-grid {
        grid-template-columns: 1fr;
    }

    .nav-brand h1 {
        font-size: 1rem;
    }
}

/* 预览模态框响应式 */
@media (max-width: 960px) {
    .preview-panel {
        grid-template-columns: 1fr;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }

    .preview-image-wrap {
        flex-shrink: 0;
        max-height: 50vh;
        min-height: 200px;
    }

    .preview-info {
        overflow-y: auto;
        flex: 1;
        padding: 20px;
    }
}

/* ===== 按钮加载状态 ===== */
button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
    pointer-events: none;
}

button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 收藏按钮动画效果 */
button[data-action="favorite"] {
    transition: transform 0.2s ease, background-color 0.2s ease;
}

button[data-action="favorite"]:active {
    transform: scale(0.95);
}

button[data-action="favorite"]:disabled {
    cursor: not-allowed;
}
