/* ============================================
   🌙 MOONLIGHT WORLD - Tema Noite de Lua Cheia
   ============================================ */

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

html, body {
    overflow: hidden;
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(
        180deg,
        #0a0a2e 0%,
        #1a1a4e 30%,
        #2a1a3e 60%,
        #1a2a3e 100%
    );
    height: 100vh;
    width: 100vw;
    position: relative;
}

@media (hover: none) and (pointer: coarse) {
    * {
        cursor: auto;
    }
}

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.scene {
    position: relative;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

.moon {
    position: absolute;
    top: 40px;
    right: 120px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #fffde7, #fff9c4, #f0e68c);
    border-radius: 50%;
    box-shadow:
        0 0 20px #fffde7,
        0 0 40px #fff9c4aa,
        0 0 80px #f0e68c55,
        0 0 120px #f0e68c33;
    z-index: 2;
    animation: moonFloat 6s ease-in-out infinite;
}

.moon-glow {
    position: absolute;
    top: 10px;
    right: 90px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, #fffde722, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: moonFloat 6s ease-in-out infinite;
}

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

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 80px);
    padding: 20px 40px;
    gap: 40px;
    z-index: 10;
    position: relative;
}

.character-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 450px;
}

#characterCanvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border-radius: 12px;
    background: transparent;
    max-width: 100%;
    height: auto;
    margin-bottom: -120px;
}

.character-status {
    margin-top: 0;
    font-size: 12px;
    color: #ffffff;
    text-align: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, rgba(138, 130, 255, 0.4), rgba(99, 102, 241, 0.4));
    border: 2px solid rgba(196, 181, 253, 0.6);
    border-radius: 25px;
    backdrop-filter: blur(15px);
    letter-spacing: 1.5px;
    box-shadow: 
        0 0 30px rgba(138, 130, 255, 0.5),
        0 0 60px rgba(138, 130, 255, 0.3),
        inset 0 0 15px rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 10px rgba(196, 181, 253, 0.8);
    animation: statusPulse 2s ease-in-out infinite;
    position: relative;
    z-index: 20;
}

@keyframes statusPulse {
    0%, 100% { 
        box-shadow: 
            0 0 30px rgba(138, 130, 255, 0.5),
            0 0 60px rgba(138, 130, 255, 0.3),
            inset 0 0 15px rgba(255, 255, 255, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 40px rgba(138, 130, 255, 0.7),
            0 0 80px rgba(138, 130, 255, 0.4),
            inset 0 0 20px rgba(255, 255, 255, 0.15);
    }
}

.chat-area {
    flex: 1;
    max-width: 420px;
    height: 500px;
    background: rgba(10, 10, 46, 0.8);
    border: 1px solid rgba(138, 130, 255, 0.3);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow:
        0 0 30px rgba(138, 130, 255, 0.1),
        inset 0 0 30px rgba(138, 130, 255, 0.05);
}

.chat-header {
    padding: 15px 20px;
    background: rgba(138, 130, 255, 0.15);
    border-bottom: 1px solid rgba(138, 130, 255, 0.2);
    font-size: 11px;
    color: #c4b5fd;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.chat-icon {
    font-size: 18px;
    animation: robotBounce 2s ease-in-out infinite;
}

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

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(138, 130, 255, 0.3) transparent;
    min-height: 0;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(138, 130, 255, 0.3);
    border-radius: 2px;
}

