@font-face {
    font-family: 'DePixel';
    src: url('/fonts/DePixelBreit.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fundo */
body {
    background-color: #ecf0f1;
    color: #333;
    font-family: 'DePixel', 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 5px 20px;
    width: 100%;
    height: 100%;
    /* overflow: hidden; */
    position: relative;
    ::selection {
        background-color: #f39c12; /* ou outra cor do tema claro */
        color: #ecf0f1; /* Texto em cor clara */
    }
}

/* Scanlines suaves para tema claro */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(to bottom,
            rgba(0, 0, 0, 0.02) 0px,
            rgba(0, 0, 0, 0.02) 1px,
            transparent 1px,
            transparent 3px);
    pointer-events: none;
    z-index: 1;
}

body.dark-theme {
    background-color: #000;
    color: #FFF;
    ::selection {
        background-color: #a56bbe; /* ou outra cor do tema escuro */
        color: #fff; /* Texto em branco sobre fundo escuro */
    }
}

/* Efeito de scanlines (linhas horizontais suaves) */
body.dark-theme::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(to bottom,
            rgba(0, 255, 0, 0.05) 0px,
            rgba(0, 255, 0, 0.05) 1px,
            transparent 1px,
            transparent 3px);
    pointer-events: none;
    z-index: 1;
}

/* Loader */
#loader {
    position: fixed;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    /* background: linear-gradient(145deg, #1a1a2e, #16213e); */
    color: #333;
    text-align: center;
    background-color: #eee;
    background-image: repeating-linear-gradient(to bottom,
            rgba(0, 0, 0, 0.02) 0px,
            rgba(0, 0, 0, 0.02) 1px,
            transparent 1px,
            transparent 3px);

    .neon-text {
        font-size: 16px;
    }

    .progress-container {
        margin: 18px 0 0 0;
        width: 80%;
        max-width: 300px;
        height: 12px;
        background: #ecf0f1;
        border: 2px solid #333;
        box-shadow: 0 0 10px #eee;
        position: relative;
        overflow: hidden;
    }

    .progress-bar {
        height: 100%;
        width: 0%;
        background: linear-gradient(90deg, #8e44ad, #ff00ff);
        box-shadow: 0 0 10px #00ffe7;
        transition: width 0.2s ease;
    }

    #percentage {
        margin-top: 10px;
        font-size: 0.8rem;
        color: #333;
    }
}

.dark-theme #loader {
    color: #a56bbe;
    text-shadow: 0 0 5px #8e44ad, 0 0 10px #8e44ad;
    background-color: #000;
    background-image: repeating-linear-gradient(to bottom,
            rgba(0, 255, 0, 0.05) 0px,
            rgba(0, 255, 0, 0.05) 1px,
            transparent 1px,
            transparent 3px);

    .progress-container {
        background: #000;
        border: 2px solid #ecf0f1;
        box-shadow: 0 0 10px #000;
    }

    #percentage {
        margin-top: 10px;
        font-size: 0.8rem;
        color: #8e44ad;
    }
}


/* Brilho pulsante leve */
.terminal {
    /* animation: glow 2s ease-in-out infinite alternate; */
    position: relative;
    z-index: 2;
}

.dark-theme .terminal {
    animation: glow-dark 2s ease-in-out infinite alternate;
    position: relative;
    z-index: 2;
}

@keyframes glow-dark {
    from {
        text-shadow: 0 0 5px #8e44ad, 0 0 10px #8e44ad;
    }

    to {
        text-shadow: 0 0 10px #8e44ad, 0 0 20px #8e44ad;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #8e44ad;
    font-weight: bold;
}

.dark-theme {

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        color: #a56bbe;
    }
}

.page {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
}

.flex-center {
    display: flex;
    gap: 15px;
    align-items: center;
}

.flex-column{
    flex-direction: column;
}

.flex-center-all {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.float-left {
    float: left;
}

.float-right {
    float: right;
}

.strike{
    text-decoration: line-through;
}

.spoiler-alert{
    border: 2px dotted #ff0055;
    padding: 15px;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 20px;
    .spoiler-head{
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    #close-spoiler{
        color: #ff0055;
        font-weight: bold;
        cursor: pointer;
        border: none;
        background-color: transparent;
        font-size: 22px;
        font-family: 'DePixel', 'Courier New', Courier, monospace;
    }
    #hide-spoilers{
        font-weight: bold;
        float: right;
        border: none;
        background-color: transparent;
        cursor: pointer;
        color: #8e44ad;
        font-family: 'DePixel', 'Courier New', Courier, monospace;
    }
}

#show-spoilers{
    border: none;
    background-color: transparent;
    color: #8e44ad;
    font-family: 'DePixel', 'Courier New', Courier, monospace;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}
.dark-theme #show-spoilers{
    text-shadow: 0 0 5px #8e44ad, 0 0 10px #8e44ad;
    &:hover{
        color: #a56bbe;
    }
}

header {
    margin: -15px 0 -25px 0;
    padding: 10px;
}

