* {
    box-sizing: border-box;
}

html{
    scroll-behavior: smooth;
}

body.home {
    background: linear-gradient(to bottom, #141414, #000000);
}

nav {
    display: flex;
    gap: 35px;
}

nav a {
    color: #ccc;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    transition: 0.3s;
}

nav a:hover {
    color: white;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0%;
    height: 2px;
    background: #ff2b2b;
    transition: 0.3s;
}

nav a:hover::after {
    width: 100%;
}

body {
    opacity: 0;
    transition: 0.3s ease;
    transition: opacity 0.3s;
    margin: 0;
    background-color: #141414;
    font-family: Arial, sans-serif;
    color: white;
}

body.loaded {
    opacity: 1;
}

header {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header nav a:hover {
    color: red;
}

header h1 {
    color: #ff2b2b;
    font-size: 38px;
    margin: 0;
    font-weight: 800;
    letter-spacing: 1px;
    transition: 0.3s;
}

header h1:hover {
    transform: scale(1.03);
    cursor: pointer;
}

main {
    padding: 20px;
    overflow: visible;
}

h2 {
    color: white;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-left: 20px;
    position: relative;
}

#favoritos h2{
    margin-left: 60px;
}

.categoria > h2 {
    margin-left: 40px;
}

h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: #ff2b2b;
    margin-top: 8px;
    border-radius: 10px;
}

.categorias-container {
    width: 100%;
}

.categoria {
    display: none;
}

#games {
    display: block;
}

.lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, 270px);
    justify-content: center;
    gap: 15px;
    padding: 20px 40px;
    overflow: visible;
    position: relative;
    transition: transform 0.3s ease;
    z-index: 1;
    width: 100%;
}

.card:hover img {
    filter: brightness(0.5);
}

.lista::-webkit-scrollbar {
    height: 8px;
}

.lista::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

.card img {
    transition: filter 0.3s ease;
}

.card img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    transition: 0.3s;
}

.card {
    margin: 0;
    width: 270px;
    height: 380px;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        filter 0.3s ease;
}

.card:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: scale(1.25) translateY(-10px);
    z-index: 999;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.card:hover .badge {
    opacity: 0;
    transition: 0.3s;
}

#detalhes {
    min-height: 100vh;
    width: 100%;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background:
        linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.75));
    animation: aparecer 0.4s ease forwards;
    position: fixed;
    overflow: hidden;
    inset: 0;
    overflow-y: auto;
    z-index: 9999;
}

.detalhes-container {
    display: flex;
    gap: 30px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 35px;
    max-width: 1200px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    animation: aparecer 0.3s ease;
    position: relative;
    z-index: 2;
}

#imagem {
    width: 420px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transition: 0.3s;
}

#imagem:hover {
    transform: scale(1.02);
}

.detalhes-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 650px;
}

#titulo {
    font-size: 48px;
    margin-left: 0;
    margin-bottom: 20px;
    color: white;
    font-weight: 800;
}

#descricao {
    color: #cfcfcf;
    line-height: 1.8;
    font-size: 17px;
    margin-bottom: 30px;
    max-width: 700px;
}

#btnFavoritar {
    padding: 10px 20px;
    background: red;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#feedback {
    position: fixed;
    top: 90px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    z-index: 9999;
    opacity: 0;
    transition: 0.3s;
}

.badge {
    text-align: center;
    position: absolute;
    bottom: 0px;
    left: 0px;
    padding: 6px 0;
    border-radius: 0 0 10px 10px;
    font-size: 13px;
    color: white;
    width: 100%;
    font-weight: bold;
}

.badge.jogando {
    background-color: #c78315;
}

.badge.concluido {
    background-color: green;
}

.badge.dropado {
    background-color: #be2513;
}

.badge.planejando {
    background-color: #1a73e8;
}

.badge.platinado {
    background: #ffb300;
    color: #333;
}

.badge.assistindo {
    background: #ff9800;
}

.badge.assistido {
    background: #4caf50;
}

.badge.finalizada {
    background: #2e7d32;
}

.badge.lendo {
    background: #c78315;
}

.badge.lido {
    background: #4caf50;
}

.badge.abandonado {
    background: #c62828;
}

.badge:hover {
    transform: scale(1.02);
    background-color: #333;
    transition: 0.3s;
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.3s;
    pointer-events: auto;
    z-index: 10;
}

.overlay h3 {
    margin: 0;
    font-size: 14px;
}

.overlay button {
    margin-right: 5px;
    margin-top: 5px;
    padding: 8px 12px;
    border: none;
    background: red;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    z-index: 20;
}

.overlay button:first-child {
    background: red;
}

.overlay button:last-child {
    background: #333;
}

