.gallery-page {
    min-height: 100vh;
    background: linear-gradient(145deg, var(--baby-100), #d9e9fa);
}

.gallery-header {
    padding: 4rem 1.5rem;
    background: linear-gradient(135deg, var(--baby-600), var(--baby-500), var(--baby-400));
    text-align: center;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.gallery-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(137,196,244,0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.gallery-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gallery-header h1 i {
    color: var(--baby-300);
    margin-right: 0.5rem;
}

.gallery-header p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 1.8rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-stat {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
}

.gallery-stat i {
    color: var(--baby-300);
    font-size: 1.2rem;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 0.5rem;
}

.gallery-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    border: 1px solid var(--baby-200);
    background: white;
    color: var(--baby-500);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 500;
}

.filter-btn:hover {
    background: var(--baby-100);
    border-color: var(--baby-300);
}

.filter-btn.active {
    background: var(--baby-300);
    color: white;
    border-color: var(--baby-300);
}

.gallery-search {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
    max-width: 300px;
}

.gallery-search input {
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    border: 1px solid var(--baby-200);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    width: 100%;
}

.gallery-search input:focus {
    outline: none;
    border-color: var(--baby-300);
    box-shadow: 0 0 0 3px rgba(137,196,244,0.2);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 0 0.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1/1;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.gallery-item:hover {
    transform: scale(1.03) translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--baby-300);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(44,62,80,0.95), transparent);
    color: white;
    padding: 1rem 0.8rem 0.8rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    backdrop-filter: blur(3px);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-filename {
    font-size: 0.7rem;
    opacity: 0.7;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-date {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.gallery-date i {
    color: var(--baby-300);
    font-size: 0.65rem;
}

.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.98);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.gallery-modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 85vh;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2000;
}

.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: white;
    font-size: 1.3rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
    z-index: 2100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.modal-nav:hover {
    background: var(--baby-300);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev {
    left: 20px;
}

.modal-nav.next {
    right: 20px;
}

.modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    color: var(--baby-500);
    font-size: 1.2rem;
    z-index: 2100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.modal-close:hover {
    transform: rotate(90deg);
    background: var(--baby-300);
    color: white;
}

.modal-caption {
    position: absolute;
    bottom: -35px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    padding: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--baby-400);
    font-size: 1.1rem;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.gallery-loading i {
    font-size: 2.5rem;
    color: var(--baby-300);
    animation: spin 1.5s linear infinite;
}

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

.gallery-empty {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--baby-400);
    grid-column: 1 / -1;
    background: var(--baby-100);
    border-radius: 30px;
    border: 2px dashed var(--baby-200);
    margin: 1rem;
}

.gallery-empty i {
    font-size: 3.5rem;
    color: var(--baby-300);
    margin-bottom: 1rem;
}

.gallery-empty h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--baby-500);
}

.gallery-empty p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.gallery-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--baby-400);
    border-top: 1px solid var(--baby-200);
    margin-top: 1rem;
    font-size: 0.9rem;
}

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.2rem;
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .gallery-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .gallery-header {
        padding: 3rem 1rem;
    }
    
    .gallery-header h1 {
        font-size: 2.2rem;
    }
    
    .gallery-header p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
    
    .gallery-stats {
        gap: 0.8rem;
    }
    
    .gallery-stat {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .gallery-stat i {
        font-size: 1rem;
    }
    
    .gallery-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }
    
    .gallery-filter {
        justify-content: center;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .gallery-search {
        max-width: 100%;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .gallery-item {
        border-radius: 12px;
    }
    
    .gallery-overlay {
        padding: 0.8rem 0.5rem;
    }
    
    .gallery-title {
        font-size: 0.8rem;
    }
    
    .gallery-filename {
        font-size: 0.6rem;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .modal-nav.prev {
        left: 10px;
    }
    
    .modal-nav.next {
        right: 10px;
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        top: -40px;
        font-size: 1rem;
    }
    
    .modal-caption {
        font-size: 0.8rem;
        bottom: -30px;
    }
}

@media (max-width: 480px) {
    .gallery-header h1 {
        font-size: 1.8rem;
    }
    
    .gallery-header p {
        font-size: 0.9rem;
    }
    
    .gallery-stat {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .gallery-stat i {
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        gap: 0.5rem;
    }
    
    .gallery-item {
        border-radius: 8px;
        border-width: 1px;
    }
    
    .gallery-overlay {
        padding: 0.5rem 0.3rem;
    }
    
    .gallery-title {
        font-size: 0.7rem;
    }
    
    .gallery-filename {
        font-size: 0.55rem;
    }
    
    .gallery-date {
        font-size: 0.65rem;
    }
    
    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .modal-nav {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .modal-nav.prev {
        left: 5px;
    }
    
    .modal-nav.next {
        right: 5px;
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        top: -35px;
    }
    
    .modal-caption {
        font-size: 0.7rem;
        bottom: -25px;
    }
    
    .gallery-empty {
        padding: 2rem 1rem;
    }
    
    .gallery-empty i {
        font-size: 2.5rem;
    }
    
    .gallery-empty h3 {
        font-size: 1.1rem;
    }
    
    .gallery-empty p {
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-filter {
        flex-wrap: wrap;
        justify-content: center;
    }
}