body {
    font-family: 'Sniglet', cursive;
    font-size: 16px;
    background-color: #f5f5dc; /* NOVO: Bege para o fundo */
    color: #5d4037; /* NOVO: Marrom escuro para texto principal */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    margin: 0;
    padding-top: 20px;
    padding-bottom: 20px;
    box-sizing: border-box;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 90%;
    max-width: 400px;
    padding: 20px;
    background-color: #ffe0b2; /* NOVO: Laranja pêssego claro */
    background-image: url('../images/fundo5.png'); /* Mantenha ou altere seu fundo */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 3px solid #a1887f; /* NOVO: Marrom acinzentado para borda */
    box-shadow: 0 0 0 3px #d7ccc8, 0 0 15px rgba(0,0,0,0.2) inset; /* NOVO: Sombras mais claras */
    border-radius: 15px;
}

#character-area {
    position: relative;
    /* margin-bottom: 20px; */
    width: 200px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 10%;
    /* background-color: rgba(0,0,0,0.1); /* Fundo sutil se desejar */
    /* border: 2px dashed #7f8c8d; */
}

#character {
    width: 200px;
    height: auto;
    max-height: calc(100vh - 300px); /* Ajustado para mais espaço */
    object-fit: contain;
    display: block;
}

#sparkle-effect {
    position: absolute;
    top: 70%; /* Ajustado para melhor centralização vertical */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
    max-block-size: 400px;
}

.hidden {
    display: none !important;
}

#clock, #coins {
    position: absolute;
    top: 15px;
    font-size: 18px;
    color: #332715; /* NOVO: Laranja vibrante para destaque */
    background-color: rgba(255, 240, 199, 0.8); /* NOVO: Fundo amarelo pálido semi-transparente */
    padding: 5px 10px;
    border: 2px solid #453113; /* NOVO: Laranja vibrante */
    border-radius: 15px;
    text-shadow: 1px 1px #fff0c7; /* NOVO: Sombra de texto clara */
    display: flex; /* Adicionado para alinhar imagem e texto */
    align-items: center; /* Adicionado para alinhar verticalmente */
}

/* Estilo para o ícone da moeda */
.coin-icon {
    width: 20px; /* Ajuste o tamanho conforme necessário */
    height: 20px; /* Ajuste o tamanho conforme necessário */
    margin-right: 5px; /* Espaço entre a imagem e o número */
}

#coins-value {
    /* Estilos adicionais para o valor, se necessário */
}

#clock {
    left: 15px;
}

#coins {
    right: 15px;
}

.carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 10px;
    background-color: #fff0c7; /* NOVO: Amarelo pálido */
    border: 2px solid #a1887f; /* NOVO: Marrom acinzentado */
    border-radius: 15px;
}

.carousel-arrow {
    font-family: inherit;
    background-color: #ff9800; /* NOVO: Laranja vibrante */
    border: 2px solid #5d4037; /* NOVO: Marrom escuro para borda do botão */
    color: #5d4037; /* NOVO: Marrom escuro para texto do botão */
    font-size: 18px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 15px;
    margin: 0 10px;
    user-select: none;
    box-shadow: 2px 2px #a1887f; /* NOVO: Sombra marrom acinzentado */
}

.carousel-arrow:hover {
    background-color: #f57c00; /* NOVO: Laranja mais escuro no hover */
}

.carousel-arrow:active {
    box-shadow: 1px 1px #a1887f;
    transform: translate(1px, 1px);
}

.carousel-arrow:disabled {
    background-color: #d7ccc8; /* NOVO: Cinza bege para desabilitado */
    color: #a1887f; /* NOVO: Marrom acinzentado claro */
    cursor: not-allowed;
    box-shadow: none;
}

#hat-menu {
    display: flex;
    justify-content: flex-start;
    width: 210px;
    overflow: hidden;
    scroll-behavior: smooth;
    position: relative;
    padding: 10px 5px;
    background-color: #ffe0b2; /* NOVO: Laranja pêssego claro */
    border: 2px inset #a1887f; /* NOVO: Borda interna marrom acinzentado */
    border-radius: 15px;
}

