body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0b1020;
    color: #f5f5f5;
}
h1 {
    text-align: center;
}
table {
    border-collapse: collapse;
    width: 90%;
    margin: 20px auto;
    background-color: #141a33;
}
th, td {
    border: 1px solid #2a3358;
    padding: 8px 10px;
    text-align: center;
}
th {
    background-color: #1f2745;
}
.meteo-avverso {
    background-color: #3b1020;
}
.meteo-ok {
    background-color: #10291a;
}
.badge-meteo {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #fff;
    margin-top: 6px;
}
.badge-danger {
    background-color: #e53935;
}
.badge-safe {
    background-color: #43a047;
}
.btn-genera {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.3);
}
.btn-genera:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 64, 175, 0.4);
}
.btn-genera:disabled {
    background: #64748b;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: linear-gradient(145deg, #1a1f2e, #16213e);
    border-radius: 12px;
    width: 95%;
    max-width: 800px;
    max-height: 95vh;
    overflow-y: auto;
    border: 1px solid #2a3358;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #2a3358;
}
.modal-header h3 {
    margin: 0;
    color: #f0f4f8;
    font-size: 1.4rem;
}
.modal-close {
    background: rgba(55,65,81,0.5);
    border: none;
    color: #9ca3af;
    font-size: 24px;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}
.modal-close:hover {
    background: #374151;
    color: #f9fafb;
    transform: scale(1.05);
}
.modal-body {
    padding: 0 24px 24px;
    color: #d1d5db;
    margin-top: 15px;
    max-height: none;
}
.modal-body strong {
    color: #60a5fa;
    font-size: 1.05rem;
}
.annuncio-box {
    background: #0f1419;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #3b82f6;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}
.widget-rischi {
    width: 90%;
    margin: 30px auto;
    background: linear-gradient(145deg, #1a1f2e, #16213e);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #2a3358;
}
.widget-rischi h2 {
    margin: 0 0 20px;
    color: #60a5fa;
    font-size: 1.5rem;
}
#rischiContainer {
    min-height: 100px;
}
.btn-analizza {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-analizza:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}
.btn-analizza:disabled {
    background: #64748b;
    cursor: not-allowed;
}
.rischio-card {
    background: #0f1419;
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    border-left: 4px solid #3b82f6;
}
.rischio-card h3 {
    margin: 0 0 10px;
    color: #f0f4f8;
    font-size: 1.1rem;
}
.rischio-bar-container {
    background: #1e293b;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin: 8px 0;
}
.rischio-bar {
    height: 100%;
    transition: width 0.8s ease, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    font-weight: bold;
    font-size: 0.85rem;
    color: white;
}
.rischio-1, .rischio-2, .rischio-3 { background: linear-gradient(90deg, #10b981, #059669); }
.rischio-4, .rischio-5, .rischio-6 { background: linear-gradient(90deg, #f59e0b, #d97706); }
.rischio-7, .rischio-8 { background: linear-gradient(90deg, #ef4444, #dc2626); }
.rischio-9, .rischio-10 { background: linear-gradient(90deg, #991b1b, #7f1d1d); }
.rischio-motivo {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-top: 6px;
}
