:root {
    --primary-color: #4285F4;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --accent-color: #34A853; 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    min-height: 100vh;
    padding-top: 2rem;
}

#app-container {
    width: 90%;
    max-width: 400px;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 2rem;
    position: relative; /* Essenziale per gestire i livelli degli schermi */
}

/* Gestione schermi: evita che quello nascosto blocchi i click */
.screen[style*="display: none"] {
    pointer-events: none;
}

h1 { color: var(--primary-color); font-size: 2.5rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.2rem; margin: 0; }
h3 { margin-top: 0; color: #333; }
p { color: #666; margin-bottom: 1.5rem; }

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

/* Pulsanti Generali */
button {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    outline: none;
}

/* Specifica per pulsante Google Login */
#btn-google-login {
    margin-top: 1rem;
    border: 1px solid #4285F4;
    color: #4285F4;
    font-weight: 600;
    position: relative;
    z-index: 100; /* Lo porta sopra tutto */
}

#btn-google-login:active {
    background-color: #f1f3f4;
    transform: scale(0.98);
}

button.primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: bold;
}

button.primary:hover { 
    background-color: #357ae8; 
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
}

button.secondary {
    padding: 5px 10px;
    font-size: 0.8rem;
    width: auto;
    border-color: #ff4444;
    color: #ff4444;
}

.card {
    border: 1px solid #eee;
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 1rem;
    background: #fdfdfd;
}

/* --- TOGGLE GIORNO --- */
.availability-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 1.5rem 0;
}

.day-group {
    background: #fff;
    border-radius: 12px;
    text-align: left;
}

.day-toggle {
    width: 100%;
    padding: 14px;
    background: #f8f9fa;
    border: 2px solid #eee;
    border-radius: 12px;
    font-weight: 700;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-toggle.active {
    background: #e8f0fe;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* --- FASCE ORARIE --- */
.time-slots { 
    display: none; 
    gap: 8px; 
    padding: 10px 5px 15px 5px;
    flex-wrap: wrap;
}

.slot-btn {
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    width: auto !important; 
    flex: 1 1 auto;
}

.slot-btn.selected {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
}

/* Lista Eventi */
#events-list .card {
    border-left: 5px solid var(--primary-color);
    text-align: left;
    padding: 12px;
}

/* Nascondi gli schermi di default, ci pensa il JavaScript a mostrarli */
#login-screen, #dashboard-screen {
    display: none;
}

#login-screen, #dashboard-screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out; /* Effetto comparsa fluida */
}

/* --- SCHERMATA REGISTRAZIONE --- */
#registration-screen {
    display: none; /* Sarà il JS a metterlo 'block' */
    padding: 1rem;
    animation: fadeIn 0.5s ease-in-out;
}

/* Se vuoi che il box di registrazione risalti di più quando appare */
#registration-screen h2 {
    color: #34A853; /* Usa il verde accent che hai definito */
    font-size: 1.5rem;
    margin-bottom: 10px;
}

#registration-screen input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box; /* Fondamentale per non far uscire l'input dai bordi */
}

