/* Estilo general */
body {
    margin: 0;
    background-color: #000;
    color: white;
    font-family: Arial, sans-serif;
    text-align: center;
    overflow: auto;
    position: relative;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

header h1 {
    font-size: 2.5rem;
    margin-top: 20px;
    color: #fff;
    opacity: 0;
    animation: fadeIn 1.5s ease-in-out forwards;
}

header .subtitle {
    font-size: 1.2rem;
    color: #c7c5c5;
    margin-bottom: 30px;
    opacity: 0;
    animation: slideIn 1s ease-in-out 0.5s forwards;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    width: 90%;
    margin: 0 auto 50px;
}

.image-container {
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-in-out forwards;
}

.image-container img {
    width: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.5);
}

.image-container .title {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    z-index: 5;
}

#fullscreen-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease-in-out;
}

#fullscreen-view.visible {
    visibility: visible;
    opacity: 1;
}

#fullscreen-image {
    max-width: 90%;
    max-height: 80%;
    margin-bottom: 15px;
    border-radius: 8px;
    animation: fadeIn 0.5s ease-in-out;
}

#fullscreen-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    animation: slideIn 0.5s ease-in-out;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: red;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.close-button:hover {
    background: darkred;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

#loading-bar {
    width: 80%;
    height: 10px;
    background: #444;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 20px;
}

#loading-bar-inner {
    height: 100%;
    background: #fff;
    animation: loadingBar 3s linear infinite;
}

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

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

@keyframes loadingBar {
    0% { width: 0; }
    100% { width: 100%; }
}

.image-container {
    position: relative;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    border-radius: 8px;
    opacity: 0; 
    filter: blur(10px);
    transition: opacity 0.5s ease-in-out, filter 0.5s ease-in-out;
}

.image-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.image-container.loaded img {
    opacity: 1;
    filter: blur(0.65px);
}

.image-container.loaded::before {
    display: none;
}

