@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at top, #2b2b40, #12121c);
    color: #fff;
}

/* HEADER */
header {
    text-align: center;
    padding: 2.5rem 1rem;
}

header h1 {
    font-size: 2.3rem;
}

header p {
    opacity: 0.7;
}

/* GALERIA */
.gallery {
    max-width: 1200px;
    margin: auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery img {
    width: 100%;
    border-radius: 18px;
    cursor: pointer;
    filter: brightness(0.9);
    transition: transform .3s ease, box-shadow .3s ease;
}

.gallery img:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.6);
    filter: brightness(1);
}

/* RESPONSIVO */
@media (max-width: 900px) {
    .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .gallery { grid-template-columns: 1fr; }
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.7;
}

.close:hover { opacity: 1; }

/* VIEWER */
.viewer {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#modalImg {
    max-width: 75vw;
    max-height: 75vh;
    border-radius: 18px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.7);
}

/* BOTÕES LATERAIS */
.side-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.side-actions button,
.side-actions a {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff7a18, #ffb347);
    color: #000;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: transform .2s ease, box-shadow .2s ease;
}

.side-actions button:hover,
.side-actions a:hover {
    transform: scale(1.08);
    box-shadow: 0 15px 35px rgba(0,0,0,0.7);
}

/* NAVEGAÇÃO */
.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    background: none;
    border: none;
    color: #fff;
    opacity: 0.5;
    cursor: pointer;
}

.nav:hover { opacity: 1; }

.prev { left: 30px; }
.next { right: 30px; }

/* MOBILE MODAL */
@media (max-width: 600px) {
    .viewer {
        flex-direction: column;
    }
    .side-actions {
        flex-direction: row;
    }
}

/* BOTÃO GLOBAL */
.toggle {
    margin-top: 1.2rem;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #3cff75, #2dd65f);
    color: #000;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s;
}

.toggle.paused {
    background: linear-gradient(135deg, #ff7a18, #ffb347);
}

.toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.6);
}
