* {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    /* Palette colori professionale - Dark Theme */
    :root {
        --primary-orange: #f97316;    /* Arancione principale */
        --secondary-orange: #fb923c;  /* Arancione medio */
        --light-orange: #ffedd5;      /* Crema per icone secondarie */
        --dark-bg: #1c1917;           /* Sfondo Stone 900 (caldo) */
        --glass-bg: rgba(41, 37, 36, 0.7); /* Vetro scuro per contrasto */
        --glass-border: rgba(249, 115, 22, 0.2); 
        --text-primary: #fafaf9;      /* Testo quasi bianco */
        --text-secondary: #d6d3d1;    /* Testo grigio caldo */
        --footer-text: #fafaf9;
        --success-green: #10b981;
        --error-orange: #ef4444;
        --shadow-glow: rgba(249, 115, 22, 0.4); /* Glow arancione */
    }

    /* Light Theme - Colori scuriti per accessibilità */
    [data-theme="light"] {
        --primary-orange: #c2410c;    /* Arancione scuro (Rust) per leggerezza */
        --secondary-orange: #ea580c;
        --light-orange: #7c2d12;      /* Testo scurissimo per i valori */
        --dark-bg: #fffaf5;           /* Bianco sporco caldo */
        --glass-bg: rgba(255, 255, 255, 0.8);
        --glass-border: rgba(194, 65, 12, 0.15);
        --text-primary: #1c1917;      /* Testo nero caldo */
        --text-secondary: #57534e;    /* Testo grigio scuro */
        --footer-text: #fafaf9;
        --success-green: #059669;
        --error-orange: #dc2626;
        --shadow-glow: rgba(194, 65, 12, 0.1);
    }

    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        /* Gradiente di sfondo aranciato scuro */
        background: linear-gradient(135deg, var(--dark-bg) 0%, #431407 100%);
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        color: var(--text-primary);
        position: relative;
        overflow-x: hidden;
        transition: background 0.3s ease, color 0.3s ease;
    }

    /* Effetto bagliore arancio di sfondo (sostituito il blu) */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: 
            radial-gradient(circle at 20% 30%, rgba(249, 115, 22, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(124, 45, 18, 0.1) 0%, transparent 50%);
        pointer-events: none;
        z-index: 0;
    }

    /* ========================================
       HEADER
    ======================================== */
    header {
        position: relative;
        z-index: 10;
        padding: 2rem 1.5rem 1rem;
        text-align: center;
    }

    .header-content {
        max-width: 1200px;
        margin: 0 auto;
        position: relative;
    }

    .theme-toggle {
        position: absolute;
        top: 0;
        right: 0;
        width: 48px;
        height: 48px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        backdrop-filter: blur(10px);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    .theme-toggle svg {
        width: 24px;
        height: 24px;
        color: var(--primary-orange);
    }

    h1 {
        font-size: clamp(1.8rem, 4vw, 3rem);
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }

    .live-indicator {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        margin-top: 1rem;
        padding: 0.5rem 1rem;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 20px;
        backdrop-filter: blur(10px);
        font-size: 0.9rem;
    }

    .live-dot.active {
        background: var(--success-green);
        animation: pulse-green 2s infinite;
    }

    @keyframes pulse-green {
        0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
        50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    }

    /* ========================================
       CARD PRINCIPALE
    ======================================== */
    main {
        flex: 1;
        position: relative;
        z-index: 10;
        padding: 2rem 1.5rem;
        max-width: 1200px;
        width: 100%;
        margin: 0 auto;
    }

    .weather-card {
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 24px;
        padding: 2.5rem;
        backdrop-filter: blur(20px);
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), 0 0 30px 0 var(--shadow-glow);
    }

    .metrics-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
        gap: 2rem;
        margin-top: 2rem;
    }

    .metric {
        text-align: center;
        padding: 1.5rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        transition: all 0.3s ease;
    }

    .metric:hover {
        background: rgba(249, 115, 22, 0.1);
        border-color: var(--primary-orange);
        transform: translateY(-5px);
    }

    .metric-icon {
        margin-bottom: 1rem;
        color: var(--primary-orange);
        filter: drop-shadow(0 0 8px var(--shadow-glow));
    }

    .metric-label {
        font-size: 0.85rem;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 1.5px;
        margin-bottom: 0.5rem;
    }

    .metric-value {
        font-size: 2.8rem;
        font-weight: 800;
        color: var(--primary-orange);
        /* Rimosso l'effetto blu, aggiunto glow caldo */
        text-shadow: 0 0 20px rgba(249, 115, 22, 0.2);
    }

    .metric-unit {
        font-size: 1.2rem;
        color: var(--text-secondary);
        margin-left: 4px;
    }

    .axis-label {
        color: var(--text-secondary);
        font-weight: bold;
    }

    .position-axis span:not(.axis-label) {
        color: var(--primary-orange);
    }

    /* ========================================
       FOOTER E UPDATE
    ======================================== */
    .last-update {
        text-align: center;
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--glass-border);
        color: var(--text-secondary);
    }

    footer {
        position: relative;
        z-index: 10;
        padding: 2.5rem 1.5rem;
        text-align: center;
        /* Sfondo footer scuro e solido per leggibilità */
        background: rgba(28, 25, 23, 0.95);
        border-top: 1px solid var(--glass-border);
    }

    .footer-content{
        color: var(--footer-text);
    }

    .footer-content strong {
        color: var(--primary-orange);
    }

    /* Ottimizzazioni Responsive */
    @media (max-width: 768px) {
        .weather-card { padding: 1.5rem; }
        .metric-value { font-size: 2.2rem; }
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .weather-card { animation: fadeIn 0.6s ease-out; }