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

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #0a0a1a, #1a1a2e, #16213e, #0f3460);
    color: #fff;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

/* Tela de Abertura */
.opening-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.7) contrast(1.2) saturate(1.1);
}

.opening-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

.opening-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 60px 20px 80px;
    text-align: center;
}

.opening-logo {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.opening-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: bold;
    color: #ffd700;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.4),
        3px 3px 6px rgba(0, 0, 0, 0.8);
    margin-bottom: 20px;
    animation: titleGlow 3s ease-in-out infinite alternate;
    line-height: 1.1;
}

.opening-subtitle {
    font-size: clamp(1.3rem, 4vw, 2rem);
    color: #e6e6fa;
    font-style: italic;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(230, 230, 250, 0.3);
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Botão de início - Otimizado para mobile */
.start-button {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d, #6bcf7f, #4d9de0, #e15759);
    background-size: 300% 300%;
    border: none;
    border-radius: 50px;
    padding: 20px 40px;
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    animation: rainbowShift 4s ease-in-out infinite;
    border: 3px solid rgba(255, 255, 255, 0.3);
    
    /* Melhorias para touch */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    min-height: 44px;
}

.start-button:hover,
.start-button:focus {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4);
    animation-duration: 2s;
    outline: none;
}

.start-button:active,
.start-button.touching {
    transform: translateY(-2px) scale(0.95);
    transition: all 0.1s ease;
}

/* Estados específicos para mobile - botão início */
@media (hover: none) and (pointer: coarse) {
    .start-button:hover {
        transform: none;
        box-shadow: 
            0 8px 25px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(255, 255, 255, 0.2);
        animation-duration: 4s;
    }
    
    .start-button:active,
    .start-button.touching {
        transform: scale(0.95);
        background: linear-gradient(45deg, #e15759, #ff6b6b, #ffd93d, #6bcf7f, #4d9de0);
    }
}

.button-icon {
    font-size: 1.2em;
    margin: 0 10px;
    animation: sparkle 2s ease-in-out infinite alternate;
}

/* Botão do Mapa */
.map-button-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Botão do mapa - Otimizado para mobile */
.map-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #d4af37, #ffd700);
    border: 3px solid rgba(255, 255, 255, 0.3);
    font-size: 24px;
    cursor: pointer;
    box-shadow: 
        0 5px 15px rgba(212, 175, 55, 0.4),
        0 0 20px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mapPulse 3s ease-in-out infinite;
    
    /* Melhorias para touch */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
}

.map-button:hover,
.map-button:focus {
    transform: scale(1.1);
    box-shadow: 
        0 8px 25px rgba(212, 175, 55, 0.6),
        0 0 30px rgba(255, 215, 0, 0.5);
    outline: none;
}

.map-button:active,
.map-button.touching {
    transform: scale(0.95);
    box-shadow: 
        0 2px 10px rgba(212, 175, 55, 0.4),
        0 0 15px rgba(255, 215, 0, 0.3);
    transition: all 0.1s ease;
}

/* Estados específicos para mobile - botão mapa */
@media (hover: none) and (pointer: coarse) {
    .map-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .map-button:hover {
        transform: none;
        box-shadow: 
            0 5px 15px rgba(212, 175, 55, 0.4),
            0 0 20px rgba(255, 215, 0, 0.3);
    }
    
    .map-button:active,
    .map-button.touching {
        transform: scale(0.9);
        background: linear-gradient(45deg, #b8941f, #d4af37);
    }
}

/* Modal do Mapa */
.map-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.map-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

.map-modal-content {
    background: linear-gradient(135deg, #2c1810, #3d2817);
    border: 3px solid #d4af37;
    border-radius: 20px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
    position: relative;
}

.map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d4af37;
}

.map-modal-header h3 {
    color: #ffd700;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Botão de fechar mapa - Otimizado para mobile */
.close-map {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Melhorias para touch */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
}

.close-map:hover,
.close-map:focus {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    outline: none;
}

.close-map:active,
.close-map.touching {
    transform: scale(0.9);
    background: rgba(200, 0, 0, 0.9);
    transition: all 0.1s ease;
}

/* Estados específicos para mobile - botão fechar */
@media (hover: none) and (pointer: coarse) {
    .close-map {
        width: 44px;
        height: 44px;
        font-size: 18px;
        top: 15px;
        right: 15px;
    }
    
    .close-map:hover {
        transform: none;
        background: rgba(255, 0, 0, 0.8);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }
    
    .close-map:active,
    .close-map.touching {
        transform: scale(0.85);
        background: rgba(180, 0, 0, 0.9);
    }
}

.map-image-container {
    text-align: center;
}

.map-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    filter: contrast(1.2) brightness(1.1);
}

/* Telas */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 2;
}

/* Backgrounds */
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.4;
    filter: sepia(20%) saturate(1.4) brightness(0.9) contrast(1.3);
}

.clue-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    filter: blur(2px) brightness(0.8) contrast(1.2) saturate(1.1);
}

