/* ===== CSS UNICO PER HOME ULTIMATE ===== */
/* Basato sui colori ufficiali di ItalyAmami */

/* Variabili CSS per consistenza */
:root {
    /* Colori principali */
    --primary-color: #a259ec;
    --primary-dark: #8a2be2;
    --primary-light: #da70d6;
    --secondary-color: #667eea;
    --accent-color: #764ba2;
    
    /* Colori di sfondo */
    --bg-primary: #181028;
    --bg-secondary: #1a1333;
    --bg-card: #2d1850;
    --bg-overlay: rgba(255, 255, 255, 0.1);
    
    /* Colori testo */
    --text-primary: #f3f3f3;
    --text-secondary: #e0d7fa;
    --text-muted: #666;
    --text-dark: #333;
    
    /* Colori bordi */
    --border-primary: #a259ec;
    --border-secondary: #2d1850;
    --border-light: rgba(255, 255, 255, 0.2);
    
    /* Ombre */
    --shadow-primary: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(162, 89, 236, 0.4);
    --shadow-card: 0 4px 15px rgba(102, 126, 234, 0.4);
    
    /* Gradienti */
    --gradient-primary: linear-gradient(135deg, #a259ec, #181028);
    --gradient-secondary: linear-gradient(135deg, #667eea, #764ba2);
    --gradient-card: linear-gradient(135deg, rgba(162, 89, 236, 0.1), rgba(218, 112, 214, 0.1));
    
    /* Dimensioni */
    --sidebar-width: 280px;
    --border-radius: 20px;
    --border-radius-small: 25px;
    --border-radius-large: 30px;
    
    /* Transizioni */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
}

/* Reset e stili base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Striscia alta con 3 lineette */
.top-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: var(--shadow-glow);
    z-index: 1000;
    border-bottom: 2px solid var(--border-primary);
}

.hamburger-menu {
    width: 30px;
    height: 25px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all var(--transition-fast);
}

.hamburger-menu:hover span {
    background: var(--primary-light);
    box-shadow: 0 0 10px var(--primary-color);
}

.top-title h1 {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(162, 89, 236, 0.5);
}

.app-name-header {
    background: linear-gradient(45deg, #009246, #ffffff, #ce2b37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.1em;
    text-shadow: 0 0 10px rgba(0, 146, 70, 0.3);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-actions a {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-actions i {
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-actions i.fa-bell {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.top-actions i.fa-bell:hover {
    color: #ffed4e;
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.top-actions i.fa-user {
    color: var(--primary-color);
    background: rgba(162, 89, 236, 0.1);
    border: 1px solid rgba(162, 89, 236, 0.3);
}

.top-actions i.fa-user:hover {
    color: var(--primary-light);
    background: rgba(162, 89, 236, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(162, 89, 236, 0.4);
}

.top-actions i.fa-users {
    color: #4fc3f7;
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.3);
}

.top-actions i.fa-users:hover {
    color: #81d4fa;
    background: rgba(79, 195, 247, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.4);
}

.top-actions i.fa-shield-alt {
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.top-actions i.fa-shield-alt:hover {
    color: #ff8a65;
    background: rgba(255, 107, 53, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.4);
}

/* Stili per il nome dell'app con colori italiani */
.italy-flag {
    font-size: 1.2em;
    margin-right: 10px;
}

.app-name {
    background: linear-gradient(45deg, #009246, #ffffff, #ce2b37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.1em;
    text-shadow: 0 0 10px rgba(0, 146, 70, 0.3);
}

/* Menu laterale */
.side-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    z-index: 2000;
    transition: left var(--transition-fast);
    overflow-y: auto;
    border-right: 2px solid var(--border-primary);
    transform: translateX(-100%);
}

.side-menu.active {
    left: 0;
    transform: translateX(0);
}

.menu-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient-card);
}

.menu-header h3 {
    color: var(--primary-color);
    font-size: 20px;
    text-shadow: 0 0 10px rgba(162, 89, 236, 0.5);
}

.close-menu {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
    transition: all var(--transition-fast);
    opacity: 0;
    visibility: hidden;
    transform: scale(0);
}

.side-menu.active .close-menu {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.close-menu:hover {
    color: var(--primary-light);
    transform: scale(1.1);
}

.menu-nav ul {
    list-style: none;
    padding: 20px 0;
}

.menu-nav li {
    margin: 0;
}

.menu-nav a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.menu-nav a:hover {
    background: var(--gradient-card);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(5px);
}

.menu-nav i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

/* Contenuto principale */
.main-content {
    margin-top: 80px;
    padding: 20px;
    padding-bottom: 100px;
}

/* Sezione benvenuto */
.welcome-section {
    margin-bottom: 30px;
}

.welcome-card {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-glow);
    border: 2px solid var(--border-primary);
    position: relative;
    overflow: hidden;
    animation: glow 4s ease-in-out infinite;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

.welcome-icon i {
    font-size: 35px;
    color: var(--text-primary);
}

.welcome-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.username {
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(162, 89, 236, 0.5);
}

.welcome-message {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.user-info {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 10px;
    text-align: left;
    border: 1px solid var(--border-light);
}

.user-info p {
    margin: 5px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Sezioni rapide */
.quick-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.section-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-primary);
    transition: all var(--transition-fast);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(162, 89, 236, 0.1), transparent);
    transition: left var(--transition-medium);
}

.section-card:hover::before {
    left: 100%;
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-color);
}

.section-card i {
    font-size: 30px;
    color: var(--primary-color);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.section-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.section-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* Barra di navigazione in basso */
.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-top: 2px solid var(--border-primary);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    padding: 8px 5px;
    border-radius: 10px;
    min-width: 60px;
}

.nav-item:hover {
    color: var(--primary-color);
    background: var(--gradient-card);
    transform: translateY(-2px);
}

.nav-item.active {
    color: var(--primary-color);
    background: var(--gradient-card);
    box-shadow: 0 0 15px rgba(162, 89, 236, 0.3);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

.nav-item span {
    font-size: 10px;
    font-weight: 500;
    text-align: center;
}

/* Responsive design */
@media (max-width: 480px) {
    .top-navigation {
        height: 55px;
        padding: 0 15px;
    }
    
    .top-title h1 {
        font-size: 16px;
    }
    
    .main-content {
        margin-top: 75px;
        padding: 15px;
        padding-bottom: 90px;
    }
    
    .welcome-card {
        padding: 25px 20px;
    }
    
    .welcome-title {
        font-size: 22px;
    }
    
    .quick-sections {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .section-card {
        padding: 15px;
    }
    
    .section-card i {
        font-size: 25px;
    }
    
    .section-card h3 {
        font-size: 14px;
    }
    
    .section-card p {
        font-size: 11px;
    }
    
    .bottom-navigation {
        padding: 8px 0;
    }
    
    .nav-item {
        padding: 6px 3px;
        min-width: 50px;
    }
    
    .nav-item i {
        font-size: 18px;
    }
    
    .nav-item span {
        font-size: 9px;
    }
}

@media (min-width: 768px) {
    .top-navigation {
        height: 70px;
        padding: 0 30px;
    }
    
    .top-title h1 {
        font-size: 22px;
    }
    
    .main-content {
        margin-top: 90px;
        padding: 30px;
        padding-bottom: 110px;
    }
    
    .welcome-card {
        padding: 40px;
    }
    
    .welcome-title {
        font-size: 28px;
    }
    
    .quick-sections {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .section-card {
        padding: 25px;
    }
    
    .section-card i {
        font-size: 35px;
    }
    
    .section-card h3 {
        font-size: 18px;
    }
    
    .section-card p {
        font-size: 14px;
    }
    
    .bottom-navigation {
        padding: 15px 0;
    }
    
    .nav-item {
        padding: 10px 8px;
        min-width: 80px;
    }
    
    .nav-item i {
        font-size: 24px;
    }
    
    .nav-item span {
        font-size: 12px;
    }
}

@media (min-width: 1024px) {
    .side-menu {
        width: 350px;
    }
    
    .main-content {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Animazioni */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(162, 89, 236, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(162, 89, 236, 0.8), 0 0 30px rgba(162, 89, 236, 0.6);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.welcome-card,
.section-card {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Scrollbar personalizzata */
.side-menu::-webkit-scrollbar {
    width: 6px;
}

.side-menu::-webkit-scrollbar-track {
    background: rgba(162, 89, 236, 0.1);
}

.side-menu::-webkit-scrollbar-thumb {
    background: var(--gradient-secondary);
    border-radius: 3px;
}

.side-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}
