@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: #050505;
    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(255, 204, 51, 0.05) 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.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    position: sticky;
    top: 10px;
    z-index: 100;
}

.back-btn {
    text-decoration: none;
    color: #ffcc33;
    font-size: 18px;
    margin-right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 204, 51, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #ffcc33;
    color: #000;
}

.header-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* 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: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #111;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

/* Reset specific spans for dynamic logic */
.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 ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    border-color: #ffcc33;
    box-shadow: 0 5px 15px rgba(255, 204, 51, 0.15);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Floating Action Button (Category Menu) */
.filter-fab {
    position: fixed;
    right: 20px;
    bottom: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 12px;
}

/* Tooltip Guidance */
.filter-tooltip {
    background: rgba(255, 204, 51, 0.9);
    color: #000;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    position: absolute;
    bottom: 70px;
    right: 0;
    box-shadow: 0 5px 15px rgba(255, 204, 51, 0.3);
    pointer-events: none;
    animation: floatTooltip 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.filter-tooltip.active {
    opacity: 1;
}

.filter-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(255, 204, 51, 0.9);
}

@keyframes floatTooltip {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.fab-main {
    width: 50px;
    height: 50px;
    background: #ffcc33;
    color: #000;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 204, 51, 0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-main.active {
    transform: rotate(45deg);
    background: #333;
    color: #ffcc33;
}

.fab-options {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.8);
    transition: all 0.3s ease;
}

.fab-options.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.filter-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.filter-btn:hover,
.filter-btn.active {
    background: #ffcc33;
    color: #000;
    border-color: #ffcc33;
}

/* Modal Improvements */
.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: 12px;
    overflow: hidden;
    background: #000;
}

.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.15);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    z-index: 10001;
}

.category-label {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #ffcc33;
    color: #000;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
}

.swipe-hint {
    position: absolute;
    bottom: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}