.message {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message p {
    font-size: 9px;
    line-height: 1.8;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 85%;
}

.bot-message p {
    background: rgba(138, 130, 255, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(138, 130, 255, 0.2);
    border-top-left-radius: 4px;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message p {
    background: rgba(99, 222, 161, 0.15);
    color: #86efac;
    border: 1px solid rgba(99, 222, 161, 0.2);
    border-top-right-radius: 4px;
}

.msg-icon {
    font-size: 16px;
    margin-top: 5px;
}

.chat-input-area {
    padding: 12px;
    border-top: 1px solid rgba(138, 130, 255, 0.15);
    display: flex;
    gap: 8px;
    background: rgba(10, 10, 46, 0.5);
    flex-shrink: 0;
}

#commandInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(138, 130, 255, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    color: #e2e8f0;
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    outline: none;
    transition: all 0.3s ease;
    cursor: text;
}

#commandInput:focus {
    border-color: rgba(138, 130, 255, 0.6);
    box-shadow: 0 0 15px rgba(138, 130, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

#commandInput::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

#sendBtn {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    border: 1px solid rgba(138, 130, 255, 0.3);
    background: rgba(138, 130, 255, 0.2);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sendBtn:hover {
    background: rgba(138, 130, 255, 0.4);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(138, 130, 255, 0.3);
}

#sendBtn:active {
    transform: scale(0.95);
}

.ground {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(0deg, #0d1b2a, #1b2838, #162032);
    border-top: 3px solid #2a4a3a;
    z-index: 5;
    box-shadow: 0 -10px 30px rgba(42, 74, 58, 0.3);
}

.ground::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 48px,
            rgba(42, 74, 58, 0.2) 48px,
            rgba(42, 74, 58, 0.2) 50px
        );
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* ============================================
   🎵 CONTROLES DE ÁUDIO (Música + Efeitos)
   Desktop: Lado a Lado no canto inferior esquerdo
   ============================================ */

.audio-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
}

.audio-control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    width: 50px;
    height: 50px;
}

.audio-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.3);
    border: 2px solid rgba(196, 181, 253, 0.5);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 20px rgba(138, 130, 255, 0.3),
        0 0 30px rgba(138, 130, 255, 0.2);
    animation: musicPulse 3s ease-in-out infinite;
    flex-shrink: 0;
}

.audio-btn:hover {
    background: rgba(99, 102, 241, 0.5);
    transform: scale(1.1);
    box-shadow: 
        0 4px 30px rgba(138, 130, 255, 0.5),
        0 0 50px rgba(138, 130, 255, 0.3);
}

.audio-btn:active {
    transform: scale(0.95);
}

.effects-btn {
    background: rgba(99, 222, 161, 0.25);
    border-color: rgba(134, 239, 172, 0.5);
    box-shadow: 
        0 4px 20px rgba(99, 222, 161, 0.3),
        0 0 30px rgba(99, 222, 161, 0.2);
}

.effects-btn:hover {
    background: rgba(99, 222, 161, 0.4);
    box-shadow: 
        0 4px 30px rgba(99, 222, 161, 0.5),
        0 0 50px rgba(99, 222, 161, 0.3);
}

.audio-btn.muted {
    background: rgba(100, 100, 100, 0.3);
    border-color: rgba(150, 150, 150, 0.4);
    box-shadow: none;
    animation: none;
}

.audio-btn.muted .audio-icon {
    opacity: 0.5;
}

.audio-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.audio-btn.playing .audio-icon {
    animation: musicNote 2s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% {
        box-shadow: 
            0 4px 20px rgba(138, 130, 255, 0.3),
            0 0 30px rgba(138, 130, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 4px 30px rgba(138, 130, 255, 0.5),
            0 0 50px rgba(138, 130, 255, 0.4);
    }
}

@keyframes musicNote {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.audio-tooltip {
    position: absolute;
    left: 60px;
    top: 25px;
    transform: translateY(-50%);
    background: rgba(99, 102, 241, 0.4);
    color: white;
    padding: 10px 16px;
    border-radius: 20px;
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    border: 1px solid rgba(196, 181, 253, 0.5);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(138, 130, 255, 0.3);
    animation: tooltipFloat 2s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    line-height: 1;
}

.audio-tooltip.visible {
    opacity: 1;
}

@keyframes tooltipFloat {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(5px); }
}

/* ============================================
   ❓ BOTÃO DE AJUDA
   Desktop: canto inferior direito
   ============================================ */

.help-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.25);
    border: 2px solid rgba(253, 224, 71, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 20px rgba(251, 191, 36, 0.3),
        0 0 30px rgba(251, 191, 36, 0.2);
    animation: helpPulse 3s ease-in-out infinite;
}