.scroll-background {
    background: linear-gradient(45deg, #2c1810, #3d2817, #4a3018);
    border: 4px solid #d4af37;
    border-radius: 20px;
    box-shadow: 
        0 0 40px rgba(212, 175, 55, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
    margin: 15px;
    padding: 35px;
    position: relative;
    overflow: hidden;
}

.scroll-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="paper" patternUnits="userSpaceOnUse" width="100" height="100"><rect width="100" height="100" fill="%23f4f1e8"/><circle cx="20" cy="20" r="1" fill="%23e8e5dc"/><circle cx="80" cy="40" r="1" fill="%23e8e5dc"/><circle cx="40" cy="80" r="1" fill="%23e8e5dc"/></pattern></defs><rect width="100" height="100" fill="url(%23paper)"/></svg>') repeat;
    opacity: 0.15;
    pointer-events: none;
}

/* Conteúdo */
.content {
    text-align: center;
    padding: 20px;
    max-width: 90%;
    position: relative;
    z-index: 3;
}

/* Títulos */
.title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 25px;
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.9),
        0 0 15px rgba(255, 255, 255, 0.3);
    font-weight: bold;
    line-height: 1.1;
    color: #fff;
}

.title.glow {
    animation: glow 2s ease-in-out infinite alternate;
    color: #ffd700;
    text-shadow: 
        0 0 15px #ffd700, 
        0 0 25px #ffd700, 
        0 0 35px #ffd700,
        3px 3px 6px rgba(0, 0, 0, 0.9);
}

.title.victory-title {
    color: #ffd700;
    font-size: clamp(2.8rem, 9vw, 4.5rem);
    animation: bounce 1s ease-in-out infinite alternate;
    text-shadow: 
        0 0 20px #ffd700, 
        0 0 30px #ffd700, 
        0 0 40px #ffd700,
        4px 4px 8px rgba(0, 0, 0, 0.9);
}

.subtitle {
    font-size: clamp(1.3rem, 3.5vw, 2rem);
    margin-bottom: 45px;
    color: #e6e6fa;
    font-style: italic;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(230, 230, 250, 0.4);
}

/* Texto da história */
.story-text {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    line-height: 1.6;
    margin-bottom: 35px;
    color: #f0f8ff;
    text-align: justify;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(240, 248, 255, 0.3);
    padding: 0 10px;
}

.story-text p {
    margin-bottom: 15px;
}

.story-text strong {
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Caixas de enigma */
.riddle-box {
    background: linear-gradient(135deg, 
        rgba(139, 69, 19, 0.95), 
        rgba(160, 82, 45, 0.95), 
        rgba(205, 133, 63, 0.95));
    border: 3px solid #ffd700;
    border-radius: 20px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 
        0 0 25px rgba(255, 215, 0, 0.5),
        inset 0 0 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.riddle-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700, #ffed4e);
    border-radius: 20px;
    z-index: -1;
    animation: sparkle 3s linear infinite;
}

.riddle-text {
    font-size: clamp(1.2rem, 3.2vw, 1.8rem);
    color: #fff;
    text-align: center;
    font-weight: bold;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.9),
        0 0 10px rgba(255, 255, 255, 0.4);
    line-height: 1.4;
}

