/* ═══════════════════════════════════════════════════════════════
   玩家建築展示頁面 - Cyberpunk Theme
   ═══════════════════════════════════════════════════════════════ */

/* Hero */
.gallery-hero .server-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

/* Main */
.gallery-main {
    display: grid;
    gap: 3rem;
    margin: 2rem 0;
}

/* Gallery Item */
.gallery-item {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(0, 245, 212, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cardReveal 0.6s ease-out both;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

.gallery-item:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 245, 212, 0.3);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 245, 212, 0.15);
}

/* Gallery Images */
.gallery-images {
    position: relative;
}

/* Gallery Viewer (主圖區域) */
.gallery-viewer {
    position: relative;
    overflow: hidden;
}

.gallery-main-image {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

/* 左右箭頭 */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-prev {
    left: 0;
    border-radius: 0 8px 8px 0;
}

.gallery-next {
    right: 0;
    border-radius: 8px 0 0 8px;
}

.gallery-arrow:hover {
    background: rgba(0, 245, 212, 0.7);
    color: var(--bg-deep);
}

.gallery-arrow.arrow-hidden {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* 縮圖區域 */
.gallery-thumbnails {
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-thumbnails img {
    width: 100px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.gallery-thumbnails img:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.gallery-thumbnails img.thumb-active {
    opacity: 1;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 212, 0.5);
}

/* Gallery Info */
.gallery-info {
    padding: 2rem;
}

.build-name {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--neon-cyan);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.build-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.builder, .server-tag {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.builder strong {
    color: var(--neon-yellow);
}

.server-tag {
    background: rgba(0, 245, 212, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 245, 212, 0.2);
}

.build-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Submit Section */
.submit-section {
    margin: 3rem 0;
}

.submit-card {
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.1), rgba(0, 245, 212, 0.1));
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid rgba(247, 37, 133, 0.2);
}

.submit-card h2 {
    font-family: var(--font-display);
    color: var(--neon-pink);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.submit-card p {
    font-size: 1.3rem;
    color: var(--text-secondary);
}

.submit-card strong {
    color: var(--neon-cyan);
}

/* Footer */
.gallery-footer {
    margin-top: 4rem;
    padding: 2.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(0, 245, 212, 0.1);
}

.gallery-footer p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-hero .server-title {
        font-size: 1.8rem;
    }

    .gallery-main-image {
        height: 250px;
    }

    .gallery-info {
        padding: 1.5rem;
    }

    .build-name {
        font-size: 1.5rem;
    }

    .build-meta {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-main-image {
        height: 200px;
    }

    .gallery-info {
        padding: 1.2rem;
    }

    .submit-card {
        padding: 1.5rem;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Lightbox - 全螢幕圖片檢視器
   ═══════════════════════════════════════════════════════════════ */

/* 遮罩背景 */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: default;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 關閉按鈕 */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    width: 48px;
    height: 48px;
    background: rgba(128, 128, 128, 0.5);
    border: none;
    border-radius: 50%;
    color: #ccc;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10002;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(180, 180, 180, 0.6);
    color: #fff;
    transform: scale(1.1);
}

/* 主圖容器 */
.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 78vh;
    flex-shrink: 0;
}

/* 主圖 */
.lightbox-image {
    max-width: 90vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
    transition: opacity 0.25s ease;
    user-select: none;
    -webkit-user-drag: none;
}

/* 左右切換箭頭 */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    background: rgba(128, 128, 128, 0.4);
    border: none;
    border-radius: 50%;
    color: #ccc;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    line-height: 1;
}

.lightbox-arrow:hover {
    background: rgba(180, 180, 180, 0.5);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-arrow.disabled {
    opacity: 0.15;
    cursor: default;
    pointer-events: none;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* 底部縮圖列 */
.lightbox-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    padding: 10px 16px;
    background: rgba(30, 30, 30, 0.7);
    border-radius: 12px;
    max-width: 90vw;
    overflow-x: auto;
    justify-content: center;
    flex-wrap: nowrap;
}

.lightbox-thumbs img {
    width: 80px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.lightbox-thumbs img:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.lightbox-thumbs img.lb-thumb-active {
    opacity: 1;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 245, 212, 0.5);
}

/* 圖片計數器 */
.lightbox-counter {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(200, 200, 200, 0.7);
    font-size: 0.85rem;
    font-family: var(--font-body);
    pointer-events: none;
}

/* 讓原本的主圖可點擊 */
.gallery-main-image {
    cursor: zoom-in;
}

/* Lightbox 開啟時禁止背景滾動 */
body.lightbox-open {
    overflow: hidden;
}

/* Lightbox RWD */
@media (max-width: 768px) {
    .lightbox-image {
        max-width: 95vw;
        max-height: 70vh;
    }

    .lightbox-arrow {
        width: 42px;
        height: 42px;
        font-size: 1.4rem;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-close {
        top: 12px;
        right: 14px;
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .lightbox-thumbs img {
        width: 60px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .lightbox-arrow {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .lightbox-thumbs {
        gap: 6px;
        padding: 8px 10px;
    }

    .lightbox-thumbs img {
        width: 50px;
        height: 34px;
    }
}
