* {
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    margin: 0;
    height: 100vh;
    background: #f2f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CONTENEDOR */
.contenedor {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 10px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* TITULOS */
h2 {
    margin-bottom: 25px;
    color: #333;
}

h3 {
    margin: 10px 0;
}

/* INPUT */
input[type="text"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 20px;
}

/* BOTON */
button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #007bff;
    color: white;
}

button:hover {
    background: #0056b3;
}

/* RESULTADOS */
.resultado-card {
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 25px;
}

.resultado-card.ok {
    background: #e8f5e9;
    color: #1b5e20;
}

.resultado-card.error {
    background: #fdecea;
    color: #b71c1c;
}

.icono {
    font-size: 48px;
    margin-bottom: 15px;
}

/* BOTON VOLVER */
.btn-volver {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    background: #6c757d;
    color: white;
}

.btn-volver:hover {
    background: #5a6268;
}

/* SWITCH */
.switch {
    position: absolute;
    top: 20px;
    right: 20px;
}

.switch input {
    display: none;
}

.slider {
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 30px;
    position: relative;
    cursor: pointer;
}

.slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

input:checked + .slider {
    background: #0d6efd;
}

input:checked + .slider::before {
    transform: translateX(24px);
}

/* MODO OSCURO */
body.dark {
    background: #121212;
}

body.dark .contenedor {
    background: #1e1e1e;
    color: #e0e0e0;
}

body.dark h2 {
    color: #ffffff;
}

body.dark input[type="text"] {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
}

body.dark button {
    background: #0d6efd;
}

body.dark .resultado-card.ok {
    background: #1b3a1b;
    color: #a5d6a7;
}

body.dark .resultado-card.error {
    background: #3a1b1b;
    color: #ef9a9a;
}

body.dark .btn-volver {
    background: #444;
}

body.dark .btn-volver:hover {
    background: #666;
}