.hat {
    width: 50px;
    height: 50px;
    margin: 0 8px;
    cursor: pointer;
    transition: transform 0.15s ease-in-out, z-index 0s linear 0.15s;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #a1887f; /* NOVO: Borda marrom acinzentado */
    background-color: #fff0c7; /* NOVO: Fundo amarelo pálido */
    border-radius: 15px;
    z-index: 1;
    box-shadow: 2px 2px #a1887f; /* NOVO: Sombra marrom acinzentado */
}

.hat:hover {
    transform: scale(1.15);
    z-index: 10;
    border-color: #ff9800; /* NOVO: Laranja vibrante no hover */
    transition-delay: 0s, 0s;
}

.hat:active {
    box-shadow: 1px 1px #a1887f;
    transform: scale(1.1) translate(1px, 1px);
}

.hat img {
    display: block;
    max-width: 90%; /* Deixa um pequeno respiro da borda */
    max-height: 90%;
    height: auto;
    transition: filter 0.2s ease-in-out;
}

/* Overlay e texto para chapéus NÃO comprados */
.hat:not(.purchased)::before {
    content: attr(data-price) "\A BUY";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(93, 64, 55, 0.75); /* NOVO: Marrom escuro semi-transparente */
    color: #ffe0b2; /* NOVO: Laranja pêssego claro para texto */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 12px;
    font-weight: normal;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
    white-space: pre-line;
    box-sizing: border-box;
    line-height: 1.3;
    z-index: 1;
    border-radius: 15px;
    text-shadow: 1px 1px rgba(255, 255, 255, 0.3); /* NOVO: Sombra de texto clara */
}

.hat:not(.purchased):hover img {
    filter: brightness(0.6) blur(1px); /* Ajuste o brilho para o novo tema */
}

.hat:not(.purchased):hover::before {
    opacity: 1;
}

.hat.purchased {
    border-color: #cfdffb; /* NOVO: Verde claro */
    background-color: #b7cdf5; /* NOVO: Verde mais pálido */
}

#confirmation-menu {
    display: none;
    position: fixed;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffe0b2; /* NOVO: Laranja pêssego claro */
    border: 3px solid #a1887f; /* NOVO: Marrom acinzentado */
    padding: 25px;
    z-index: 1000;
    text-align: center;
    border-radius: 5px;
    width: 250px;
}

#confirmation-menu p {
    margin: 10px 0 15px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #5d4037; /* NOVO: Marrom escuro para texto */
}

#confirmation-menu #confirmation-coins {
    color: #f57c00; /* NOVO: Laranja mais escuro */
    font-size: 13px;
    margin-bottom: 20px;
}

#confirmation-menu button {
    font-family: inherit;
    margin: 5px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 3px;
    color: #ffffff; /* Texto branco para melhor contraste em botões coloridos */
    border: 2px solid transparent; /* Borda transparente, cor vem do fundo */
    box-shadow: 2px 2px #a1887f;
    transition: all 0.1s ease;
}

#confirmation-menu button#buy-button {
    background-color: #81c784; /* NOVO: Verde claro */
    border-color: #5a925e; /* Borda um pouco mais escura para o botão */
}
#confirmation-menu button#buy-button:hover {
    background-color: #66bb6a; /* NOVO: Verde um pouco mais escuro */
}

#confirmation-menu button#cancel-button {
    background-color: #ff8a65; /* NOVO: Laranja avermelhado claro */
    border-color: #c75b39; /* Borda um pouco mais escura para o botão */
}
#confirmation-menu button#cancel-button:hover {
    background-color: #ff7043; /* NOVO: Laranja avermelhado */
}

#confirmation-menu button:active {
    box-shadow: 1px 1px #000000;
    transform: translate(1px, 1px);
}

#insufficient-funds {
    color: #d32f2f; /* Vermelho mais padrão para erro */
    font-size: 11px;
    margin-top: 10px;
    text-shadow: 1px 1px #ffe0b2; /* Sombra clara */
}