/* 游戏动漫壁纸收藏页面样式 */
.wallpaper-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    transition: all 0.3s ease;
}

/* 导航栏展开时的容器调整 */
.sidebar.expanded .wallpaper-container {
    margin-left: 280px; /* 或者根据你的导航栏宽度调整 */
    max-width: calc(100vw - 320px); /* 减去导航栏宽度和边距 */
    transition: all 0.3s ease;
}

/* 导航栏收起时的容器调整 */
.sidebar.collapsed .wallpaper-container {
    margin-left: 80px; /* 或者根据你收起后的导航栏宽度调整 */
    max-width: calc(100vw - 120px);
    transition: all 0.3s ease;
}

/* 如果你的导航栏完全隐藏时 */
.sidebar.hidden .wallpaper-container {
    margin-left: 0;
    max-width: 1400px;
    transition: all 0.3s ease;
}

/* 页面标题区域 */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.page-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.page-title i {
    color: #4f46e5;
    background: none;
    -webkit-text-fill-color: #4f46e5;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* 内容包装器 */
.content-wrapper {
    display: flex;
    gap: 2rem;
}

.wp-main-content {
    flex: 1;
    margin: 0 auto;
}

/* 筛选和搜索区域 */
.filter-section {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.05));
    border-radius: 1rem;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    z-index: 1;
}

.search-box input {
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    font-size: 1rem;
    width: 100%;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.character-filter select, .resolution-filter select, .game-filter select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    font-size: 1rem;
    min-width: 150px;
    transition: var(--transition);
    background: white;
    flex: 1;
}

.character-filter select:focus, .resolution-filter select:focus, .game-filter select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 壁纸卡片网格 */
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.wallpaper-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
}

.wallpaper-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.3);
}

.wallpaper-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.wallpaper-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    cursor: pointer;
}

.wallpaper-card:hover .wallpaper-image img {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.wallpaper-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent, rgba(0,0,0,0.7));
    opacity: 0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
}

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

.overlay-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.action-btn {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 0.5rem;
    color: #4f46e5;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: white;
    transform: scale(1.1);
}

.wallpaper-meta {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.resolution-badge, .size-badge {
    padding: 0.3rem 0.6rem;
    background: rgba(79, 70, 229, 0.9);
    color: white;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* 壁纸信息 */
.wallpaper-info {
    padding: 1.5rem;
}

.wallpaper-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.4;
}

.wallpaper-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.detail-item i {
    color: #4f46e5;
    width: 16px;
}

.wallpaper-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.3rem 0.6rem;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.wallpaper-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.upload-date, .download-count {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.upload-date i, .download-count i {
    color: #4f46e5;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    color: #4f46e5;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 1rem;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
    text-align: center;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wallpaper-container {
        padding: 1rem;
    }

    .page-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .filter-controls {
        flex-direction: column;
    }

    .wallpaper-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .wallpaper-footer {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .modal-header {
        padding: 1rem 1.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-footer {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .wallpaper-grid {
        grid-template-columns: 1fr;
    }

    .overlay-actions {
        gap: 0.3rem;
    }

    .action-btn {
        padding: 0.4rem;
        font-size: 0.9rem;
    }

    .wallpaper-tags {
        gap: 0.3rem;
    }

    .tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

/* 动画效果 */
.wallpaper-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 隐藏卡片的动画 */
.wallpaper-card.hidden {
    display: none;
}

.wallpaper-card.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

/* 模态框动画 */
.modal.show {
    display: block;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content.show {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}