.final-riddle {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #d4af37;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.riddle {
    font-size: clamp(1.1rem, 2.8vw, 1.4rem);
    line-height: 1.5;
    margin-bottom: 15px;
    color: #f0f8ff;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.hint {
    font-size: clamp(0.9rem, 2.2vw, 1.1rem);
    color: #ffd700;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.transition-text {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: #90ee90;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Botões mágicos */
/* Botões mágicos - Otimizado para mobile */
.magic-button {
    background: linear-gradient(135deg, #4a90e2, #357abd, #2c5aa0);
    color: white;
    border: 3px solid #ffd700;
    padding: 18px 35px;
    font-size: clamp(1.2rem, 3.5vw, 1.8rem);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(255, 215, 0, 0.3);
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 15px 10px;
    min-width: 160px;
    position: relative;
    overflow: hidden;
    
    /* Melhorias para touch */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    min-height: 44px; /* Tamanho mínimo recomendado para touch */
}

.magic-button:hover,
.magic-button:focus {
    background: linear-gradient(135deg, #5ba0f2, #4a90e2, #357abd);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(255, 215, 0, 0.5);
    border-color: #ffed4e;
    outline: none;
}

.magic-button:active,
.magic-button.touching {
    transform: translateY(-1px) scale(0.95);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 215, 0, 0.4);
    transition: all 0.1s ease;
}

/* Estados específicos para mobile */
@media (hover: none) and (pointer: coarse) {
    .magic-button:hover {
        transform: none;
        background: linear-gradient(135deg, #4a90e2, #357abd, #2c5aa0);
        box-shadow: 
            0 6px 20px rgba(0, 0, 0, 0.4),
            0 0 15px rgba(255, 215, 0, 0.3);
        border-color: #ffd700;
    }
    
    .magic-button:active,
    .magic-button.touching {
        transform: scale(0.95);
        background: linear-gradient(135deg, #357abd, #2c5aa0, #1e3a5f);
    }
}

.magic-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.magic-button:hover::before {
    left: 100%;
}

/* Celebrações */
.treasure-celebration, .victory-celebration {
    background: radial-gradient(circle, rgba(212, 175, 55, 0.2), rgba(26, 26, 46, 0.8));
    border-radius: 20px;
    padding: 40px;
    margin: 20px;
    animation: celebration 2s ease-in-out infinite alternate;
}

.artifact-icon, .treasure-chest {
    font-size: clamp(3rem, 8vw, 5rem);
    margin: 20px 0;
    animation: float 2s ease-in-out infinite;
}

.victory-text {
    font-size: clamp(1.1rem, 2.8vw, 1.4rem);
    line-height: 1.6;
    margin: 20px 0;
    color: #f0f8ff;
}

.victory-text strong {
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Créditos */
.credits {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 30px;
    font-size: clamp(1.1rem, 2.8vw, 1.4rem);
    line-height: 1.8;
}

.credits p {
    margin-bottom: 15px;
    color: #e6e6fa;
}

/* Partículas mágicas */
.magic-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.magic-particles::before,
.magic-particles::after {
    content: '✨';
    position: absolute;
    font-size: 20px;
    animation: sparkle 3s linear infinite;
}

.magic-particles::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.magic-particles::after {
    top: 60%;
    right: 15%;
    animation-delay: 1.5s;
}

/* Animações */
@keyframes glow {
    from { text-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700, 0 0 30px #ffd700; }
    to { text-shadow: 0 0 20px #ffd700, 0 0 30px #ffd700, 0 0 40px #ffd700; }
}

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

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

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

@keyframes sparkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700; }
    50% { text-shadow: 0 0 20px #ffd700, 0 0 30px #ffd700, 0 0 40px #ffd700; }
    100% { text-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700; }
}

@keyframes rainbowShift {
    0% { color: #ffd700; }
    16% { color: #ff6b6b; }
    33% { color: #4ecdc4; }
    50% { color: #45b7d1; }
    66% { color: #96ceb4; }
    83% { color: #feca57; }
    100% { color: #ffd700; }
}

/* Mapa em destaque na tela 2 */
.map-highlight {
    margin: 20px 0;
    text-align: center;
    position: relative;
}

.map-container {
    position: relative;
    display: inline-block;
    margin: 10px 0;
}

.featured-map {
    width: clamp(200px, 60vw, 300px);
    height: auto;
    border: 4px solid #ffd700;
    border-radius: 15px;
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.3),
        0 8px 25px rgba(0, 0, 0, 0.4);
    filter: brightness(1.1) contrast(1.2) saturate(1.1);
    animation: mapGlow 3s ease-in-out infinite alternate;
    transition: all 0.3s ease;
}

.featured-map:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.8),
        0 0 60px rgba(255, 215, 0, 0.4),
        0 12px 35px rgba(0, 0, 0, 0.5);
}

.map-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    border-radius: 20px;
    animation: pulseGlow 2s ease-in-out infinite;
    pointer-events: none;
}

.map-description {
    color: #ffd700;
    font-size: clamp(1rem, 3vw, 1.3rem);
    font-weight: bold;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 215, 0, 0.5);
    margin: 15px 0;
    font-style: italic;
}

@keyframes mapGlow {
    0% {
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.3),
            0 8px 25px rgba(0, 0, 0, 0.4);
    }
    100% {
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 215, 0, 0.5),
            0 8px 25px rgba(0, 0, 0, 0.4);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes mapSparkle {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) rotate(360deg) scale(0.5);
    }
}

@keyframes mapPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 215, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 215, 0, 0.5);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes speechGlow {
    0% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
    100% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }
}

@keyframes soundWave {
    0% { 
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    50% { 
        transform: scale(1.5) translateY(-20px);
        opacity: 0.7;
    }
    100% { 
        transform: scale(2) translateY(-40px);
        opacity: 0;
    }
}

/* Responsividade para celular */
@media (max-width: 480px) {
    .content {
        padding: 15px;
        max-width: 95%;
    }
    
    .scroll-background {
        margin: 10px;
        padding: 20px;
    }
    
    .story-text {
        padding: 15px;
        font-size: 1rem;
    }
    
    .riddle-box, .final-riddle {
        padding: 20px;
        margin: 15px 0;
    }
    
    .magic-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .treasure-celebration, .victory-celebration {
        padding: 25px;
        margin: 10px;
    }
}

/* Orientação paisagem em celular */
@media (max-height: 500px) and (orientation: landscape) {
    .content {
        padding: 10px;
    }
    
    .title {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .story-text {
        font-size: 0.9rem;
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .magic-button {
        padding: 10px 20px;
        font-size: 0.9rem;
        margin-top: 10px;
    }
}