/* ============================================================
   vogais-v2 / game.css — Mobile-First  (redesign colorido)
   ============================================================ */

/* ---- Botão tela cheia ---------------------------------------- */
.btn-fullscreen {
    display: block;
    margin: 0 0 10px auto;
    background: rgba(94,79,162,0.1);
    border: 2px solid #b39ddb;
    border-radius: 10px;
    padding: 5px 12px;
    font-size: 18px;
    cursor: pointer;
    color: #5e4fa2;
    transition: background 0.2s, transform 0.15s;
    line-height: 1;
}

.btn-fullscreen:hover {
    background: rgba(94,79,162,0.2);
    transform: scale(1.1);
}

/* Modo tela cheia — gameWrapper ocupa todo o viewport */
#gameWrapper:fullscreen,
#gameWrapper:-webkit-full-screen,
#gameWrapper:-moz-full-screen,
#gameWrapper:-ms-fullscreen {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

#gameWrapper:fullscreen #gameArea,
#gameWrapper:-webkit-full-screen #gameArea,
#gameWrapper:-moz-full-screen #gameArea,
#gameWrapper:-ms-fullscreen #gameArea {
    width: 100%;
    max-width: 600px;
}

/* ---- Wrapper com fundo festivo ----------------------------- */
#gameWrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 10px 24px;
    font-family: var(--font-primary, 'Fredoka', sans-serif);
    background: linear-gradient(160deg, #fff9f0 0%, #f3eeff 60%, #e8f4ff 100%);
    border-radius: 24px;
    box-shadow: 0 6px 28px rgba(0,0,0,0.08);
}

/* ---- Título interno ---------------------------------------- */
.game-main-title {
    font-size: 26px;
    color: #5e4fa2;
    text-align: center;
    margin: 0 0 4px;
}

/* ---- Progress dots ----------------------------------------- */
.progress-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.progress-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ddd;
    transition: background 0.3s, transform 0.35s cubic-bezier(.34,1.56,.64,1);
}

.progress-dot.done   { background: #40c057; }
.progress-dot.active { background: #5e4fa2; transform: scale(1.5); box-shadow: 0 0 0 4px rgba(94,79,162,.2); }

/* ---- Área da pergunta -------------------------------------- */
.question-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

/* ---- Caixa do emoji --------------------------------------- */
.image-box {
    background: #fff;
    border-radius: 24px;
    padding: 16px 24px 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 155px;
    animation: dropIn 0.38s cubic-bezier(.34,1.56,.64,1);
}

@keyframes dropIn {
    from { opacity: 0; transform: scale(0.6) translateY(-20px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Emoji grande */
.game-emoji {
    font-size: 80px;
    line-height: 1;
    display: block;
    margin: 0 auto;
    animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.07); }
}

#imgLabel {
    margin: 10px 0 0;
    font-size: 22px;
    font-weight: 700;
    color: #333;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

#imgLabel .first-letter {
    font-size: 28px;
    font-weight: 900;
    color: #5e4fa2;
}

/* ---- Drop Zone -------------------------------------------- */
#dropZone {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    border: 3px dashed #b39ddb;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    font-weight: 700;
    cursor: default;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#dropZone .drop-hint {
    font-size: 42px;
    color: #b39ddb;
    animation: floatHint 1.8s ease-in-out infinite;
}

@keyframes floatHint {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

#dropZone.drag-over {
    border-color: #5e4fa2;
    background: #ede7f6;
    transform: scale(1.1);
    border-style: solid;
}

#dropZone.correct-zone {
    border-color: #40c057;
    border-style: solid;
    background: #ebfbee;
    animation: popBig 0.4s cubic-bezier(.34,1.56,.64,1);
}

#dropZone.wrong-zone {
    border-color: #fa5252;
    border-style: solid;
    background: #fff5f5;
    animation: shake 0.4s ease;
}

