/* Stile base */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

/* Tema scuro di default */
body.dark {
    background-color: #121212;
    color: #ffffff;
}

body.light {
    background-color: #f5f5f5;
    color: #1a1a1a;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: inherit;
}

/* Logo a sinistra */
header .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Switch tema */
.theme-switch {
    display: flex;
    align-items: center;
}

/* Switch moderno */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input { display: none; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

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

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

/* Main */
main {
    text-align: center;
    padding: 50px;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    background-color: #2196F3;
    color: #fff;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #1976d2;
}

/* Bottom nav moderno con icone orizzontali, senza riquadro nero */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;   /* pulsanti orizzontali */
    gap: 15px;
    z-index: 1000;
}

/* Pulsanti cerchio */
.bottom-nav .nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: transparent; /* trasparente di default */
    transition: transform 0.2s, background-color 0.3s;
}

/* Icone */
.bottom-nav .nav-btn img {
    width: 24px;
    height: 24px;
    filter: invert(100%);  /* bianche di default su tema scuro */
    transition: filter 0.3s;
}

/* Hover */
.bottom-nav .nav-btn:hover {
    transform: scale(1.2);
}

/* Pagina attiva */
.bottom-nav .nav-btn.active {
    background-color: #2196F3; /* azzurro */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Icona nella pagina attiva diventa più chiara o più scura a seconda del tema */
.bottom-nav .nav-btn.active img {
    filter: invert(100%); /* mantieni bianco su tema scuro */
}

/* Optional: tema chiaro */
body.light .bottom-nav .nav-btn.active {
    background-color: #64b5f6; /* azzurro chiaro */
    filter: invert(0%); /* icone scure se tema chiaro */
}

/* Stile per i range slider */
.sliders-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 300px;
    margin: 50px auto;
}

.sliders-container input[type=range] {
    width: 100%;
}

/* Stile per i gauge */
#gauges-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
}

.gauge {
    width: 200px;   /* dimensione fissa */
    height: 160px;  /* dimensione fissa */
}