/* 1. RESET & SETUP FONDAMENTALE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Gestisce meglio padding e bordi */
}

html, body {
    height: 100%; /* Indispensabile per spingere il footer in basso */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f0f2f5;
    color: #333;
    
    /* Layout a colonna per gestire il footer */
    display: flex;
    flex-direction: column;
}

/* HEADER & NAVBAR */
header {
    /* Aggiunge spazio automatico per il Notch dell'iPhone */
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #007bff;
}

/* MENU RESPONSIVE (MOBILE) */
.menu-toggle {
    display: none; /* Nascondiamo la checkbox */
}

.hamburger {
    display: none; /* Nascosto su desktop */
    font-size: 2rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none; /* Nascondiamo i link su mobile */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    /* Quando la checkbox è cliccata, mostra il menu */
    .menu-toggle:checked ~ .nav-links {
        display: flex;
    }
}

/* 2. CONTENUTO PRINCIPALE */
.container {
    flex: 1; /* Si espande per occupare tutto lo spazio verticale residuo */
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto; /* Centra il contenuto orizzontalmente */
    width: 100%;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

h1 {
    color: #1a1a1a;
    margin-bottom: 20px;
}

/* 3. ELEMENTI INTERATTIVI */
button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

/* 4. FOOTER A TUTTA LARGHEZZA (Full Width) */
footer {
    width: 100%;
    background-color: #1a1a1a; /* Nero opaco professionale */
    color: #ffffff;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.footer-links a {
    color: #00a8ff;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

a:link {
  color: rgb(16, 17, 16);
  background-color: transparent;
  text-decoration: none;
}

a:visited {
  color: rgb(247, 22, 116);
  background-color: transparent;
  text-decoration: none;
}

a:hover {
  color: #ff0088;
  background-color: transparent;
  text-decoration: underline;
}

a:active {
  color: rgb(21, 107, 188);
  background-color: transparent;
  text-decoration: underline;
}

.card div {
    transition: transform 0.3s ease;
}
.card:hover div {
    transform: translateY(-10px); /* L'emoji sale un po' quando passi il mouse */
}

       /* Stile per il Popup (Modal) */
        .modal {
            display: none; 
            position: fixed; 
            z-index: 2000; 
            left: 0; top: 0;
            width: 100%; height: 100%;
            background-color: rgba(0,0,0,0.8);
        }
        .modal-content {
            margin: auto;
            display: block;
            width: 80%;
            max-width: 700px;
            margin-top: 10%;
            border: 5px solid white;
            border-radius: 10px;
        }
        .close {
            position: absolute;
            top: 20px; right: 35px;
            color: white;
            font-size: 40px;
            font-weight: bold;
            cursor: pointer;
        }

                body {
            background: linear-gradient(135deg, #f0f2f5 0%, #ffeef8 100%);
        }
        .login-container {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 70vh;
        }
        .login-card {
            max-width: 400px;
            width: 100%;
            background: white;
            padding: 40px;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(233, 30, 99, 0.1);
            text-align: center;
            border: 1px solid #ffe4f0;
        }
        .login-card h1 {
            color: #333;
            margin-bottom: 10px;
            font-size: 2rem;
        }
        .input-group {
            text-align: left;
            margin-bottom: 20px;
        }
        .input-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #555;
            font-size: 0.9rem;
        }
        .input-group input {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #f0f0f0;
            border-radius: 10px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        .input-group input:focus {
            outline: none;
            border-color: #e91e63;
            box-shadow: 0 0 8px rgba(233, 30, 99, 0.2);
        }
        .btn-login {
            width: 100%;
            background: linear-gradient(to right, #e91e63, #ff4081);
            color: white;
            padding: 14px;
            border: none;
            border-radius: 10px;
            font-size: 1.1rem;
            font-weight: bold;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            margin-top: 10px;
        }
        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(233, 30, 99, 0.3);
        }
        .forgot-pass {
            display: block;
            margin-top: 15px;
            color: #999;
            text-decoration: none;
            font-size: 0.85rem;
        }