:root { 
    --pine: #0F4331; 
    --cranberry: #A3273A; 
    --bg-dark: #0a1f15;
    --card: #FFFFFF; 
    --text: #181A22; 
}

* { 
    box-sizing: border-box; 
    font-family: "Work Sans", sans-serif; 
}

body { 
    margin: 0; 
    background: linear-gradient(to bottom, #071711, #133a28); 
    color: var(--text); 
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- LUZES E NEVE --- */
.lights {
    height: 12px; 
    width: 100%;
    background: repeating-linear-gradient(
      90deg,
      #A3273A 0 5px, transparent 5px 30px,
      #C9A046 30px 35px, transparent 35px 60px,
      #0F4331 60px 65px, transparent 65px 90px
    );
    opacity: 0.9;
    animation: twinkle 1.5s ease-in-out infinite alternate;
}

@keyframes twinkle { 
    0% { opacity: 0.6; filter: brightness(1); } 
    100% { opacity: 1; filter: brightness(1.5); } 
}

.snow-container {
    position: fixed; 
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    pointer-events: none; z-index: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white" opacity="0.8"/></svg>') repeat;
    background-size: 50px 50px;
    animation: snowfall 15s linear infinite;
}

@keyframes snowfall {
    0% { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 500px 1000px, 400px 400px, 300px 300px; }
}

/* --- CABEÇALHO --- */
header.top { 
    background: var(--card); 
    border-bottom: 3px solid var(--cranberry); 
    position: relative; z-index: 2; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.top-inner { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 10px 20px; max-width: 1000px; margin: 0 auto; flex-wrap: wrap; gap: 10px;
}

.top-inner h2 { color: var(--cranberry); margin: 0; }

.company-logo { max-height: 40px; border-radius: 4px; object-fit: contain; }

.music-toggle {
    background: #E9F2EC; color: var(--pine); border: 1px solid var(--pine);
    padding: 6px 12px; border-radius: 20px; cursor: pointer; font-size: 13px; font-weight: bold; transition: 0.3s;
}
.music-toggle.playing { background: var(--cranberry); color: white; border-color: var(--cranberry); }

nav.tabs { 
    display: flex; gap: 10px; max-width: 1000px; margin: 0 auto; 
    padding: 0 20px; overflow-x: auto; position: relative; z-index: 2;
}
nav.tabs button { 
    background: none; border: none; padding: 12px 10px; cursor: pointer; 
    font-size: 15px; border-bottom: 3px solid transparent; color: #555; font-weight: 600;
}
nav.tabs button.active { border-color: var(--cranberry); color: var(--cranberry); }

/* --- CONTEÚDO PRINCIPAL --- */
.wrap { max-width: 1000px; margin: 30px auto; padding: 0 20px; position: relative; z-index: 2; }
.view { display: none; }
.view.active { display: block; animation: slideUp 0.4s ease-out; }
@keyframes slideUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* --- CARDS E ELEMENTOS FESTIVOS --- */
.card { background: var(--card); padding: 25px; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); border-top: 4px solid var(--pine); }
.hero { background: var(--cranberry); color: white; padding: 35px; border-radius: 12px; margin-bottom: 25px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); border: 2px solid #C9A046; }
.hero h1 { margin-top: 0; }
.santa-card { background: #FBF3E1; border: 2px dashed #C9A046; padding: 20px; border-radius: 12px; font-size: 18px; margin-bottom: 20px; display: flex; align-items: center; gap: 15px; }
.festive-title { color: var(--cranberry); margin-top: 0; border-bottom: 2px solid #eee; padding-bottom: 10px; }

/* --- GRID E TRAVA DE LAYOUT --- */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media(max-width: 768px) { .home-grid { grid-template-columns: 1fr; } }
.home-col { display: flex; flex-direction: column; min-width: 0; }

/* --- PARTICIPANTES --- */
.participants-scroll { display: flex; flex-direction: column; gap: 15px; max-height: 400px; overflow-y: auto; padding-right: 5px; }
.p-card-mini { display: flex; flex-direction: column; text-align: left; background: #f9f9f9; padding: 12px; border-radius: 8px; border-left: 4px solid var(--pine); min-width: 0; width: 100%; overflow-x: hidden; }
.p-card-mini-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-weight: bold; font-size: 15px; color: var(--pine); }

.avatar-img { 
    width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 3px solid #C9A046; 
    background: #eee; display: flex; justify-content: center; align-items: center; font-size: 24px; color: var(--pine); font-weight: bold; flex-shrink: 0;
}
.avatar-img.default { background: var(--pine); color: white; border-color: var(--cranberry); }
.p-card-mini .avatar-img { width: 40px; height: 40px; font-size: 16px; border-width: 2px; }

/* --- LISTA DE PRESENTES --- */
.gift-list-mini { margin: 0; padding-left: 0; list-style: none; font-size: 14px; color: #444; max-height: 100px; overflow-y: auto; padding-right: 5px; }
.gift-list-mini::-webkit-scrollbar { width: 5px; }
.gift-list-mini::-webkit-scrollbar-track { background: #eaeaea; border-radius: 4px; }
.gift-list-mini::-webkit-scrollbar-thumb { background: #C9A046; border-radius: 4px; }
.gift-list-mini li { margin-bottom: 4px; border-bottom: 1px dashed #ddd; padding-bottom: 3px; }
.gift-list-mini li:last-child { border-bottom: none; }

/* --- MURAL --- */
.mural-list { flex: 1; overflow-y: auto; max-height: 350px; margin-top: 15px; padding-right: 5px; }
.msg-item { background: #f9f9f9; padding: 15px; border-radius: 8px; border-left: 4px solid var(--cranberry); margin-bottom: 12px; min-width: 0; width: 100%; overflow-x: hidden; }
.msg-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 8px; color: #555; }
.msg-meta .avatar-img { width: 35px; height: 35px; border-width: 2px; font-size: 16px; }
.msg-item p { margin: 0; font-size: 15px; }

/* --- PREVENÇÃO DE QUEBRA DE TELA (WORD-WRAP) --- */
.p-card-mini-header span, .gift-list-mini li, .msg-item p, .msg-meta b {
    word-wrap: break-word; overflow-wrap: break-word; word-break: break-word; white-space: normal;
}

/* --- FORMULÁRIOS --- */
.field { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 6px; font-size: 15px; }
.btn { background: var(--cranberry); color: white; border: none; padding: 12px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 15px; transition: 0.2s; }
.btn.secondary { background: white; color: var(--pine); border: 2px solid var(--pine); }
.btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; pointer-events: none; }
.btn.small { padding: 6px 10px; font-size: 13px; margin-right: 5px; }

.error { color: var(--cranberry); font-size: 14px; font-weight: bold; margin-top: 5px; }
.hint { color: #666; font-size: 13px; margin: 0 0 5px 0; }
.switch { background: none; border: none; color: #555; text-decoration: underline; cursor: pointer; }
.pill { background: #E9F2EC; padding: 5px 15px 5px 5px; border-radius: 30px; font-size: 14px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--pine); }
.pill .avatar-img { width: 30px; height: 30px; border-width: 1px; font-size: 14px; }
.banner { background: #FBF3E1; color: #9C7A2E; padding: 15px; border-radius: 8px; font-weight: bold; }