/* 梗图页面样式 */
.memes-page .container {
    max-width: 90rem;
}

.memes-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    min-height: 70vh;
}

/* ===== 左侧快捷菜单 ===== */
.memes-sidebar {
    position: sticky;
    top: 5rem;
    flex-shrink: 0;
    width: 14rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    background: rgba(30, 30, 70, 0.5);
    border: 0.0625rem solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1rem 0;
    box-shadow: var(--shadow-soft);
}

.memes-sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-color);
    padding: 0.5rem 1.25rem 0.75rem;
    border-bottom: 0.0625rem solid var(--glass-border);
    margin-bottom: 0.5rem;
}

.memes-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.memes-sidebar-list li {
    border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.04);
}

.memes-sidebar-list li:last-child {
    border-bottom: none;
}

.memes-sidebar-link {
    display: block;
    padding: 0.5rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    border-left: 0.1875rem solid transparent;
}

.memes-sidebar-link:hover,
.memes-sidebar-link:focus {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary-color);
}

/* 侧边栏滚动条美化 */
.memes-sidebar::-webkit-scrollbar {
    width: 0.375rem;
}

.memes-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.memes-sidebar::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 0.1875rem;
}

/* ===== 右侧图片展示区 ===== */
.memes-content {
    flex: 1;
    min-width: 0;
}

.memes-section {
    scroll-margin-top: 5rem;
    margin-bottom: 2.5rem;
}

.memes-section:last-child {
    margin-bottom: 0;
}

.memes-section-header {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    position: relative;
}

.memes-section-header::before,
.memes-section-header::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 0.0625rem;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

.memes-section-header::before {
    left: 0;
}

.memes-section-header::after {
    right: 0;
}

.memes-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 0.0625rem solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.memes-image-wrapper:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-glow);
}

.memes-image-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    display: block;
}

/* ===== 响应式 ===== */
@media (max-width: 48rem) {
    .memes-layout {
        flex-direction: column;
    }

    .memes-sidebar {
        position: static;
        width: 100%;
        max-height: none;
        overflow-y: visible;
    }

    .memes-sidebar-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        padding: 0 0.75rem 0.5rem;
    }

    .memes-sidebar-list li {
        border-bottom: none;
    }

    .memes-sidebar-link {
        padding: 0.35rem 0.75rem;
        border-left: none;
        border-radius: 0.375rem;
        background: rgba(99, 102, 241, 0.08);
        font-size: 0.85rem;
    }

    .memes-sidebar-link:hover {
        border-left-color: transparent;
    }

    .memes-section-header::before,
    .memes-section-header::after {
        width: 15%;
    }
}
