﻿:root {
    --fondo: #0f172a;
    --header-claro: #1e293b;
    --acento-naranja: #f97316;
}

body {
    margin: 0;
    background-color: var(--fondo);
    font-family: "Segoe UI", sans-serif;
    color: lightgray;
}

header {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: var(--header-claro);
    border-bottom: 1px solid steelblue;
}

    header img {
        width: 40px;
        margin-right: 10px;
    }

h1 {
    font-size: 20px;
    font-weight: bold;
    width: 100%;
}

a {
    background-color: steelblue;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    margin-left: 10px;
    cursor: pointer;
}

    a:hover, a.active:hover {
        background-color: var(--acento-naranja);
        transition: 0.3s;
    }

nav {
    display: flex;
    margin: 0 20px;
    border-bottom: 1px solid steelblue;
}

.tab {
    margin-right: 50px;
    padding: 10px 0;
    cursor: pointer;
    font-size: 1.2rem;
}

    .tab.active {
        border-bottom: 3px solid var(--acento-naranja);
        color: #f97316;
    }

main.index div {
    display: flex;
    align-items: center;
    margin: 20px;
    justify-content: space-between;
}

main.index form {
    width: 100%;
    display:flex;
    margin-right: 1%;
}

    main.index form input[type=text] {
        width: 100%;
        padding: 10px;
        border-radius: 10px 0 0 10px;
        background-color: var(--header-claro);
        border: 1px solid steelblue;
        color: white;
    }
    main.index form button {
        padding: 10px;
        cursor:pointer;
        border-radius: 0 10px 10px 0;
        background-color: var(--header-claro);
        border: 1px solid steelblue;
        color: white;
    }
        main.index form button:hover {
            background-color: black;
        }

        .index div a {
            background-color: var(--acento-naranja);
            border: none;
            padding: 10px 15px;
            color: white;
            border-radius: 10px;
            margin-left: 20px;
            cursor: pointer;
            align-items: center;
            text-wrap: nowrap;
            text-decoration: none;
        }

.game {
    background-color: var(--header-claro);
    border: 3px solid black;
    border-radius: 20px;
    padding: 20px 40px;
    margin: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: white;
    text-decoration: none;
}

    .game h2 {
        font-size: 1.4rem;
        margin: 0 5px 0 0;
        color: lightcyan;
    }

    .game p {
        margin: 0;
        color: lightcyan;
    }

    .game h3 {
        margin: 0;
        font-size: 1.4rem;
        font-weight: bold;
        color: lightcyan;
    }

    .game:hover {
        transform: scale(1.005);
        transition: 0.15s;
        border-color: var(--acento-naranja);
    }






.agregar form {
    background-color: var(--header-claro);
    padding: 30px;
    border-radius: 10px;
    margin: 30px 20px;
    display: grid;
    grid-template-columns: 1fr;
}


label {
    margin-bottom: 6px;
    color: lightblue;
    font-size: 0.9rem;
}

.agregar input, .agregar select, .agregar textarea {
    background-color: var(--fondo);
    border: 1px solid steelblue;
    padding: 10px;
    border-radius: 10px;
    color: white;
}

textarea {
    resize: none;
    height: 120px;
}

.generos, .plataformas {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

.genero, .plataforma {
    background-color: var(--fondo);
    border: 1px solid steelblue;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    width: 200px;
    text-align: center;
    transition: 0.2s;
}

input[type=checkbox] {
    display: none;
}

    input[type=checkbox]:checked + .genero,
    input[type=checkbox]:checked + .plataforma {
        background-color: var(--acento-naranja);
        border-color: var(--acento-naranja);
        color: white;
        transform: scale(1.05);
    }

.agregar form div:last-of-type {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.agregar button[type=submit] {
    background-color: var(--acento-naranja);
    border: none;
    padding: 10px 20px;
    margin-right: 1%;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    align-items: center;
    cursor: pointer;
    width: 100%;
}

.agregar form a {
    background-color: var(--fondo);
    color: lightcyan;
    border-radius: 10px;
    text-decoration: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1.1rem;
    align-items: center;
    text-align: center;
}



.videojuegos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin: 20px;
    padding: 30px;
}

.videojuego {
    background: #1e1e2e;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 20px #0004;
    transition: 0.25s ease;
}

    .videojuego:hover {
        transform: translateY(-5px);
        box-shadow: 0 0 25px black;
    }

    .videojuego img {
        width: 100%;
        height: 180px;
        object-fit: cover;
    }



h3 {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 5px 0 0 5px;
}


p.fecha {
    display: flex;
    align-items: center;
    margin: 5px 0 5px 5px;
    color: lightgray;
}

.generos {
    display: flex;
    flex-wrap: wrap;
    margin: 5px;
    gap: 5px;
}

.tag {
    background: #2f2f44;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
}


p.precio {
    background: #9f3cf3;
    padding: 5px 10px;
    border-radius: 10px;
    font-weight: bold;
    margin: 5px;
    text-align: center;
}



main {
    padding: 30px;
}


section.detalles {
    background: #0f162b;
    border-radius: 15px;
    margin: 20px;
    width: 100%;
    max-width: 950px;
    justify-self: center;
    box-shadow: 0 0 20px black;
}

.detalles img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.detalles .precio {
    background: #9f3cf3;
    padding: 10px;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
}

.contenido {
    padding: 30px;
}

h1.titulo {
    font-size: 1.8rem;
    color: lightcyan;
}

.headers {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
}

.info {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
}

    .info i {
        grid-row: span 2;
        font-size: 2rem;
        color: lightcyan;
        margin-right: 10px;
    }

.static {
    color: lightcyan;
    font-size: 1.1rem;
    margin: 0;
}

.valor {
    font-weight: bold;
    margin: 0;
}

h2 {
    margin-top: 2.3rem;
    color: lightcyan;
    margin: 15px 0;
}

.descripcion {
    color: aliceblue;
}

.detalles .d-generos, .detalles .d-plataformas {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.detalles .gen {
    background: #2c2f48;
    padding: 10px 15px;
    border-radius: 10px;
    color: lightcyan;
    font-size: 0.8rem;
}

.detalles .plat {
    background: #1d2337;
    padding: 10px 20px;
    border-radius: 10px;
    color: #ccd4ff;
    font-size: 0.8rem;
    border: 1px solid #353c55;
}


a.active{
    background-color: orangered;
}


.editar {
    display: flex;
    justify-content: space-between;
}

.fa-trash {
    color: darkred;
    font-size: 2rem;
    transition: 0.1s;
}

.editar a:hover {
    background-color: var(--acento-naranja);
}



.modal {
    display: flex;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #00000040;
    justify-content: center;
    align-items: center;
}

.modal-contenido {
    background-color: var(--header-claro);
    padding: 30px;
    max-width: 500px;
    border: 1px solid steelblue;
    border-radius: 10px;
    box-shadow: 0 0 10px black;
    text-align: center;
}

    .modal-contenido h2 {
        color: red;
        margin: 0;
    }


.modal-acciones {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.a-cancelar, .a-eliminar {
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-weight: bold;
    color: white;
    transition: background-color 0.3s;
}

.a-cancelar {
    background-color: var(--fondo);
}

    .a-cancelar:hover {
        background-color: navy;
    }

.a-eliminar {
    background-color: darkred;
}

    .a-eliminar:hover {
        background-color: red;
    }