.drop-letter       { font-size: 58px; font-weight: 900; line-height: 1; }
.correct-letter    { color: #2f9e44; }
.wrong-letter      { color: #e03131; }

@keyframes popBig {
    0%   { transform: scale(0.5); }
    70%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%     { transform: translateX(-8px); }
    40%     { transform: translateX(8px); }
    60%     { transform: translateX(-6px); }
    80%     { transform: translateX(6px); }
}

/* ---- Painel de vogais (cada uma com cor própria) ----------- */
#vowelPanel {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 0;
}

.vowel-tile {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    color: #fff;
    font-size: 30px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s, filter 0.15s;
    box-shadow: 0 5px 14px rgba(0,0,0,0.22);
    min-width: 44px;
    min-height: 44px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

/* Cor individual por vogal */
.vowel-tile[data-letter="A"] { background: linear-gradient(145deg, #ff6b6b, #c92a2a); }
.vowel-tile[data-letter="E"] { background: linear-gradient(145deg, #51cf66, #1e7a34); }
.vowel-tile[data-letter="I"] { background: linear-gradient(145deg, #ffd43b, #e67700); color: #333; text-shadow: none; }
.vowel-tile[data-letter="O"] { background: linear-gradient(145deg, #339af0, #1864ab); }
.vowel-tile[data-letter="U"] { background: linear-gradient(145deg, #cc5de8, #862e9c); }

.vowel-tile:hover { transform: translateY(-4px) scale(1.1); }

.vowel-tile:active,
.vowel-tile.dragging {
    cursor: grabbing;
    transform: scale(1.18) translateY(-6px);
    box-shadow: 0 10px 26px rgba(0,0,0,0.35);
}

.vowel-tile.tile-correct { filter: brightness(1.15); transform: scale(1.12); }
.vowel-tile.tile-wrong   { animation: shake 0.4s ease; filter: brightness(0.85); }

/* ---- Feedback de texto ------------------------------------ */
.feedback-msg {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    min-height: 30px;
    margin-top: 6px;
    animation: fadeIn 0.25s ease;
}

.feedback-correct { color: #2f9e44; }
.feedback-wrong   { color: #e03131; }

/* ---- Instrução -------------------------------------------- */
.game-instruction {
    text-align: center;
    font-size: 15px;
    color: #6b5e8a;
    margin-bottom: 16px;
    line-height: 1.5;
    background: rgba(255,255,255,0.65);
    border-radius: 12px;
    padding: 8px 14px;
}

/* ---- Confete ---------------------------------------------- */
#confettiContainer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    opacity: 0;
    animation: confettiFall 1.1s ease-out forwards;
}

@keyframes confettiFall {
    0%  { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
    80% { opacity: 1; }
    100%{ opacity: 0; transform: translateY(220px) rotate(720deg) scale(0.4); }
}

/* ---- Tela de vitória -------------------------------------- */
#victoryScreen {
    position: relative;
    text-align: center;
    padding: 28px 16px 20px;
    max-width: 400px;
    margin: 0 auto;
    animation: fadeIn 0.45s ease;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(160deg, #fffbf0, #f3eeff);
}

.victory-trophy {
    font-size: 64px;
    display: block;
    animation: trophyBounce 0.7s cubic-bezier(.34,1.56,.64,1);
}

@keyframes trophyBounce {
    0%   { transform: scale(0) rotate(-15deg); }
    70%  { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1)   rotate(0deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

#victoryScreen h2 {
    font-size: 26px;
    color: #5e4fa2;
    margin: 10px 0 6px;
}

#starsRow {
    font-size: 42px;
    display: block;
    margin: 6px 0;
    letter-spacing: 8px;
    animation: starsIn 0.5s 0.3s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes starsIn {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.victory-stat {
    font-size: 16px;
    color: #555;
    margin: 8px 0 4px;
}

#pointsMsg {
    font-size: 17px;
    font-weight: 700;
    color: #5e4fa2;
    margin: 6px 0 14px;
}

.btn-play-again {
    display: inline-block;
    padding: 14px 44px;
    background: linear-gradient(135deg, #ff6b6b, #cc5de8);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
    transition: transform 0.15s, box-shadow 0.15s;
    letter-spacing: 0.5px;
}

.btn-play-again:hover,
.btn-play-again:focus {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
    outline: none;
}

/* ---- Responsivo: tablet / desktop ------------------------- */
@media (min-width: 480px) {
    .game-main-title { font-size: 30px; }

    .question-area {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 24px;
    }

    .game-emoji { font-size: 100px; }
    #imgLabel   { font-size: 24px; }
    #imgLabel .first-letter { font-size: 32px; }

    #dropZone   { width: 130px; height: 130px; }
    .drop-letter { font-size: 68px; }
    #dropZone .drop-hint { font-size: 50px; }

    .vowel-tile { width: 68px; height: 68px; font-size: 34px; }
    #vowelPanel { gap: 12px; }
}

@media (min-width: 640px) {
    .game-emoji   { font-size: 120px; }
    #dropZone     { width: 150px; height: 150px; }
    .drop-letter  { font-size: 78px; }
    .vowel-tile   { width: 80px; height: 80px; font-size: 42px; }
    #vowelPanel   { gap: 16px; }
    .feedback-msg { font-size: 23px; }
}
