/* Importando uma fonte divertida que combina com o tema */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', sans-serif;
    background-color: #fdf5e6; /* Fundo creme quente */
    color: #4a2c11; /* Marrom escuro para contrastar suavemente */
}

/* Header e Bandeirinhas */
.arraial-header {
    background-color: #d35400; /* Laranja fogueira */
    color: #fff;
    text-align: center;
    padding: 60px 20px 40px 20px;
    position: relative;
    border-bottom: 8px solid #b33925;
    background-image: radial-gradient(rgba(0, 0, 0, 0.15) 15%, transparent 16%),
                      radial-gradient(rgba(0, 0, 0, 0.15) 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px; /* Padrão sutil de fundo */
}

.bandeirinhas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.bandeira {
    width: 40px;
    height: 50px;
    margin: 0 5px;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 50% 75%, 0% 100%);
}

.azul { background-color: #2980b9; }
.amarelo { background-color: #f1c40f; }
.vermelho { background-color: #c0392b; }
.verde { background-color: #27ae60; }
.laranja { background-color: #e67e22; }

.arraial-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #7f8c8d;
}

.subtitulo {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Container Principal */
.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.lista-presentes {
    background: #fff;
    border: 4px solid #f39c12; /* Borda amarela junina */
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
}

.lista-presentes h2 {
    color: #c0392b;
    font-size: 2rem;
    margin-bottom: 5px;
    text-align: center;
}

.instrucao {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-style: italic;
}

/* Grid de Presentes */
.presentes-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Escondendo o checkbox padrão */
.presente-item input[type="checkbox"] {
    display: none;
}

/* Card do Presente */
.presente-card {
    display: flex;
    align-items: center;
    background-color: #fff9f2;
    border: 2px dashed #e67e22;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.presente-card:hover {
    background-color: #ffebd6;
    transform: scale(1.01);
}

/* Checkbox Customizado (Estilo Caipira) */
.checkbox-custom {
    width: 30px;
    height: 30px;
    border: 3px solid #d35400;
    border-radius: 6px;
    margin-right: 20px;
    position: relative;
    background-color: #fff;
    flex-shrink: 0;
}

/* Status do item comprado (escondido por padrão) */
.status-comprado {
    display: none;
    font-size: 0.9rem;
    color: #27ae60;
    font-weight: bold;
    margin-top: 4px;
}

.nome-item {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a2c11;
}

/* LÓGICA DE SELEÇÃO (O "Checklist" funcionando via CSS) */

/* Quando o input está checado: muda o card */
.presente-item input[type="checkbox"]:checked + .presente-card {
    background-color: #eaedd1;
    border-color: #27ae60;
    opacity: 0.7;
}

/* Coloca o "X" ou "Check" junino dentro do quadrado */
.presente-item input[type="checkbox"]:checked + .presente-card .checkbox-custom::after {
    content: "✓";
    font-size: 22px;
    color: #27ae60;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

/* Risca o texto do presente */
.presente-item input[type="checkbox"]:checked + .presente-card .nome-item {
    text-decoration: line-through;
    color: #7f8c8d;
}

/* Mostra quem comprou */
.presente-item input[type="checkbox"]:checked + .presente-card .status-comprado {
    display: block;
}

/* Rodapé */
footer {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-size: 1rem;
}