/* --- ESTILOS GENERALES (SIN CAMBIOS) --- */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #fff;
    overflow: hidden;
}

header {
    position: absolute;
    top: 10px;
    left: 50px;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

header h1 {
    margin: 0;
    font-size: 1.5em;
    font-weight: bold;
}

header p {
    margin: 5px 0 0 0;
    font-size: 0.9em;
    opacity: 0.9;
}

#map {
    height: 100vh;
    width: 100vw;
    z-index: 1;
}

/* --- CAJA DE INFORMACIÓN DEL CLIMA (SIN CAMBIOS) --- */
#weather-info {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 200px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#weather-info h2 {
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.temperature {
    font-size: 2.5em;
    font-weight: bold;
}

.description {
    font-size: 1.1em;
    font-style: italic;
    margin: 10px 0;
}

.weather-extra p {
    margin: 5px 0;
    font-size: 0.9em;
    opacity: 0.9;
}

/* --- NUEVOS ESTILOS PARA EL PANEL DE CONTROLES --- */
#controls-panel {
    position: absolute;
    top: 100px; /* Debajo del encabezado */
    left: 50px;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 220px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#controls-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

#controls-panel .control-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9em;
}

#controls-panel label {
    flex-grow: 1;
}

#refresh-button {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: none;
    border-radius: 6px;
    background-color: #007bff;
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#refresh-button:hover {
    background-color: #0056b3;
}

#refresh-interval {
    width: 50px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
}

#refresh-interval:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#update-counter {
    color: #4CAF50; /* Color verde para resaltar el contador */
    font-size: 1.1em;
}

/* --- FOOTER (SIN CAMBIOS) --- */
footer {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    font-size: 0.8em;
    color: #ccc;
    text-shadow: 1px 1px 2px #000;
}

footer a {
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    header, #controls-panel {
        left: 10px;
        right: 10px;
        top: auto;
    }
    header {
        top: 10px;
    }
    #controls-panel {
        top: 90px;
    }
    #weather-info {
        bottom: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}