@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

* {
    box-sizing: border-box;
}

body, html {
    background-color: #f0f0f0;
    font-family: 'Nunito', sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    /* max-width: 400px; */
    max-width: 370px;
    outline: 2px solid #ccc; 
    overflow: hidden;
}

.weather-card {
    background-color: #4682b4;
    border-top: 2px solid #4CA;
    color: #fff;
    height: auto;
    min-height: 250px;
    overflow: hidden;
    padding: 20px;
    position: relative;
    transition: background-color 2s ease;
}

.city-name {
    font-size: 28px;
    font-weight: 700;
    /* margin-bottom: 10px; */
}

.current-time {
    font-size: 18px;
}

.weather-data {
    align-items: center;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; */
    margin-bottom: 20px;
}

.temperature {
    font-size: 72px;
    font-weight: 300;
    margin-bottom: 10px; 
}

.weather-details {
    display: flex;
    justify-content: space-around;
    width: 100%;
}

.wind, .humidity {
    font-size: 18px;
}

.weather-description {
    font-size: 24px;
    margin-top: 20px;
    text-align: center;
}

.forecast {
    background-color: lightslategray;
    border-top: 2px solid #4CA; 
    display: flex;
    overflow-x: auto;
    padding: 20px;
}

.forecast-item {
    flex: 0 0 auto;
    margin-right: 20px;
    text-align: center;
    
}

.forecast-time {           
    font-weight: 700;
    margin-bottom: 5px;
}

.forecast-icon img {
    height: 50px;
    width: 50px;
}

.forecast-temp {
    font-size: 18px;
}

#weatherForm {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: 20px;
}

#cityInput {
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    /* flex-grow: 1; */
    flex-grow: 0;
    font-size: 16px;
    padding: 10px;
    width: 190px;
}

button {
    background-color: #4CAF50;
    border: none;
    border-radius: 0 5px 5px 0;
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 10px 20px;
}

button:hover {
    background-color: #45a049;
}

#map {
    border-top: 2px solid #4CA;
    height: 100px;
    width: 100%;
}

.language-switch-container {
    display: flex;
    justify-content: flex-end; 
    padding: 10px; 
    padding-bottom: 1px;
    align-items: center; 
    gap: 8px; /* espacio entre etiqueta y switch */
}

.language-switch-container .lang-label {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    user-select: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    z-index: 1;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Estilos para los textos del switch */
.lang-text {
    color: #333333;
    font-size: 12px;
    font-weight: bold;
    z-index: 0;
    transition: .4s;
    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.3);
}

.lang-text.esp {
    padding-left: 8px;
}

.lang-text.eng {
    padding-right: 8px;
}

/* Mostrar/ocultar texto según la posición del switch */
input:checked ~ .slider .lang-text.esp {
    opacity: 0.5;
}

input:not(:checked) ~ .slider .lang-text.eng {
    opacity: 0.5;
}

/* Texto activo más visible */
input:not(:checked) ~ .slider .lang-text.esp,
input:checked ~ .slider .lang-text.eng {
    color: #1a1a1a;
    text-shadow: 0px 1px 2px rgba(255, 255, 255, 0.5);
}

.donate-container {
    text-align: center;
    margin-top: 20px;
}

.donate-button {
    background-color: #4CAF50;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 10px 20px;
}

.donate-button:hover {
    background-color: #45a049;
}

.modal {
    display: none;
    position: fixed;
    /* z-index: 1; */
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.crypto-options {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: wrap;
}

.crypto-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1 1 30%; /* permit three items per row with equal base width */
    min-width: 140px; /* keep usable on very small screens */
    background: #fafafa;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.crypto-option i {
    font-size: 28px;
    line-height: 1;
}

.crypto-option input {
    width: 100%;
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 3px;
}

.copy-button {
    background: #eee;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 3px;
}

.copy-button:hover {
    background: #ddd;
}

