body {
    /* Fundo azul céu com efeito de pontilhismo de HQ (halftone) */
    background-color: #87CEEB;
    background-image: radial-gradient(#ffffff33 15%, transparent 16%), radial-gradient(#ffffff33 15%, transparent 16%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    font-family: 'Comic Sans MS', 'Comic Neue', cursive;
    color: #333;
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* --- CABEÇALHO --- */
header {
    background-color: #ff3366; /* Cor de fundo vibrante */
    background-image: repeating-conic-gradient(#ff3366 0 15deg, #ff4d79 15deg 30deg); /* Efeito de explosão (starburst) HQ */
    border: 8px solid #000;
    border-radius: 15px;
    padding: 50px 20px 40px 20px;
    box-shadow: 12px 12px 0px #000; /* Sombra dura de quadrinhos */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden; /* Mantém a explosão contida na caixa */
}

.header-logo {
    z-index: 2; /* Fica acima do fundo animado */
}

.header-logo img {
    max-width: 600px; /* Logo muito maior e em extremo destaque */
    width: 100%;
    height: auto;
    filter: drop-shadow(8px 8px 0px rgba(0, 0, 0, 0.9)); /* Sombra reforçada */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efeito de mola ao passar o mouse */
}

.header-logo img:hover {
    transform: scale(1.1) rotate(3deg);
}

.subtitle {
    font-size: 1.4rem; /* Subtítulo menor */
    color: #fff;
    background: #000;
    padding: 5px 20px;
    border-radius: 25px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 4px #000; /* Estilo de selo/etiqueta */
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: -10px 0 15px 0;
    z-index: 2;
    transform: rotate(-2deg); /* Leve inclinação para dinâmica */
}

.header-text {
    background: #FFF9C4; /* Estilo de caixa de narração de HQ (amarelo claro clássico) */
    border: 4px solid #000;
    padding: 15px 25px;
    box-shadow: 6px 6px 0px #000;
    max-width: 700px;
    position: relative;
    z-index: 2;
    transform: rotate(1deg);
}

.sinopse {
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: bold;
    margin: 0;
    text-align: center;
    color: #000;
}

/* --- MASCOTE FLUTUANTE --- */
.mascote-cacau {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 150px;
    z-index: 1000;
    animation: flutuar 3s ease-in-out infinite;
    filter: drop-shadow(5px 5px 0px rgba(0, 0, 0, 0.3));
    cursor: pointer;
}

@keyframes flutuar {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(3deg);
    }
}

/* --- FLIPBOOK --- */
.flipbook-section {
    border: 8px solid #000;
    background: white;
    padding: 10px;
    border-radius: 10px;
    transform: rotate(1deg);
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.8);
    margin-bottom: 40px;
}

/* --- ESTILOS DAS ATIVIDADES --- */
.atividades-section {
    background-color: #f9f9f9;
    border: 5px solid #000;
    border-radius: 15px;
    box-shadow: 10px 10px 0px #CC0000;
    padding: 30px;
    margin-bottom: 40px;
}

.atividades-section h2 {
    font-size: 2.2rem;
    text-transform: uppercase;
    text-align: center;
    -webkit-text-stroke: 1px black;
    color: #FFD700;
    text-shadow: 3px 3px 0px #000;
    margin-top: 0;
}

.atividade-card {
    background: #fff;
    border: 4px solid #000;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 5px 5px 0px #000;
}

.atividade-card h3 {
    background: #000;
    color: #fff;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 5px;
    margin-top: -35px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px #000;
}

/* --- CRUZADINHA --- */
.cw-dicas {
    display: flex;
    justify-content: space-around;
    text-align: left;
    margin-bottom: 20px;
    font-size: 0.95rem;
    background: #eef9ff;
    padding: 15px;
    border: 2px dashed #000;
    border-radius: 8px;
}

.cw-grid {
    display: grid;
    grid-template-columns: repeat(12, 38px);
    grid-template-rows: repeat(13, 38px);
    gap: 0;
    justify-content: center;
    margin: 30px auto;
    background: transparent;
    width: max-content;
    position: relative;
}

.cw-cell {
    width: 38px;
    height: 38px;
    position: relative;
}

.cw-input-container {
    width: 100%;
    height: 100%;
    position: relative;
    border: 2px solid #000;
    background: #fff;
    border-radius: 6px;
}

.cw-numero {
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 0.70rem;
    font-weight: bold;
    color: #000;
    background: #fff;
    border: 2px solid #000;
    border-radius: 4px;
    padding: 0 3px;
    z-index: 5;
    white-space: nowrap;
}

.cw-input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 1.3rem;
    font-family: 'Comic Sans MS', cursive;
    text-transform: uppercase;
    background: transparent;
    outline: none;
    padding: 0;
    border-radius: 4px;
}

