:root {
    --bg-main: #1e1f22;
    --bg-header: #2a2b2f;
    --bg-card: #2b2c31;
    --bg-live: #323338;
    --border-soft: #3a3b40;
    --border-live: #3f4045;
    --text-main: #e4e4e4;
    --text-muted: #b0b0b0;
    --primary: #6ea8ff;
    --danger: #d9534f;
}

/* Layout generale */
body {
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Header */
.hero-air {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-soft);
}

.text-primary-custom {
    color: var(--primary) !important;
}

/* Card */
.card {
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-soft);
}

/* Live box */
.live-box {
    background: var(--bg-live);
    color: var(--text-main);
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    min-width: 240px;
    border: 1px solid var(--border-live);
}

.live-note,
.text-muted {
    color: var(--text-muted) !important;
}

/* Gauge */
.gauge-container {
    width: 100%;
    height: 160px;
    position: relative;
}

.gauge-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.gauge-loading {
    opacity: 0.3;
    filter: blur(2px);
}

.value-label {
    color: #fff;
}

/* Badge qualità aria */
.air-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 6px;
}

.air-good {
    background: #4CAF50;
}

.air-fair {
    background: #FFEB3B;
    color: #000;
}

.air-poor {
    background: #FF9800;
}

.air-bad {
    background: #F44336;
}

/* Promo box */
.promo-fade {
    transition: opacity 0.6s ease;
}

.promo-hidden {
    opacity: 0;
}

/* Bottoni */
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--bg-main);
}

.btn-danger-custom {
    background-color: var(--danger);
    color: #fff;
    font-weight: bold;
    border: 1px solid #ff6b6b;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
}

.btn-danger-custom:hover {
    background-color: #ff6b6b;
    border-color: #ff8a8a;
    color: var(--bg-main);
}

/* Modali */
.modal-content {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-soft);
    border-radius: 15px;
}

/* Link */
a {
    color: var(--primary);
}

a:hover {
    color: #9cc4ff;
}

/* Testi */
.air-comment {
    max-width: 600px;
}

/* Responsive */
@media (max-width: 480px) {
    .live-box {
        padding: 12px 14px;
        min-width: unset;
        text-align: left;
    }

    .live-box-mobile-row {
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .live-box .live-value {
        font-size: 0.95rem;
        margin-bottom: 2px;
    }

    .live-box .live-note {
        font-size: 0.75rem;
    }
}