.detalhes-container button {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: bold;
}

.detalhes-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.detalhes-container button:first-of-type {
    background: #333;
    color: white;
}

.detalhes-container button:first-of-type:hover {
    background: #555;
}

#btnfavorito {
    background: #e50914;
    color: white;
}

#btnfavorito:hover {
    background: #ff1f1f;
}

#status {
    padding: 10px 15px;
    border-radius: 8px;
    border: none;
    background: #1f1f1f;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

#status:hover {
    background: #333;
}

#status:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.acoes {
    display: flex;
    gap: 18px;
    margin-top: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.acoes button,.acoes select {
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
}

#btnVoltar {
    background: #2b2b2b;
    color: white;
}

#btnVoltar:hover {
    background: #444;
}

footer {
    margin-top: 80px;
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 50px 20px;
    text-align: center;
}

.footer-content {
    max-width: 900px;
    margin: auto;
}

footer h3 {
    color: #ff2b2b;
    font-size: 28px;
    margin-bottom: 15px;
}

footer p {
    color: #999;
    margin-bottom: 25px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: white;
}

footer span {
    color: #666;
    font-size: 14px;
}

#banner-fundo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    filter: blur(25px);
    transform: scale(1.2);
    z-index: 0;
    pointer-events: none;
}

.categoria-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.categoria-acoes {
    display: flex;
    gap: 10px;
}

.categoria-acoes button {
    background: #1f1f1f;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.categoria-acoes button:hover {
    background: #333;
    transform: scale(1.05);
}

.add-card {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.09);
    border: 2px dashed rgba(255,255,255,0.2);
    transition: 0.3s;
}

.add-card:hover {
    background: rgba(255,255,255,0.09);
    border-color: #ff2b2b;
}

.add-content {
    text-align: center;
    color: #999;
}

.add-content span {
    font-size: 70px;
    display: block;
    line-height: 1;
}

.add-content p {
    margin-top: 10px;
    font-size: 18px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    header h1 {
        font-size: 30px;
        text-align: center;
    }
    .lista {
    padding: 15px;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
    }   
    .card {
        aspect-ratio: 2 / 3;
        width: 100%;
        min-width: 0;
        height: auto;
    }
    .card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    main {
        padding: 10px;
    }
}

@media (max-width: 900px) {
    .detalhes-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    #imagem {
        width: 100%;
        max-width: 350px;
    }
    #titulo {
        font-size: 36px;
    }
}

@media (max-width: 600px) {
    .acoes {
        flex-direction: column;
        width: 100%;
    }
    .acoes button,.acoes select {
        width: 100%;
    }
}

#overlay-form {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.form-container {
    width: 450px;
    background: #181818;
    border-radius: 20px;
    padding: 35px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.form-container input,.form-container textarea,.form-container select {
    background: #222;
    border: none;
    border-radius: 10px;
    padding: 14px;
    color: white;
    font-size: 15px;
}

.form-container textarea {
    min-height: 120px;
    resize: none;
}

.form-botoes {
    display: flex;
    gap: 10px;
}

.form-botoes button {
    flex: 1;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.form-botoes button:first-child {
    background: #e50914;
    color: white;
}

.form-botoes button:last-child {
    background: #333;
    color: white;
}

.menu-card {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 50;
}

.menu-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: white;
    cursor: pointer;
    font-size: 18px;
    transition: 0.3s;
}

.menu-btn:hover {
    background: rgba(255,255,255,0.2);
}

.menu-opcoes {
    position: absolute;
    top: 40px;
    right: 0;
    background: #1f1f1f;
    border-radius: 10px;
    overflow: hidden;
    display: none;
    min-width: 140px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.menu-opcoes button {
    width: 100%;
    border: none;
    background: transparent;
    color: white;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: 0.3s;
}

.menu-opcoes button:hover {
    background: #333;
}

#modal-confirmacao {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.modal-box {
    background: #181818;
    padding: 30px;
    border-radius: 20px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    animation: aparecer 0.2s ease;
}

.modal-box h2 {
    margin-top: 0;
    color: white;
}

.modal-box p {
    color: #b3b3b3;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-botoes {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.modal-botoes button {
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

#cancelar-remocao {
    background: #2b2b2b;
    color: white;
}

#cancelar-remocao:hover {
    background: #444;
}

#confirmar-remocao {
    background: #e50914;
    color: white;
}

#confirmar-remocao:hover {
    background: #ff2b2b;
}

#loading-screen {
    position: fixed;
    inset: 0;
    background: #0f0f0f;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    transition: opacity 0.4s ease;
}

#loading-screen h1 {
    font-size: 40px;
    color: red;
}

#loading-screen p {
    opacity: 0.7;
    color: red;
}