.cw-input:focus {
    background: #FFD700;
}

.cw-input.correct {
    background: #90EE90;
    color: #006400;
    font-weight: bold;
    pointer-events: none;
}

.cw-input.wrong {
    background: #FFB6C1;
    color: #8B0000;
}

.cw-black-box {
    width: 100%;
    height: 100%;
    background-color: #000;
    border: 2px solid #000;
    border-radius: 6px;
}

/* --- CAÇA-PALAVRAS --- */
.caca-palavras-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin: 20px 0;
}

.ws-grid-12x20 {
    display: grid;
    grid-template-columns: repeat(20, 32px);
    gap: 2px;
    background: #000;
    padding: 4px;
    border: 4px solid #000;
    border-radius: 8px;
}

.ws-cell {
    width: 32px;
    height: 32px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
}

.ws-cell:hover {
    background: #ffeaa7;
}

.ws-cell.selected {
    background: #FFD700;
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.ws-cell.found {
    background: #90EE90;
    color: #000;
    pointer-events: none;
    border: 2px solid #006400;
}

#wordsearch-list {
    list-style: none;
    padding: 0;
    font-size: 1.1rem;
    background: #fff9e6;
    border: 2px dashed #000;
    padding: 15px;
    border-radius: 8px;
}

#wordsearch-list li {
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

#wordsearch-list li::before {
    content: "☆";
    position: absolute;
    left: 0;
    color: #FFD700;
    text-shadow: 1px 1px 0 #000;
}

#wordsearch-list li.found {
    text-decoration: line-through;
    color: green;
    font-weight: bold;
}

#wordsearch-list li.found::before {
    content: "★";
    color: green;
}

/* BOTOES GERAIS */
.btn-hq {
    background: #CC0000;
    color: #fff;
    border: 4px solid #000;
    padding: 10px 25px;
    font-family: inherit;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 4px 4px 0px #000;
    display: block;
    margin: 0 auto;
    transition: all 0.1s;
}

.btn-hq:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

.btn-hq:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px #000;
}

.msg-sucesso {
    color: green;
    font-weight: bold;
    font-size: 1.3rem;
    text-align: center;
    margin-top: 15px;
    background: #e0ffe0;
    border: 2px solid green;
    padding: 10px;
    border-radius: 8px;
}

/* --- RODAPÉ --- */
footer {
    text-align: center;
    font-weight: bold;
    padding: 20px;
    background: #fff;
    border: 4px solid #000;
    border-radius: 10px;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 768px) {
    header {
        padding: 40px 15px;
    }

    .header-logo img {
        max-width: 95%;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .cw-dicas {
        flex-direction: column;
        gap: 15px;
    }

    .cw-grid {
        max-width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        margin: 15px 0;
    }

    .caca-palavras-container {
        flex-direction: column;
        align-items: center;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .ws-grid-12x20 {
        min-width: max-content;
    }

    .mascote-cacau {
        width: 100px;
        bottom: 10px;
        right: 10px;
    }

    .flipbook-section iframe {
        height: 400px !important;
    }
}