@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: #06050e;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Atmosphere */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.gallery-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* Header with Glassmorphism */
.header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: 16px;
    position: sticky;
    top: 10px;
    z-index: 100;
}

.back-btn {
    text-decoration: none;
    color: #00e5ff;
    font-size: 18px;
    margin-right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 229, 255, 0.15);
}

.back-btn:hover {
    background: #00e5ff;
    color: #000;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.header-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* Bento Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 140px;
    gap: 10px;
    transition: opacity 0.3s ease;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0, 229, 255, 0.1);
    background: #0d0a1c;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.gallery-item.large {
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(6, 5, 14, 0.9) 0%, rgba(6, 5, 14, 0.4) 60%, transparent 100%);
    padding: 12px 15px;
    z-index: 5;
    transition: all 0.3s ease;
}

.item-label {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: #00e5ff;
    box-shadow: 0 8px 20px rgba(0, 229, 255, 0.25);
}

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

.gallery-item:hover .item-overlay {
    background: linear-gradient(0deg, rgba(0, 229, 255, 0.4) 0%, rgba(6, 5, 14, 0.2) 100%);
}

/* Lightbox Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.image-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 95%;
    max-height: 85%;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(0, 229, 255, 0.3);
    box-shadow: 0 15px 40px rgba(0, 229, 255, 0.2);
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    object-fit: contain;
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-modal-btn:hover {
    color: #00e5ff;
    border-color: #00e5ff;
    background: rgba(0, 229, 255, 0.1);
}

.category-label {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #00e5ff;
    color: #000;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.swipe-hint {
    position: absolute;
    bottom: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

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