@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=PT+Sans+Narrow&display=swap');

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #1c1c1c; /* Dark gray */
    padding: 0;
}

#game-container {
    text-align: center;
    width: 600px; /* Width of the game container */
    margin: 10px; /* Add 10px margin */
    color: #f0f0f0; /* Off-white */
}

#subtitle {
    text-transform: uppercase;
    font-size: 10pt;
    letter-spacing: 2px;
    color: #f0f0f0;
    font-weight: normal; /* Set the font weight to normal */
    margin-top: 0; /* Ensure no top margin */
    margin-bottom: 0; /* Remove bottom margin on the subtitle */
}

#title {
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
    font-size: 3em;
    color: #f0f0f0;
    margin: 0;
    margin-bottom: 25px; /* Add bottom margin to the title */
}

#instructions {
    font-size: 10pt;
    font-style: italic;
    color: #f0f0f0;
    margin: 10px 0 25px 0; /* Add top and bottom margins */
}

#message-container {
    margin-top: 20px;
    font-size: 18px;
}

#validation-container {
    margin-bottom: 10px; /* Set bottom margin to 10px */
    display: flex;
    flex-direction: column;
    gap: 10px; /* Add 10px gap between validation containers */
}

#grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Each cell will take 1/4 of the container */
    grid-gap: 10px;
    margin-bottom: 20px;
}

.cell {
    background-color: #fff;
    border: 2px solid #ccc;
    padding: 10px;
    height: 50px; /* Adjusted height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    transition: background-color 0.3s; /* Only color change on hover */
    color: #1c1c1c; /* Dark gray */
    font-size: 1.2em; /* Set font size to 1.2em */
    font-family: 'PT Sans Narrow', sans-serif; /* Set font to PT Sans Narrow */
	cursor: pointer;
}

.cell:hover {
    background-color: #e6e6e6;
}

.cell.selected {
    background-color: #e3c33b; /* Yellow */
    color: #1c1c1c; /* Dark gray */
}

.cell p {
    margin: 0;
    font-size: 0.9em; /* Set font size to 0.9em */
}

/* Mobile Styling */
@media (max-width: 600px) {
    body {
        justify-content: flex-start; /* Align the game container with the top of the page */
        height: auto; /* Adjust height to fit content */
    }

    #game-container {
        margin: 0 10px; /* Ensure 10px left and right margin */
        padding-top: 10px; /* Add a small padding at the top */
    }

    #subtitle {
        margin-top: 30px; /* Add 30px top margin */
    }

    #grid .cell p {
        line-height: 1em;
        font-size: 0.7em;
    }
}

.validation-cell,
.link-button {
    background-color: #e3c33b; /* Yellow */
    text-align: center;
    width: 100%; /* Ensure the validation cell spans the full width of the game container */
    box-sizing: border-box;
    height: 80px; /* Fixed height */
    display: flex;
    flex-direction: column; /* Stack composer and songs vertically */
    justify-content: center;
    color: #1c1c1c; /* Dark gray */
    text-decoration: none;
    transition: background-color 0.3s;
    margin: 0; /* Remove margin */
    padding: 0; /* Remove padding */
}

.validation-cell .composer,
.link-button .composer {
    font-weight: bold;
    font-size: 1em; /* Set font size to 1em */
}

.validation-cell .songs,
.link-button .songs {
    margin-top: 0;
    font-style: italic;
    font-size: 0.8em; /* Set font size to 0.8em */
}

.link-button:hover,
.link-button:active {
    background-color: #f5d442; /* Brighter yellow on hover */
}

#submit-button, #new-game-button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    display: block; /* Make the button block level */
    margin-left: auto;
    margin-right: auto; /* Center the button */
    background-color: #1D929A; /* Teal */
    color: #f0f0f0; /* Off-white */
    border: none;
    border-radius: 5px;
}

#new-game-button {
    margin-top: 20px; /* Add top margin */
}

#submit-button:hover, #new-game-button:hover {
    background-color: #157d85; /* Darker teal */
}

#chances {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.small-text {
    font-size: 12px;
    margin-right: 10px;
}

.note {
    font-size: 24px;
    margin: 0 5px;
    transition: opacity 0.3s;
}

#try-again-message {
    margin-top: 10px;
    font-size: 16px;
    color: #e36f46; /* Orange */
}

#game-over-message {
    color: #e36f46; /* Orange */
}

#congratulations-message {
    color: #1D929A; /* Teal */
}

#learn-more {
    font-size: 14px;
    margin-top: 5px;
    color: #f0f0f0; /* Off-white */
}

/* Styles for incorrect validation containers */
.incorrect-cell,
.incorrect-link-button {
    background-color: #f0f0f0; /* Off-white */
    color: #1c1c1c; /* Dark gray text */
}

.incorrect-link-button:hover,
.incorrect-link-button:active {
    background-color: #e6e6e6; /* Lighter gray on hover */
}
