* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    color: #667eea;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.selectors {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 1rem;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.9);
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.selectors > div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selectors label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

select:hover {
    border-color: #667eea;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.thumbnail {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.thumbnail:hover::before {
    opacity: 1;
}

.thumbnail:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.thumbnail img, .thumbnail video {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 2rem;
    width: 95%;
    max-width: 1400px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 48px;
    font-weight: 300;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.2s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.slideshow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex: 1;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1.5rem;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.95);
}

#slide-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#slide-img, #slide-video {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

#download-btn {
    margin-top: 2rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

#download-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .selectors {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .selectors > div {
        width: 100%;
    }
    
    select {
        width: 100%;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }
    
    .thumbnail img, .thumbnail video {
        height: 150px;
    }
    
    .nav-btn {
        font-size: 1.5rem;
        padding: 1rem;
        width: 50px;
        height: 50px;
    }
    
    .close {
        top: 10px;
        right: 10px;
        font-size: 36px;
    }
    
    .modal-content {
        padding: 1rem;
    }
    
    .slideshow {
        gap: 0.5rem;
    }
    
    #slide-img, #slide-video {
        max-height: 70vh;
        width: 100%;
        height: auto;
    }
    
    #download-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}