* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #000000;
    color: #fff;
    min-height: 100vh;
}

/* Header - 磨砂半透明效果 */
.bing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 10px 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

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

.nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
.bing-main {
    padding-top: 60px;
}

/* Gallery - 三列平铺自适应 */
.bing-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 16px;
    max-width: 1800px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.gallery-card {
    width: 100%;
    height: 100%;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-card img {
    transform: scale(1.08);
}

/* 图片底部信息 */
.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .card-info {
    opacity: 1;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* 操作按钮 */
.card-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .card-actions {
    opacity: 1;
}

.like-btn,
.download-btn {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.like-btn:hover,
.download-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.like-btn {
    background: rgba(239, 68, 68, 0.7);
}

.like-btn:hover {
    background: rgba(239, 68, 68, 0.9);
}

/* 已点赞状态：金色高亮，提示访客再次点击可取消 */
.like-btn.liked {
    background: rgba(250, 204, 21, 0.92);
    color: #1a1a1a;
}

.like-btn.liked:hover {
    background: rgba(250, 204, 21, 1);
}

/* Loading */
.loading {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 40px;
    gap: 12px;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
}

.load-more {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.load-more:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.load-more:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

/* Footer */
.bing-footer {
    text-align: center;
    padding: 32px 24px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
}

.bing-footer p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

.bing-footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.bing-footer a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Lightbox - 图片弹窗 */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.98);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* 图片信息栏 */
.lightbox-info {
    width: 100%;
    max-width: 900px;
    padding: 20px 0;
    text-align: center;
}

.lightbox-title {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 8px;
}

.lightbox-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* 左右切换按钮 */
.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 1001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-prev.hidden,
.lightbox-next.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 关闭按钮 */
.lightbox-close {
    position: fixed;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 1001;
}

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

/* 底部操作按钮 */
.lightbox-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.lightbox-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.lightbox-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.lightbox-action-btn.like {
    background: rgba(239, 68, 68, 0.7);
    border-color: rgba(239, 68, 68, 0.3);
}

.lightbox-action-btn.like:hover {
    background: rgba(239, 68, 68, 0.9);
}

.lightbox-action-btn.like.liked {
    background: rgba(250, 204, 21, 0.92);
    border-color: rgba(250, 204, 21, 0.4);
    color: #1a1a1a;
}

/* Responsive */
@media (max-width: 1200px) {
    .bing-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }
}

@media (max-width: 600px) {
    .header-inner {
        padding: 0 14px;
    }

    .logo-text {
        font-size: 14px;
    }

    .nav {
        gap: 10px;
    }

    .nav a {
        font-size: 12px;
        padding: 6px 10px;
    }

    .bing-main {
        padding-top: 50px;
    }

    .bing-gallery {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .card-info {
        padding: 14px;
    }

    .card-title {
        font-size: 13px;
    }

    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 120px;
        padding: 10px 14px;
        font-size: 20px;
    }

    .lightbox-prev {
        left: 16px;
    }

    .lightbox-next {
        right: 16px;
    }

    .lightbox-close {
        top: 16px;
        right: 16px;
        font-size: 20px;
        padding: 8px 12px;
    }

    .lightbox-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
}