Files
esercizi-web/JS_Esercizi 11 - API/meteo/styles.css
2026-02-05 11:57:28 +01:00

186 lines
2.9 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 40px 20px;
}
.container {
max-width: 600px;
margin: 0 auto;
background: white;
border-radius: 15px;
padding: 40px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
h1 {
color: #333;
text-align: center;
margin-bottom: 10px;
}
.subtitle {
text-align: center;
color: #666;
margin-bottom: 30px;
}
.instructions {
background: #e3f2fd;
border-left: 4px solid #2196F3;
padding: 15px;
margin-bottom: 30px;
border-radius: 4px;
}
.instructions h3 {
color: #1565c0;
margin-bottom: 10px;
}
.instructions ol {
margin-left: 20px;
color: #333;
}
.instructions li {
margin: 8px 0;
}
.input-group {
margin-bottom: 20px;
}
label {
display: block;
color: #333;
font-weight: 600;
margin-bottom: 8px;
}
input {
width: 100%;
padding: 10px;
border: 2px solid #ddd;
border-radius: 4px;
font-size: 1rem;
transition: border-color 0.3s;
}
input:focus {
outline: none;
border-color: #667eea;
}
button {
width: 100%;
padding: 12px;
background: #667eea;
color: white;
border: none;
border-radius: 4px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
}
button:hover {
background: #764ba2;
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}
.loading {
display: none;
text-align: center;
color: #667eea;
margin: 20px 0;
}
.spinner {
border: 4px solid #f3f3f3;
border-top: 4px solid #667eea;
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin: 0 auto 10px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.result {
margin-top: 30px;
padding: 20px;
background: #f5f5f5;
border-radius: 8px;
display: none;
}
.result.show {
display: block;
}
.weather-info {
text-align: center;
}
.weather-info h2 {
color: #333;
margin-bottom: 15px;
}
.weather-detail {
background: white;
padding: 10px;
margin: 10px 0;
border-radius: 4px;
border-left: 4px solid #667eea;
}
.error {
background: #ffebee;
border-left-color: #f44336;
color: #c62828;
}
.success {
background: #e8f5e9;
border-left-color: #4caf50;
color: #2e7d32;
}
.back-button {
display: inline-block;
margin-top: 30px;
padding: 10px 20px;
background: #999;
color: white;
text-decoration: none;
border-radius: 4px;
transition: all 0.3s;
}
.back-button:hover {
background: #777;
}
code {
background: #f5f5f5;
padding: 2px 6px;
border-radius: 4px;
font-family: monospace;
color: #d63384;
}