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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        linear-gradient(135deg, rgba(15, 15, 35, 0.8) 0%, rgba(26, 26, 58, 0.9) 100%),
        url('italpol-vigilanza.jpg') center/cover no-repeat fixed;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #00ff88;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    justify-content: center;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: auto;
    max-height: 500px;
    box-shadow: none;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff0040, #ff8800, #00ff88, #0088ff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.1);
}

.card:hover::before {
    opacity: 1;
}

.card h2 {
    font-size: 1.3rem;
    color: #00ff88;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Aggiungi icone ai titoli */
.card h2::before {
    font-size: 1.5rem;
}

.card:nth-child(1) h2::before {
    content: '🇮🇹';
}

.card:nth-child(2) h2::before {
    content: '⚠️';
}

.card:nth-child(3) h2::before {
    content: '🔥';
}

.card:nth-child(4) h2::before {
    content: '🎯';
}

ul {
    list-style: none;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 350px;
    word-wrap: break-word;
    word-break: break-word;
}

ul::-webkit-scrollbar {
    width: 6px;
}

ul::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

ul::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 3px;
}

ul::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.5);
}

li {
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 3px solid #00ff88;
    transition: all 0.3s ease;
    cursor: pointer;
}

li:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateX(5px);
}

li:last-child {
    margin-bottom: 0;
}

a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    display: block;
    line-height: 1.4;
    transition: color 0.3s ease;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

a:hover {
    color: #00ff88;
    text-decoration: none;
}

/* Stili per indicatori di caricamento */
.loading {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Stili per errori */
.error {
    color: #ff0040;
    font-style: italic;
    text-align: center;
    padding: 20px;
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid rgba(255, 0, 64, 0.3);
    border-radius: 8px;
}

/* Effetti pulsanti se aggiunti in futuro */
.refresh-btn {
    background: linear-gradient(45deg, #00ff88, #0088ff);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin: 10px 5px;
}

.refresh-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

/* Animazioni */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.loading-animation {
    animation: pulse 1.5s infinite;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: slideIn 0.6s ease-out;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
        padding: 15px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card {
        padding: 20px;
        max-height: 400px;
    }
    
    .card h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 15px;
        max-height: 350px;
    }
    
    li {
        padding: 12px;
    }
}

/* Effetti speciali per link esterni */
a[target="_blank"]::after {
    content: ' ↗';
    color: #888;
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

li:hover a[target="_blank"]::after {
    opacity: 1;
}