/* ========================================
   Fashion Gallery - Base Styles
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

/* ========================================
   Header
======================================== */
header {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.3);
}

header h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    color: #ccc;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #87ceeb;
    text-decoration: none;
    transition: color 0.3s;
}

.back-link:hover {
    color: #ffd700;
}

/* ========================================
   Filter Buttons
======================================== */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 30px 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #ffd700;
    background: transparent;
    color: #ffd700;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    font-family: 'Noto Sans JP', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
    background: #ffd700;
    color: #1a1a2e;
}

/* ========================================
   Gallery Grid
======================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 40px 60px;
    max-width: 1600px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    background: rgba(255, 255, 255, 0.1);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.3s;
}

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

.item-title {
    padding: 15px;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    font-size: 1rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* ========================================
   Lightbox
======================================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001;
}

.lightbox-close:hover {
    color: #ffd700;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: #fff;
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s;
    user-select: none;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #ffd700;
}

#lightbox-caption {
    color: #fff;
    font-size: 1.2rem;
    margin-top: 20px;
    text-align: center;
}

/* ========================================
   Loading Animation
======================================== */
.gallery-item img {
    background: linear-gradient(90deg, #2a2a4a 25%, #3a3a5a 50%, #2a2a4a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.gallery-item img[src] {
    animation: none;
    background: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 20px 30px 50px;
    }

    .gallery-item img {
        height: 350px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 1rem;
    }

    .filter-buttons {
        gap: 8px;
        padding: 20px 15px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        padding: 15px;
        gap: 15px;
    }

    .gallery-item img {
        height: 240px;
    }

    .item-title {
        font-size: 0.85rem;
        padding: 10px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 10px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 32px;
    }

    #lightbox-caption {
        font-size: 1rem;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 25px 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .gallery-item img {
        height: 200px;
    }

    .item-title {
        font-size: 0.75rem;
        padding: 8px;
    }
}
