/* styles.css - v19.0 (FULL WIDTH HEADERS) */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* === SAFETY === */
.screen {
    display: none;
    width: 100%;       /* Forza la larghezza piena */
    padding: 0;        /* RIMOSSO: padding: 20px e padding-top: 100px */
    padding-bottom: 80px; /* Mantiene lo spazio in fondo per lo scroll */
    animation: fadeIn 0.5s;
}
.screen.active { display: block; }

:root {
    --red: #C41E3A;
    --green: #165B33;
    --gold: #FFD700;
    --white: #FFFAFA;
    --dark: #2c3e50;
    --bg-gradient: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    --card-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-gradient);
    color: #333;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* === HEADER === */
.app-container { max-width: 500px; margin: 0 auto; min-height: 100vh; background: #fdfdfd; position: relative; box-shadow: 0 0 50px rgba(0,0,0,0.5); }
.christmas-header { background: var(--red); color: white; padding: 25px 20px; text-align: center; border-bottom: 5px solid var(--gold); box-shadow: 0 5px 15px rgba(0,0,0,0.2); position: relative; z-index: 10; border-radius: 0 0 20px 20px; }
.glowing-text { font-size: 28px; text-shadow: 0 0 10px var(--gold); margin: 10px 0 0 0; font-weight: 800; letter-spacing: 1px; }
.santa-hat { font-size: 40px; animation: bounce 2s infinite; display: inline-block; }

/* === CARDS (FIX BORDI BIANCHI) === */
.christmas-card {
    background: white;
    border-radius: 15px;
    padding: 0 0 20px 0; /* Tolto padding sopra/lati, lasciato solo sotto */
    margin: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid #eee;
    overflow: hidden; /* Importante per i bordi arrotondati */
}

/* Contenitore per il corpo della card (per rimettere il padding ai contenuti) */
.card-body {
    padding: 0 20px;
}

/* Titoli Full Width */
.christmas-card h2, .christmas-card h3 {
    background: #f8f9fa;
    color: var(--green);
    margin: 0 0 20px 0; /* Reset margini */
    padding: 15px 20px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    letter-spacing: 0.5px;
}

/* Header Bacheca Full Width */
.card-header-row {
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}
.card-header-row h3 {
    background: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

/* Messaggi */
.messages-container {
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    /* margin: 0 20px; Se vuoi margine laterale specifico */
}
.message-item {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.message-item:last-child { border-bottom: none; }
.message-item.game_start { background: #fff5f5; }
.message-icon { font-size: 20px; line-height: 1; min-width: 25px; text-align: center; }
.message-content { flex: 1; }
.message-text { font-size: 14px; color: #333; line-height: 1.4; }
.message-date { display: block; font-size: 11px; color: #999; margin-top: 4px; }

/* === ADMIN === */
.admin-item { background: #fff; border: 1px solid #ddd; border-left: 4px solid var(--green); padding: 15px; margin-bottom: 10px; border-radius: 8px; }
.admin-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.admin-item-name { font-weight: bold; font-size: 16px; color: var(--dark); }
.admin-item-info { font-size: 13px; color: #666; display: flex; gap: 10px; align-items: center; }
.status-badge { padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: bold; text-transform: uppercase; }
.status-ok { background: #d4edda; color: #155724; }
.status-no { background: #f8d7da; color: #721c24; }
.match-item { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 12px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.match-arrow { color: var(--red); font-weight: bold; font-size: 20px; }

/* === UI === */
.input-field { width: 100%; padding: 15px; margin-bottom: 15px; border: 2px solid #ddd; border-radius: 12px; font-size: 16px; background: #f9f9f9; }
.input-field:focus { border-color: var(--red); outline: none; background: white; }
textarea.input-field { min-height: 100px; resize: vertical; }
.btn { width: 100%; padding: 15px; border: none; border-radius: 12px; font-size: 16px; font-weight: bold; cursor: pointer; text-transform: uppercase; margin-bottom: 10px; display: block; }
.btn-christmas { background: var(--red); color: white; box-shadow: 0 4px 0 #8b0000; }
.btn-secondary { background: var(--green); color: white; box-shadow: 0 4px 0 #004d00; }
.btn-warning { background: orange; color: white; box-shadow: 0 4px 0 #cc8400; }
.btn-danger { background: #800000; color: white; box-shadow: 0 4px 0 #500000; }
.btn-link { background: none; color: var(--red); text-decoration: underline; font-size: 14px; padding: 10px; margin: 0 auto; box-shadow: none; text-align: center; }
.budget-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.budget-option { padding: 15px 5px; background: #fff; border: 2px solid var(--green); border-radius: 10px; color: var(--green); font-weight: bold; font-size: 18px; cursor: pointer; width: 100%; }
.budget-option:hover, .budget-option.active { background: var(--green); color: white; }

/* === EXTRAS === */
.install-box { background: #fff8e1; border: 2px dashed var(--gold); padding: 15px; border-radius: 15px; margin: 20px; text-align: center; }
.install-instructions { font-size: 14px; text-align: left; margin-top: 10px; background: white; padding: 10px; border-radius: 8px; }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--dark); padding: 15px 30px; border-radius: 50px; box-shadow: 0 5px 20px rgba(0,0,0,0.3); font-weight: bold; z-index: 10000; display: none; width: 90%; max-width: 400px; text-align: center; border: 2px solid white; }
.video-intro { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 9999; display: flex; justify-content: center; align-items: center; }
.video-intro.hidden { display: none; }
.video-intro video { width: 100%; height: 100%; object-fit: cover; }
.audio-btn {
    position: absolute;
    /* Era top: 50%; lo cambiamo per metterlo in basso */
    bottom: 50px; 
    left: 30%;
    /* Centriamo solo orizzontalmente */
    transform: translateX(-50%); 
    background: rgba(196, 30, 58, 0.9);
    color: white;
    padding: 15px 10px; /* Un po' più compatto */
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    border: 3px solid var(--gold);
    cursor: pointer;
    z-index: 10000;
    animation: pulse 2s infinite;
    width: max-content; /* Si adatta al testo */
}
.skip-btn { position: absolute; top: 20px; right: 20px; background: transparent; color: white; border: 1px solid white; padding: 8px 15px; border-radius: 20px; z-index: 10001; }
.snowflake { position: fixed; top: -10%; color: #FFF; font-size: 1.5em; animation: fall linear infinite; z-index: 50; }
@keyframes fall { to { transform: translateY(100vh); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#assignmentCard { border: 3px solid var(--gold); background: #fffbe6; }