.help-btn:hover {
    background: rgba(251, 191, 36, 0.4);
    transform: scale(1.1) rotate(10deg);
    box-shadow: 
        0 4px 30px rgba(251, 191, 36, 0.5),
        0 0 50px rgba(251, 191, 36, 0.3);
}

.help-btn:active {
    transform: scale(0.95);
}

.help-icon-canvas {
    width: 30px;
    height: 30px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

@keyframes helpPulse {
    0%, 100% {
        box-shadow: 
            0 4px 20px rgba(251, 191, 36, 0.3),
            0 0 30px rgba(251, 191, 36, 0.2);
    }
    50% {
        box-shadow: 
            0 4px 30px rgba(251, 191, 36, 0.5),
            0 0 50px rgba(251, 191, 36, 0.4);
    }
}

/* ============================================
   📜 PAINEL DE AJUDA (MODAL)
   ============================================ */

.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: overlayFadeIn 0.3s ease-out;
}

.help-overlay.visible {
    display: flex;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.help-panel {
    background: linear-gradient(135deg, rgba(10, 10, 46, 0.95), rgba(26, 26, 78, 0.95));
    border: 2px solid rgba(196, 181, 253, 0.6);
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 
        0 0 50px rgba(138, 130, 255, 0.5),
        0 0 100px rgba(138, 130, 255, 0.3);
    animation: panelSlideUp 0.4s ease-out;
}

@keyframes panelSlideUp {
    from { 
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.help-header {
    padding: 20px 25px;
    background: rgba(138, 130, 255, 0.2);
    border-bottom: 1px solid rgba(196, 181, 253, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-title {
    font-size: 14px;
    color: #fff;
    text-shadow: 0 0 10px rgba(196, 181, 253, 0.8);
    letter-spacing: 1px;
}

.help-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.2);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', cursive;
}

.help-close:hover {
    background: rgba(248, 113, 113, 0.5);
    transform: rotate(90deg) scale(1.1);
}

.help-stats {
    padding: 12px 25px;
    background: rgba(99, 222, 161, 0.1);
    border-bottom: 1px solid rgba(134, 239, 172, 0.2);
    font-size: 9px;
    color: #86efac;
    text-align: center;
    letter-spacing: 1px;
}

.help-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px;
    scrollbar-width: thin;
    scrollbar-color: rgba(196, 181, 253, 0.4) transparent;
}

.help-content::-webkit-scrollbar {
    width: 6px;
}

.help-content::-webkit-scrollbar-thumb {
    background: rgba(196, 181, 253, 0.4);
    border-radius: 3px;
}

.category-title {
    font-size: 11px;
    color: #c4b5fd;
    margin: 20px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(196, 181, 253, 0.2);
    letter-spacing: 1px;
}

.category-title:first-child {
    margin-top: 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.action-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(138, 130, 255, 0.15));
    border: 2px solid rgba(196, 181, 253, 0.3);
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: white;
    font-family: 'Press Start 2P', cursive;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(196, 181, 253, 0.8);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(138, 130, 255, 0.3));
    box-shadow: 0 8px 25px rgba(138, 130, 255, 0.4);
}

.action-card:active {
    transform: translateY(-2px) scale(1.02);
}

.action-card.question-card {
    background: linear-gradient(135deg, rgba(99, 222, 161, 0.2), rgba(134, 239, 172, 0.15));
    border-color: rgba(134, 239, 172, 0.3);
}

.action-card.question-card:hover {
    background: linear-gradient(135deg, rgba(99, 222, 161, 0.4), rgba(134, 239, 172, 0.3));
    border-color: rgba(134, 239, 172, 0.8);
    box-shadow: 0 8px 25px rgba(99, 222, 161, 0.4);
}

