/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Freckle+Face&display=swap');

/* General body styles */
body {
    font-family: 'Freckle Face', cursive; /* Fun, crazy font */
    background-color: #d500f9; /* Light pink background for a vibrant look */
    color: #33f30c;
    margin: 0;
    padding: 0;
    height: 100%; /* Ensure full height usage */
}

.game-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center; /* Center the elements vertically */
    height: min-height 100vh; /* Full viewport height */
    padding: 0;
    margin: 0;
}

#clue-button {
    position: relative;
    width: 90%;
    max-width: 500px;
    perspective: 1000px;
    -webkit-perspective: 1000px; /* Safari support */
    border: none;
    background: none;
    margin: 0; /* Remove extra margins */
    font-family: 'Freckle Face', cursive;
}

#clue-button .button-container {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 20px; /* More rounded corners */
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d; /* Safari support */
    transition: transform 0.5s ease, height 0.3s ease;
    min-height: 150px;
    background: linear-gradient(135deg, #c01788, #d500f9); /* Vibrant pink gradient */
    box-shadow: 0px 8px 20px rgba(24, 4, 4, 0.999); /* Add depth with shadow */
}

#clue-button.flip .button-container {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg); /* Safari support */
}

.button-front,
.button-back {
    position: absolute;
    width: 100%;
    height: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden; /* Safari support */
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    font-family: 'Freckle Face', cursive;
    word-wrap: break-word;
    color: white(49, 5, 5);
    box-sizing: border-box; /* Ensure padding is included in height calculations */
}

.button-front {
    background: linear-gradient(135deg, #c01788, #d500f9); /* Purple-pink gradient */
    z-index: 2;
    font-size: 3.5rem; /* Larger text for "CLICK FOR CLUE" */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3); /* Add text shadow for style */
    transform: rotateY(0deg);
    -webkit-transform: rotateY(0deg); /* Safari support */
}

.button-back {
    background: linear-gradient(135deg, #c01788, #d500f9); /* Matching vibrant gradient */
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg); /* Safari support */
    z-index: 1;
    font-size: 1.5rem;
}

.button-back > .clue-category {
    font-size: 3rem; /* Larger category text */
    font-weight: bold;
    color: #e5f504; /* Bright yellow for "CATEGORY" */
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3); /* Add shadow for category */
    text-transform: uppercase; /* Make "CATEGORY" uppercase */
}

.button-back > .clue-text {
    font-size: 2.5rem; /* Larger clue text */
    color: #ffffff; /* White text for clue */
    max-width: 90%;
    word-wrap: break-word;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); /* Subtle shadow for clue */
}

.timer {
    font-size: 80px;
    color: #f7690a;
    margin: 10px 0; /* Minimal spacing around the timer */
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3); /* Styled timer text */
    font-family: 'Freckle Face', cursive; /* Match the font with the rest */
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .game-container {
        height: 100%; /* Ensure proper alignment on smaller screens */
    }

    #clue-button {
        max-width: 90%;
        padding: 5px;
    }

    .button-front {
        font-size: 2.5rem;
        padding: 15px;
    }

    .button-back {
        font-size: 1.5rem;
    }

    .button-back > .clue-category {
        font-size: 2rem;
    }

    .button-back > .clue-text {
        font-size: 1.8rem;
    }

    .timer {
        font-size: 80px;
    }
}