Files
esercizi-web/javascript/08_DOM+/00_ripasso/style.css
2026-02-12 18:36:35 +01:00

233 lines
4.5 KiB
CSS

/* ============================================================
RIPASSO DOM - STILI
============================================================ */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Stesso font dashboard */
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); /* Stesso sfondo dashboard */
min-height: 100vh;
margin: 0;
padding: 20px;
color: #2c3e50;
}
.container {
background: white;
width: 100%;
max-width: 650px;
margin: 0 auto;
padding: 30px;
border-radius: 20px;
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
color: #34495e;
margin: 0 0 10px 0;
font-size: 2rem;
}
.subtitle {
text-align: center;
color: #7f8c8d;
font-size: 1rem;
margin-bottom: 30px;
}
/* ============ STEP ============ */
.step {
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 1px solid #ddd;
}
.step:last-child {
border-bottom: none;
}
.step h2 {
color: #2980b9;
margin-top: 0;
margin-bottom: 5px;
font-size: 1.5rem;
}
.step-description {
color: #7f8c8d;
margin-bottom: 15px;
font-size: 0.95rem;
margin-top: 0;
}
/* ============ EXERCISE ============ */
.exercise {
background: white;
margin-bottom: 15px;
padding: 15px;
border-bottom: 1px solid #eee;
border-radius: 6px;
transition: box-shadow 0.2s ease;
}
.exercise:hover {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.exercise:last-child {
border-bottom: none;
}
.exercise h3 {
color: #2c3e50;
margin: 15px 0 10px 0;
font-size: 1rem;
}
.exercise p {
margin: 5px 0;
font-size: 0.9rem;
}
.testo-blu {
color: #3498db;
font-weight: 500;
}
/* ============ INPUT & BUTTON ============ */
input[type="text"],
input[type="number"],
textarea {
width: 100%;
padding: 8px;
margin: 8px 0;
border: 1px solid #bdc3c7;
border-radius: 5px;
font-size: 0.95rem;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
box-sizing: border-box;
}
input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
outline: none;
border-color: #3498db;
box-shadow: 0 0 5px rgba(52, 152, 219, 0.2);
}
button {
background: #3498db;
color: white;
border: none;
padding: 10px 20px;
margin: 8px 5px 8px 0;
border-radius: 8px;
cursor: pointer;
font-weight: bold;
transition: all 0.2s ease;
font-size: 0.9rem;
box-shadow: 0 2px 6px rgba(52, 152, 219, 0.2);
}
button:hover {
background: #2980b9;
box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
transform: translateY(-1px);
}
button:active {
border-radius: 5px;
color: #2c3e50;
white-space: pre-wrap;
word-break: break-word;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}
/* ============ RISULTATO & AREA OUTPUT ============ */
.risultato {
background: #f8fafb;
border: 1px solid #d5d8dc;
padding: 8px;
border-radius: 5px;
margin-top: 8px;
color: #34495e;
font-size: 0.85rem;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}
.area-output {
background: #f8fafb;
border: 1px solid #d5d8dc;
padding: 10px;
border-radius: 5px;
margin-top: 8px;
color: #34495e;
font-size: 0.9rem;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
min-height: 20px;
word-wrap: break-word;
white-space: pre-wrap;
}
/* ============ BOX CLICK ============ */
.box-click {
display: inline-block;
width: 90px;
height: 90px;
background: #f0f3f4;
color: #2c3e50;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
cursor: pointer;
margin: 5px;
font-weight: bold;
font-size: 0.9rem;
border: 1px solid #d5d8dc;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.box-click:hover {
background: #e8ecef;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.box-click:active {
transform: translateY(0);
}
/* ============ ELEMENTO TOGGLE ============ */
.elemento-normale {
padding: 15px;
border: 2px solid #3498db;
border-radius: 8px;
background: white;
cursor: pointer;
transition: all 0.3s ease;
color: #2c3e50;
}
.elemento-normale:hover {
background: #ecf0f1;
box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}
.elemento-attivo {
background: #3498db;
color: white;
border-color: #2980b9;
transform: scale(1.05);
box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}