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

body {
    font-family: 'Comic Sans MS', cursive;
    background-image: url('../assets/game2-assets/background.png');
    background-size: cover;
    background-attachment: fixed; /* Garante que o fundo cubra a tela e não role */
    background-repeat: no-repeat;
    background-position: center;
    color: #f8f8f2;
    min-height: 100vh;
    overflow-x: hidden;
}

#btn-return-topleft {
    position: fixed;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    z-index: 1000;
    font-weight: bold;
    transition: background 0.3s;
}

#btn-return-topleft:hover {
    background: rgba(0,0,0,0.9);
}

#btn-return-topleft:active {
    transform: scale(0.98);
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.text-section {
    backdrop-filter: blur(10px);
    background: rgba(210, 190, 160, 0.55); /* Tom de papel machê mais escuro com mais transparência */
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.story-text {
    font-size: 1.5rem; /* Levemente reduzido para acomodar imagens */
    line-height: 1.6;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    font-weight: 300;
    margin-bottom: 20px;
    color: #fff;
    white-space: pre-wrap;
}

/* NOVO: Classe para a imagem dentro do texto */
.scene-inline-img {
    max-width: 100%;
    height: auto;
    max-height: 400px; /* Limita a altura para não empurrar os botões para fora da tela */
    object-fit: contain;
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.choices-section {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 40px;
}

.choice-btn {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    padding: 20px 30px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    color: #fff;
    font-family: 'Comic Sans MS', cursive;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.choice-btn::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;
}

.choice-btn:hover::before {
    left: 100%;
}

.choice-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

.stats-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    z-index: 1000;
}

.stat-item {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.stat-value {
    font-weight: bold;
    color: #667eea;
}

.restart-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 15px 25px;
    background: rgba(255, 100, 100, 0.2);
    border: 2px solid rgba(255, 100, 100, 0.5);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 1000;
}

.restart-btn:hover {
    background: rgba(255, 100, 100, 0.4);
    transform: scale(1.05);
}

.ending {
    text-align: center;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 20px;
    width: 100%;
    backdrop-filter: blur(10px);
    background: rgba(210, 190, 160, 0.863);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.5rem;
    text-align: center;
    z-index: 1000;
}

@media (max-width: 1024px) {
    .game-container { padding: 15px; }
    .text-section { padding: 30px; }
    .story-text { font-size: 1.4rem; }
    .choice-btn { min-width: 250px; max-width: 300px; font-size: 1rem; }
    .scene-inline-img { max-height: 350px; }
}

@media (max-width: 768px) {
    .game-container { padding: 10px; }
    .text-section { padding: 25px; }
    .story-text { font-size: 1.2rem; }
    .choice-btn { min-width: 100%; max-width: none; font-size: 1rem; padding: 15px 20px; }
    .scene-inline-img { max-height: 300px; }
    .stats-panel { position: static; margin-bottom: 20px; }
    .restart-btn { position: static; margin: 20px auto; display: block; }
}

@media (max-width: 480px) {
    .game-container { padding: 5px; }
    .text-section { padding: 20px; margin-bottom: 20px; }
    .story-text { font-size: 1rem; line-height: 1.4; letter-spacing: 1px; }
    .choice-btn { padding: 12px 15px; font-size: 0.9rem; }
    .scene-inline-img { max-height: 250px; }
    .choices-section { gap: 10px; }
    .message { font-size: 1.2rem; padding: 15px; }
}
