/* Variables */
:root {
    --steam-blue: #1b2838;
    --steam-light: #66c0f4;
    --background-color: #2a475e;
    --card-background: #171a21;
    --text-color: #c7d5e0;
    --button-color: #5c7e99;
    --button-hover: #4e6a82;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Reset y Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background-color: var(--steam-blue);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.header h1 {
    color: var(--steam-light);
    margin-bottom: 0.5rem;
}

/* Contenedor Principal */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    justify-content: center;
    align-items: flex-start;
    flex-grow: 1;
}

/* Tarjetas (Cards) */
.card {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    flex-basis: 100%; /* Por defecto ocupa todo el ancho */
    max-width: 500px;
}

@media (min-width: 900px) {
    .card {
        flex: 1; /* Ocupa el mismo espacio que su vecino en pantallas grandes */
    }
}

.card h2 {
    color: var(--steam-light);
    border-bottom: 2px solid var(--button-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Formularios */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background-color: #3e5c7a;
    color: var(--text-color);
    font-size: 1rem;
}

.input-group input:focus {
    outline: 2px solid var(--steam-light);
    background-color: #4a6785;
}

/* Botón */
#submitBtn {
    background-color: var(--button-color);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.3s ease;
}

#submitBtn:hover:not(:disabled) {
    background-color: var(--button-hover);
}

#submitBtn:disabled {
    background-color: #444;
    cursor: not-allowed;
}

/* Resultado */
.result-card {
    display: flex;
    flex-direction: column;
    min-height: 250px; /* Para que tenga una altura mínima */
}

#loading {
    text-align: center;
    font-size: 1.2rem;
    color: var(--steam-light);
    padding: 20px;
}

.hidden {
    display: none !important;
}

#resultOutput {
    background-color: #111;
    color: #4CAF50; /* Color verde para el código JSON */
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    flex-grow: 1;
    font-family: monospace;
    font-size: 0.95rem;
}