/* Menu */
.menu {
    margin: 0 0 15px 0;
    width: 100%;
    display: flex;
    border: 2px dotted #8e44ad;
}

.menu a {
    padding: 5px 30px 5px 5px;
    border-right: 2px dotted #8e44ad;
    text-decoration: none;
    color: #8e44ad;
    font-weight: bold;
    background: #ecf0f1;
}

.dark-theme .menu a {
    text-shadow: none;
    background: #000;
}

.menu a:hover {
    background: #8e44ad;
    color: #FFF;
}

/* Icons */

.line-section {
    text-align: center;
    border-bottom: 1px solid #8e44ad;
    line-height: 0.1em;
    margin: 30px 0 30px;
    text-wrap: inherit;
}

.line-section.left {
    text-align: left;
}

.line-section.right {
    text-align: right;
}

.line-section span,
.line-section a {
    background: #ecf0f1;
    border: 1px solid #8e44ad;
    padding: 5px 10px;
    color: #8e44ad;
    /* font-family: monospace; */
    text-decoration: none;
    cursor: pointer;
    position: relative;

    img {
        transition: all 0.5s ease;
    }

    &:hover img {
        transform: scale(0.5) translateY(22px)
    }
}

.dark-theme .line-section span,
.dark-theme .line-section a {
    background-color: #000;
    color: #a56bbe;
}

.line-section a:hover {
    background: #8e44ad;
    color: #fff;
}

.responsible {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 25px;
    align-items: start;
}

aside {
    height: auto;
    padding: 40px 20px;
    border: 2px dotted #8e44ad;

    div {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin-top: 20px;
        flex-wrap: wrap;

        &:first-child {
            margin-top: 0;
        }

        &>span {
            display: block;
            width: 100%;
        }
    }

    :not(.hosted) a{
        &::before {
            content: ">";
            margin-right: 4px;
        }
    }
    a {
        color: #8e44ad;
        text-decoration: none;

        &:hover {
            color: #a56bbe;
        }

        

        span {
            text-decoration: underline;
        }
    }
}


.dark-theme aside {
    &>span {
        color: #a56bbe;
    }

    a {
        color: #FFF;

        &:hover {
            color: #8e44ad;
        }
    }
}

article {
    min-height: 70vh;

    a {
        color: #8e44ad;
        text-decoration: none;
    }
}

article>* {
    margin-bottom: 15px;
}

article>header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.movie-article {
    header {
        padding: 10px 0;
        .stars img{
            width: 16px;
        }
    }
    .movie-img {
        margin: 5px 10px;
        border: 3px double #333;
    }
    figure{
        margin: 5px 10px;
        img{
            border: 3px double #333;
        }
        figcaption{
            font-size: 8px;
            text-align: center;
        }
    }
}

.dark-theme .movie-article {
    .movie-img {
        border-color: #8e44ad;
    }
    figure{
        img{
            border: 3px double #8e44ad;
        }
    }
}

.movies-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;

    .movie {
        display: flex;
        gap: 10px;
    }

    .movie>a>img {
        border: 3px double #333;
        width: 100px;
        height: 150px;
        /* image-rendering: pixelated; */
        filter: none;
        transition: all 0.3s ease-in-out;

        &:hover {
            filter:
                contrast(160%) saturate(120%) hue-rotate(-10deg) sepia(20%) brightness(110%);
            transform: scale(1.05);
            cursor: pointer;
        }
    }

    .movie-excerpt {
        display: flex;
        flex-direction: column;
        gap: 5px;

        a {
            color: #8e44ad;
            text-decoration: none;
        }
    }

    .stars img {
        width: 16px;
        height: 16px;
    }
}

.dark-theme .movies-list {
    .movie>a>img {
        border: 3px double #8e44ad;
    }

    .movie-excerpt {
        a {
            color: #FFF;
        }
    }
}

#results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#pagination a {
    color: #8e44ad;

    &:hover {
        color: #a56bbe;
    }
}

.dark-theme #pagination a {
    color: #FFF;

    &:hover {
        color: #8e44ad;
    }
}

footer {
    font-weight: normal;
    font-size: 12px;
    text-align: center;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #8e44ad;
    border-bottom: 1px solid #8e44ad;

    a {
        color: #8e44ad;

        &:hover {
            color: #a56bbe;
        }
    }
}

#alert {
    margin-top: 20px;
    padding: 10px 0;
    display: none;
    justify-content: start;
    align-items: center;
    flex-direction: row;
    gap: 20px;
}

#category-show {
    color: #333;
}

.dark-theme #category-show {
    color: #FFF;
}

.trailer{
    display: flex;
    justify-content: center;
    padding: 5px;
    border: 4px double #333;
}

.error404{
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 20px;
}

.hosted{
    width: 100%;
    display: flex;
    justify-content: center;
    img{
        width: 100%;
        max-width: 250px;
    }
}
@media(max-width: 992px) {
    .responsible {
        grid-template-columns: 1fr;
    }

    aside div {
        flex-direction: row;
    }

    .movies-list {
        grid-template-columns: repeat(2, 1fr);
    }
}