* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#ismusen-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.album-title {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 15px;
}

.album-title p {
    font-size: 1.2rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.album-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    padding: 0 15px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: #f1f1f1;
}

.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    padding: 0 15px;
}

.album-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    cursor: pointer;
    background: white;
}

.album-item.portrait {
    aspect-ratio: 2/3;
}

.album-item.landscape {
    aspect-ratio: 4/3;
}

.album-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.album-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    padding: 12px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.album-item:hover .album-item-overlay {
    opacity: 1;
}

.album-item-overlay h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.album-item-overlay p {
    font-size: 0.75rem;
    opacity: 0.9;
}

.back-to-home {
    text-align: center;
    margin-top: 30px;
    padding: 0 15px;
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #2c3e50;
    color: white;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
}

.home-link:hover {
    background: #1a2530;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

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

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
    box-sizing: border-box;
}

.lightbox-prev, .lightbox-next {
    background: rgba(0,0,0,.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(0,0,0,.8);
}

@media (max-width: 992px) {
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .album-title p {
        font-size: 1.1rem;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .album-item-overlay h3 {
        font-size: 0.9rem;
    }
    
    .album-item-overlay p {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .album-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 400px;
        margin: 0 auto 30px;
    }
    
    .album-title p {
        font-size: 1rem;
    }
    
    .filter-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .lightbox-prev, .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 400px) {
    #ismusen-gallery-container {
        padding: 15px;
    }
    
    .album-title p {
        font-size: 0.95rem;
    }
}