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

html, body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #ffb4b6 0%, #fad0c4 100%);
    color: #333;
    height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
}

header {
    width: 100%;
    background-color: #1E4B62;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px; /* Ensure the content inside the header doesn't go too wide */
    margin: 0 auto; /* Center the content of the header */
}

.page-title {
    text-align: center;
    flex-grow: 1;
    font-size: 24px;
    margin: 0;
    color: white;
}

.menu-btn {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
}

.menu-btn.right {
    margin-left: 20px;
}

.container {
    background: #ffffff00;
    height: 100%;
    width: 100%;
    min-width: 356px;
    max-width: 356px;
    text-align: center;
    animation: fadeIn 2s ease-in-out;
    margin: 20px auto;
}

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

.instructions {
    font-size: 1em;
    color: #000000;
}

.instructions.bold {
    font-weight: bold;
}

.clue {
    display: inline-block;
    background: #ffffff;
    width: 67px;
    height: 67px;
    line-height: 67px;
    margin: 0 2px;
    border-radius: 50%;
    font-size: 2.5em;
    cursor: pointer;
}

.clue.selected {
    border: 2px solid red;
}

.clue.uncover {
    display: inline-block;
    animation: growAndShrink 1s forwards;    
}

@keyframes growAndShrink {
    0% {
        transform: scale(1);
    }
    33% {
        transform: scale(3);
    }
    66% {
        transform: scale(3);
    }
    100% {
        transform: scale(1);
    }
}

.guessArea {
    background: #83d8ff;
    border-radius: 10px;
    padding: 5px;
}

.category {
    margin: 10px 0 15px 0;
}

.category-name {
    background: #ffcc00;
    padding: 5px 10px;
    border-radius: 10px;
    font-weight: bold;
}

.word-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin: 10px 0;
}

.space {
    width: 5px;
}

.letter {
    display: inline-flex; /* Change to inline-flex */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    background: #ffffff;
    color: #000000;
    width: 25px;
    height: 25px;
    border: none;
    margin: 2px 2px;
    padding: 2px 5px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.letter.reveal {
    animation: revealAndGrow 0.5s;
}

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

.status {
    margin: 15px 0 5px 0;
}

.lives-big {
    font-size: 2em;
    margin: 0 2px;
}

.lives-normal {
    font-size: 1.5em;
    margin: 0 2px;
}

.lives-small {
    font-size: 1em;
    margin: 0 2px;
}

.heartbeat {
    margin: 0 2px;
    display: inline-block;
    animation: heartbeat infinite;
}

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

.lose-heart {
    display: inline-block;
    animation: tilt 1s;
}

@keyframes tilt {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: rotate(15deg);
    }
    20%, 40%, 60%, 80% {
        transform: rotate(-15deg);
    }
}

/* .clues .clue:hover {
    transform: scale(2);
} */

.keyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.key {
    background: #828282;
    color: #fff;
    border: none;
    padding: 7px;
    border-radius: 5px;
    width: 30px;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.key-pressed {
    background: rgba(0, 0, 0, 0.2);
}

.terminado {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background: #ffffff00;
    border-radius: 10px;
    gap: 0 15px;
    color: #000000;
    text-align: center;
    font-size: 1.5em;
}

.share-button {
    background-color: #00c94a;
    border: none;
    color: white;
    padding: 10px 15px;
    text-align: center;
    font-size: 16px;
    margin-top: 10px;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.result {
    display: inline-block;
    background: linear-gradient(45deg, #6e70ff, #976eff, #7386f5, #7396f5);
    background-size: 400% 400%;
    border: none;
    border-radius: 50px;
    margin-bottom: 20px;
    color: white;
    padding: 15px 20px;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    animation: colorChange 1s infinite;
}

@keyframes colorChange {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Responsive Design */
/* @media (max-width: 340px) {
    .container {
        padding: 10px;
    }
    .keyboard .key {
        padding: 8px;
        font-size: 0.9em;
    }
} */

.won {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}

.emoji-rain {
    position: absolute;
    font-size: 2rem;
    opacity: 0;
    animation: drop 3s;
}

@keyframes drop {
    0% {
        top: -10%;
        opacity: 1;
    }
    100% {
        top: 110%;
        opacity: 1;
    }
}

.emoji-rain:nth-child(1) { left: 4%; animation-delay: 0s; }
.emoji-rain:nth-child(2) { left: 23%; animation-delay: 0.04s; }
.emoji-rain:nth-child(3) { left: 17%; animation-delay: 0.08s; }
.emoji-rain:nth-child(4) { left: 62%; animation-delay: 0.12s; }
.emoji-rain:nth-child(5) { left: 5%; animation-delay: 0.16s; }
.emoji-rain:nth-child(6) { left: 41%; animation-delay: 0.2s; }
.emoji-rain:nth-child(7) { left: 28%; animation-delay: 0.24s; }
.emoji-rain:nth-child(8) { left: 53%; animation-delay: 0.28s; }
.emoji-rain:nth-child(9) { left: 79%; animation-delay: 0.32s; }
.emoji-rain:nth-child(10) { left: 88%; animation-delay: 0.36s; }
.emoji-rain:nth-child(11) { left: 15%; animation-delay: 0.4s; }
.emoji-rain:nth-child(12) { left: 46%; animation-delay: 0.44s; }
.emoji-rain:nth-child(13) { left: 74%; animation-delay: 0.48s; }
.emoji-rain:nth-child(14) { left: 31%; animation-delay: 0.52s; }
.emoji-rain:nth-child(15) { left: 55%; animation-delay: 0.56s; }
.emoji-rain:nth-child(16) { left: 22%; animation-delay: 0.6s; }
.emoji-rain:nth-child(17) { left: 6%; animation-delay: 0.64s; }
.emoji-rain:nth-child(18) { left: 80%; animation-delay: 0.68s; }
.emoji-rain:nth-child(19) { left: 13%; animation-delay: 0.72s; }
.emoji-rain:nth-child(20) { left: 69%; animation-delay: 0.76s; }
.emoji-rain:nth-child(21) { left: 90%; animation-delay: 0.8s; }
.emoji-rain:nth-child(22) { left: 37%; animation-delay: 0.84s; }
.emoji-rain:nth-child(23) { left: 52%; animation-delay: 0.88s; }
.emoji-rain:nth-child(24) { left: 19%; animation-delay: 0.92s; }
.emoji-rain:nth-child(25) { left: 67%; animation-delay: 0.96s; }
.emoji-rain:nth-child(26) { left: 3%; animation-delay: 1s; }
.emoji-rain:nth-child(27) { left: 95%; animation-delay: 1.04s; }
.emoji-rain:nth-child(28) { left: 44%; animation-delay: 1.08s; }
.emoji-rain:nth-child(29) { left: 59%; animation-delay: 1.12s; }
.emoji-rain:nth-child(30) { left: 25%; animation-delay: 1.16s; }
.emoji-rain:nth-child(31) { left: 86%; animation-delay: 1.2s; }
.emoji-rain:nth-child(32) { left: 11%; animation-delay: 1.24s; }
.emoji-rain:nth-child(33) { left: 48%; animation-delay: 1.28s; }
.emoji-rain:nth-child(34) { left: 71%; animation-delay: 1.32s; }
.emoji-rain:nth-child(35) { left: 7%; animation-delay: 1.36s; }
.emoji-rain:nth-child(36) { left: 81%; animation-delay: 1.4s; }
.emoji-rain:nth-child(37) { left: 29%; animation-delay: 1.44s; }
.emoji-rain:nth-child(38) { left: 93%; animation-delay: 1.48s; }
.emoji-rain:nth-child(39) { left: 38%; animation-delay: 1.52s; }
.emoji-rain:nth-child(40) { left: 50%; animation-delay: 1.56s; }
.emoji-rain:nth-child(41) { left: 14%; animation-delay: 1.6s; }
.emoji-rain:nth-child(42) { left: 65%; animation-delay: 1.64s; }
.emoji-rain:nth-child(43) { left: 18%; animation-delay: 1.68s; }
.emoji-rain:nth-child(44) { left: 88%; animation-delay: 1.72s; }
.emoji-rain:nth-child(45) { left: 34%; animation-delay: 1.76s; }
.emoji-rain:nth-child(46) { left: 57%; animation-delay: 1.8s; }
.emoji-rain:nth-child(47) { left: 9%; animation-delay: 1.84s; }
.emoji-rain:nth-child(48) { left: 83%; animation-delay: 1.88s; }
.emoji-rain:nth-child(49) { left: 21%; animation-delay: 1.92s; }
.emoji-rain:nth-child(50) { left: 72%; animation-delay: 1.96s; }

.lost {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    opacity: 0.8;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
    animation: growAndVanish 3s forwards;
}
  
@keyframes growAndVanish {
    0% {
        font-size: 10px;
        opacity: 1;
    }
    75% {
        font-size: 500px;
        opacity: 1;
    }
    100% {
        font-size: 700px;
        opacity: 0;
    }
}

.loader {
    font-size: 2rem;
    animation: spinAndPause 2s infinite;
}
  
@keyframes spinAndPause {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

footer {
    text-align: center;
    font-size: x-small;
}

/* @media screen and (orientation: landscape) {
    // Force portrait mode
    body {
        transform: rotate(-90deg);
        width: 100vh;
        height: 100vw;
        overflow: hidden;
    }
} */