.action-card.egg-card {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(253, 224, 71, 0.15));
    border-color: rgba(253, 224, 71, 0.3);
}

.action-card.egg-card:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.4), rgba(253, 224, 71, 0.3));
    border-color: rgba(253, 224, 71, 0.8);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

.card-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.card-title {
    font-size: 9px;
    color: white;
    margin-bottom: 4px;
}

.card-tip {
    font-size: 6px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    margin-top: 4px;
}

.help-footer {
    padding: 15px 25px;
    background: rgba(10, 10, 46, 0.5);
    border-top: 1px solid rgba(196, 181, 253, 0.2);
    display: flex;
    gap: 10px;
    justify-content: center;
}

.surprise-btn, .tour-btn {
    padding: 12px 20px;
    border-radius: 10px;
    border: 2px solid rgba(196, 181, 253, 0.5);
    background: rgba(138, 130, 255, 0.3);
    color: white;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.surprise-btn:hover, .tour-btn:hover {
    background: rgba(138, 130, 255, 0.5);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(138, 130, 255, 0.4);
}

.tour-btn {
    background: rgba(99, 222, 161, 0.3);
    border-color: rgba(134, 239, 172, 0.5);
}

.tour-btn:hover {
    background: rgba(99, 222, 161, 0.5);
    box-shadow: 0 4px 15px rgba(99, 222, 161, 0.4);
}

/* ============================================
   📱 RESPONSIVO - TABLET (até 900px)
   ============================================ */
@media (max-width: 900px) {
    html, body {
        overflow: hidden;
    }

    .moon {
        width: 70px;
        height: 70px;
        top: 20px;
        right: 60px;
    }

    .moon-glow {
        width: 110px;
        height: 110px;
        top: 0;
        right: 40px;
    }

    .main-container {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
        height: 100vh;
        justify-content: flex-start;
        padding-top: 80px;
        overflow: hidden;
    }

    .character-area {
        max-width: 100%;
        width: 100%;
        flex: 0 0 auto;
    }

    #characterCanvas {
        width: 300px;
        height: 300px;
    }

    .chat-area {
        max-width: 500px;
        width: 100%;
        height: 350px;
        flex-shrink: 0;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   📱 RESPONSIVO - CELULAR (até 600px)
   ============================================ */
@media (max-width: 600px) {
    html, body {
        overflow: hidden;
        height: 100vh;
        height: 100dvh;
    }

    .moon {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 25px;
    }

    .moon-glow {
        width: 80px;
        height: 80px;
        top: 0;
        right: 10px;
    }

    /* Container principal ajustado para tela cheia */
    .main-container {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
        padding-top: 75px;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        justify-content: flex-start;
    }

    .character-area {
        max-width: 100%;
        width: 100%;
        flex: 0 0 auto;
    }

    #characterCanvas {
        width: 280px;
        height: 280px;
        margin-bottom: -100px;
    }

    .character-status {
        font-size: 7px;
        padding: 8px 14px;
        margin-top: 0;
    }

    /* 💬 CHAT COM ALTURA FIXA E SCROLL INTERNO */
    .chat-area {
        max-width: 100%;
        width: 100%;
        flex: 1 1 auto;
        height: auto;
        min-height: 200px;
        max-height: calc(100vh - 480px);
        max-height: calc(100dvh - 480px);
    }

    .chat-header {
        padding: 10px 15px;
        font-size: 9px;
    }

    .chat-icon {
        font-size: 14px;
    }

    .chat-messages {
        padding: 10px;
        gap: 8px;
    }

    .message p {
        font-size: 7px;
        line-height: 1.7;
        padding: 8px 12px;
    }

    .msg-icon {
        font-size: 13px;
    }

    .chat-input-area {
        padding: 8px;
        gap: 6px;
    }

    #commandInput {
        padding: 10px;
        font-size: 8px;
    }

    #sendBtn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    /* 🚫 ESCONDE O CHÃO VERDE NO CELULAR */
    .ground {
        display: none;
    }

    .chat-header span:last-child {
        font-size: 8px;
    }

    /* 🎵 ÁUDIO no celular: TOPO DIREITO */
    .audio-controls {
        top: 15px;
        right: 15px;
        bottom: auto;
        left: auto;
        flex-direction: column;
        gap: 10px;
        align-items: flex-end;
    }

    .audio-control-group {
        width: 42px;
        height: 42px;
    }

    .audio-btn {
        width: 42px;
        height: 42px;
    }

    .audio-icon {
        font-size: 16px;
    }

    .audio-tooltip {
        font-size: 6px;
        padding: 8px 12px;
        position: absolute;
        right: 55px;
        left: auto;
        top: 21px;
        transform: translateY(-50%);
    }

    .audio-control-group {
        flex-direction: row;
    }

    @keyframes tooltipFloat {
        0%, 100% { transform: translateY(-50%) translateX(0); }
        50% { transform: translateY(-50%) translateX(-5px); }
    }

    /* ❓ AJUDA no celular: TOPO ESQUERDO */
    .help-btn {
        top: 15px;
        left: 15px;
        bottom: auto;
        right: auto;
        width: 42px;
        height: 42px;
    }

    .help-icon-canvas {
        width: 26px;
        height: 26px;
    }

    /* Painel de ajuda em tela cheia no celular */
    .help-overlay {
        padding: 0;
    }

    .help-panel {
        max-height: 100vh;
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
        border: none;
    }

    .help-header {
        padding: 15px 18px;
    }

    .help-title {
        font-size: 10px;
    }

    .help-close {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    .help-stats {
        font-size: 7px;
        padding: 10px 18px;
    }

    .help-content {
        padding: 15px 18px;
    }

    .category-title {
        font-size: 9px;
        margin: 15px 0 10px 0;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .action-card {
        padding: 12px 8px;
    }

    .card-icon {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .card-title {
        font-size: 8px;
    }

    .card-tip {
        font-size: 5.5px;
    }

    .help-footer {
        padding: 12px 18px;
        flex-direction: column;
        gap: 8px;
    }

    .surprise-btn, .tour-btn {
        font-size: 8px;
        padding: 10px 15px;
        width: 100%;
    }
}

/* ============================================
   📱 RESPONSIVO - CELULAR PEQUENO (até 380px)
   ============================================ */
@media (max-width: 380px) {
    .moon {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 70px;
    }

    .moon-glow {
        width: 65px;
        height: 65px;
        top: -5px;
        right: 60px;
    }

    #characterCanvas {
        width: 240px;
        height: 240px;
        margin-bottom: -80px;
    }

    .chat-area {
        max-height: calc(100vh - 420px);
        max-height: calc(100dvh - 420px);
    }

    .character-status {
        font-size: 6px;
    }

    .message p {
        font-size: 6.5px;
    }

    #commandInput {
        font-size: 7px;
        padding: 10px;
    }

    .audio-control-group {
        width: 38px;
        height: 38px;
    }

    .audio-btn {
        width: 38px;
        height: 38px;
    }

    .audio-icon {
        font-size: 14px;
    }

    .audio-tooltip {
        top: 19px;
    }

    .help-btn {
        width: 38px;
        height: 38px;
    }

    .help-icon-canvas {
        width: 22px;
        height: 22px;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .card-icon {
        font-size: 18px;
    }

    .card-title {
        font-size: 7px;
    }
}

/* ============================================
   🔄 LANDSCAPE (celular deitado)
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .main-container {
        flex-direction: row;
        padding-top: 10px;
        padding-bottom: 10px;
        height: 100vh;
        overflow: hidden;
    }

    .character-area {
        max-width: 45%;
        flex: 0 0 auto;
    }

    .chat-area {
        max-width: 50%;
        height: 90vh;
        max-height: 90vh;
    }

    #characterCanvas {
        width: 200px;
        height: 200px;
    }

    .moon {
        width: 40px;
        height: 40px;
    }

    .ground {
        display: none;
    }
}