
:root {
    color-scheme: dark;
    --fondo: #081827;
    --tarjeta: #122437;
    --azul: #38bdf8;
    --texto: #ffffff;
    --secundario: #94a3b8;
    --borde: #203b52;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    background: var(--fondo);
    color: var(--texto);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding-top: env(safe-area-inset-top);
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

header {
    text-align: center;
    padding: 25px 15px 20px;
    background: linear-gradient(180deg, #102c45, #081827);
    border-bottom: 1px solid var(--borde);
}

header h1 {
    margin: 0;
    font-size: 27px;
    font-weight: 900;
    letter-spacing: 2px;
}

header p {
    margin: 6px 0 0;
    color: var(--azul);
    font-size: 13px;
    letter-spacing: 1px;
}

main {
    max-width: 600px;
    margin: auto;
    padding: 16px;
}

h2 {
    font-size: 21px;
}

h3 {
    font-size: 16px;
    margin-top: 0;
}

.ubicacion {
    text-align: center;
    margin-bottom: 20px;
}

.ubicacion h2 {
    margin: 8px 0 12px;
}

button {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: #1d4e75;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    touch-action: manipulation;
}

button:active {
    opacity: 0.7;
}

button:disabled {
    opacity: 0.4;
    cursor: default;
}

.tarjeta {
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 14px;
}

.clima {
    text-align: center;
    background: linear-gradient(145deg, #173a56, #102437);
    padding: 25px 15px;
}

#icono-clima {
    font-size: 65px;
}

#temperatura {
    font-size: 65px;
    font-weight: 300;
    margin: 5px 0;
}

#estado-clima {
    font-size: 19px;
    margin: 8px 0;
}

#sensacion {
    color: var(--secundario);
    font-size: 14px;
}

.datos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.datos .tarjeta {
    margin: 0;
    padding: 16px;
}

.datos span {
    display: block;
    color: var(--secundario);
    font-size: 13px;
    margin-bottom: 10px;
}

.datos strong {
    font-size: 22px;
    font-weight: 600;
}

#avisos {
    color: var(--secundario);
    font-size: 14px;
    line-height: 1.6;
}

nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: #0d2133;
    border-top: 1px solid var(--borde);
    padding: 10px 5px calc(10px + env(safe-area-inset-bottom));
    z-index: 100;
}

nav button {
    flex: 1;
    background: transparent;
    font-size: 12px;
    padding: 14px 4px;
    color: var(--secundario);
}

nav button.activo {
    color: var(--azul);
    background: #17354d;
}

label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 0;
    border-bottom: 1px solid var(--borde);
    font-size: 15px;
}

input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #38bdf8;
}

#activar-notificaciones {
    width: 100%;
    margin-top: 20px;
    background: #0369a1;
}

#configuracion p {
    color: var(--secundario);
    font-size: 12px;
    text-align: center;
}

.dia-pronostico {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 10px;
}

.minima {
    color: #7dd3fc;
}

.maxima {
    color: #fbbf24;
}

footer {
    text-align: center;
    color: var(--secundario);
    font-size: 11px;
    line-height: 1.6;
    margin: 25px 0 10px;
}

[hidden] {
    display: none !important;
}
