/* Stilos
colores del logo( color naranja #995e2e color verde #232e2e )
*/

/* Reseteo básico para evitar desbordamientos */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --primary-color: #8ab4f8;
    --primary-hover: #aecbfa;
    --input-bg: #2d2d2d;
    --shadow: rgba(0, 0, 0, 0.5);
}

div {
    margin-bottom: 0px;
}

img {
    width: auto;
    height: auto;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: sans-serif;
    margin: 0;
    padding: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

form {
    background-color: var(--bg-card);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px var(--shadow);
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.username {
    color: #995e2e;
}

main {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px var(--shadow);
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dashboard-container {
    background-color: var(--bg-card);
    padding: 10px;
    border-radius: 1px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px var(--shadow);
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

article {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px var(--shadow);
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card {
    background-color: var(--bg-card);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px var(--shadow);
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-bottom: 10px;
}

.ranking-wrapper {
    font-size: 1.1rem;
}

input {
    background-color: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 5px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

input:focus {
    border-color: var(--primary-color);
}

button {
    background-color: #3e3e3e;
    color: #c0c0c0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    border: 2px solid #5a5a5a;
    border-bottom: 6px solid #1a1a1a;
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 2px, transparent 2px, transparent 5px);
    box-shadow: 0px 5px 0px #111, 0px 10px 10px rgba(0, 0, 0, 0.4);
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.8), 1px 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.1s ease;
}

button:active {
    transform: translateY(4px);
    border-bottom-width: 2px;
    box-shadow: 0px 1px 0px #111, inset 0px 4px 10px rgba(0, 0, 0, 0.5);
}

button:hover {
    background-color: #464646;
    color: #e0e0e0;
    border-color: #232e2e;
}

.historial-item {
    background-color: var(--bg-card, #2b2b2b);
    border: 1px solid var(--border-color, #444);
    box-shadow: 0 4px 10px var(--shadow, rgba(0, 0, 0, 0.3));
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    margin-bottom: 10px;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.info-pegue {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-pegue .fecha {
    font-size: 0.85rem;
    color: #aaa;
    font-style: italic;
}

.info-pegue .puntos {
    font-size: 1.2rem;
    color: #995e2e;
}

.btn-borrar {
    background-color: #575757;
    color: #ff6b6b;
    border: 4px ridge #7a7a7a;
    border-radius: 60% 40% 70% 30% / 40% 50% 60% 45%;
    box-shadow:
        3px 3px 6px rgba(0, 0, 0, 0.4),
        inset 2px 2px 3px rgba(255, 255, 255, 0.1);

    width: 45px;
    height: 45px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-borrar:active {
    transform: scale(0.95);
    box-shadow: inset 3px 3px 5px rgba(0, 0, 0, 0.5);
}

.btn-borrar:hover {
    filter: brightness(1.1);
}

button:hover {
    background-color: var(--primary-hover);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

select {
    font-size: 1.1rem;
    background-color: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 5px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

label {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: block;
}

li {
    list-style: none;
}

h3,
h2 {
    margin: 5px;
    margin-bottom: 10px;
}

div.historial-item {
    margin: 1px;
    border: 1px;
    padding: 5px;
}

div.ranking-item {
    margin: 1px;
}

div.lista-ranking {
    margin: 1px;
}

div.rank-info {
    margin: 1px;
    margin-bottom: 10px;
}

p {
    margin: 1px;
}

/* --- ESTILOS RESPONSIVE PARA MÓVIL --- */
@media screen and (max-width: 600px) {

    body {
        padding: 10px;
        justify-content: flex-start;
        padding-top: 20px;
    }

    main,
    article,
    .card,
    .historial-item {
        max-width: 100%;
        padding: 15px;
    }

    .dashboard-container {
        width: 100%;
        overflow-x: auto;
    }

    button,
    .btn-borrar {
        cursor: default;
        /* En móvil no hay "hover" */
    }

    input,
    select {
        font-size: 16px;
    }
}