body {
    font-family: sans-serif;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
	user-select: none;
}

/* --- Screen Containers --- */
.game-container, .puzzle-selection-container {
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: auto;
    width: 100%;
    box-sizing: border-box;
    z-index: 0;
    overflow: hidden;
}

@media (max-width: 500px) {
    .game-container, .puzzle-selection-container {
        max-width: 100vw;
    }
}

.before-after-title
{
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: bold;
    font-size: larger;
}

.before-after-text
{
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
}

.before-after-text-spacer
{
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}

.before-after-image
{
    border-radius: 15px;
    width: 325px;
    text-align: center;
}

.before-after-caption
{
    margin-top: 20px;
    font-size: 30px;
    font-weight: bold;
    text-align: center;
}

/* --- Puzzle Selection Screen Styles --- */
.icon
{
    position: relative;
    top: 12px;
    width: 100px;
}

.puzzle-selection-container h1 {
    color: #333;
    margin-bottom: 30px;
}

.puzzle-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.puzzle-button {
    display: block;
    margin: 20px auto;
    padding: 12px 25px;
    font-size: 1.1em;
    cursor: pointer;
    background-color: #4CAF50; /* Green */
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.puzzle-button:hover {
    background-color: #45a049;
}

/* --- Game Screen Styles (Existing) --- */
h1 {
    color: #333;
    margin-bottom: 20px;
    margin-top: 0px;
}

.instructions {
    text-align: left;
    margin-bottom: 16px;
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
}

/* Updated feedback-message style */
.feedback-message {
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.feedback-message.visible {
    opacity: 1; /* Visible when 'visible' class is added */
}

.score-container {
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    /* Add a transition for smooth fading */
    transition: opacity 0.3s ease-in-out;
}

.result-display,
.hints-display
{
    margin-top: 10px;
}

.board {
    display: flex; /* Changed to flexbox for vertical arrangement of word pairs */
    flex-direction: column;
    gap: 8px; /* Space between word pair containers */
    margin-bottom: 10px;
    justify-content: center;
    align-items: center; /* Center the word pairs horizontally */
}

.word-pair-container {
    display: flex;
    flex-direction: column; /* Stack words within a pair vertically */
    gap: 5px; /* Space between the two words in a pair */
    align-items: center; /* Center words within their container */
    padding: 0px 100px;
}

.word-display {
    display: flex;
    gap: 5px; /* Space between individual letter cells */
    justify-content: center;
}

.board-cell {
    width: 45px;
    height: 45px;
    border: 2px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e0e0e0;
    box-sizing: border-box;
}

.tile {
    width: 34px;
    height: 34px;
    background-color: #ffcc99;
    cursor: grab;
    border: 2px solid #cc9966;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    transition: background-color 0.1s ease-in-out, border-color 0.1s ease-in-out; /* Add transition for smooth highlight */
}

.tile:active {
    cursor: grabbing;
}

.tile.active-tile {
    /* background-color: #aaddaa; */
    border: 3px dashed gray;
}

.dragging {
    opacity: 0.6;
    border: 2px dashed #333;
}

.drag-shadow {
    position: absolute;
    opacity: 0.7;
    z-index: 1000;
    pointer-events: none; /* don't let the shadow eat the hover events */
}

.pair-separator {
    width: 100%;
    height: 3px;
    background-color: #ccc;
    margin: 8px 0 10px 0; /* Space above and below the separator */
}

/* Home Button Style */
#homeButton {
    display: block;
    margin: auto;
    padding: 0;
    font-size: 2.5em;
    cursor: pointer;
    background-color: transparent;
    color: inherit;
    border: none;
    border-radius: 0;
    transition: transform 0.2s ease;
}

#homeButton:hover {
    transform: scale(1.1);
    background-color: transparent;
}

/* New style for highlighting the tile when another tile is dragged over it */
.tile.drag-over-target {
    /* background-color: #ffd700 !important; */
    border: 3px dashed gray !important;
}

/* Optional: Highlight for empty cells when dragging over them */
.board-cell.drag-over-valid-empty {
    background-color: #cceeff !important; /* Light blue for empty valid cells */
    border: 2px dashed #6699ff !important;
}

.word-dash {
    font-size: 40px; /* Match tile font size */
    font-weight: bold; /* Match tile font weight */
    color: #333; /* Match tile text color */
    margin: 0 2px; /* Adjust spacing around the dash */
    display: flex; /* To allow centering vertically */
    align-items: center; /* Center dash vertically with tiles */
}

.submit-pair-container
{
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Add this to your style.css */
.submit-button {
    padding: 7px 10px;
    font-size: 1.1em;
    cursor: pointer;
    background-color: #007bff; /* Blue */
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.submit-button:hover {
    background-color: #0056b3;
}

.hint-button {
    padding: 7px 10px;
    font-size: 1.1em;
    cursor: pointer;
    background-color: #C23FFF;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    margin-left: 30px;
}

.hint-button:hover {
    background-color: blueviolet;
}

.shuffle-button
{
    position: relative;
    top: 7px;
    margin-left: 30px;
    font-size: 30px;
    line-height: 50px;
    cursor: pointer;
    padding: 5px 6px 0px 8px;
    border: 2px solid gray;
    border-radius: 5px;
}

.shuffle-button img
{
    width: 22px;
}

.shuffle-button:hover
{
    background-color: #EEE;
}

.puzzle-theme
{
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
}

.tile.hint {
    background-color: #C23FFF;
    color: white;
    border: 2px solid #920F9F;
    cursor: default;
}

.tile.correct {
    background-color: darkgreen;
    color: white; /* Make text white for better contrast */
    border: 2px solid #004d00; /* Darker green border */
    cursor: default;
}

.hidden {
    display: none;
}

.corrected-tile
{
    background-color: yellow !important;
    color: black !important;
}

.email-input-label
{
    text-align: left;
    position: relative;
    left: 3px;
    margin-bottom: 5px;
}

.email-input
{
    display: block;
    width: 90%;
    border: 2px solid black;
    padding: 2px 6px;
    height: 30px;
    font-size: 20px;
}

.feedback-text-area
{
    display: block;
    width: 90%;
    border: 2px solid black;
    padding: 2px 6px;
    height: 80px;
    font-size: 20px;
}

.email-submit-button
{
    display: block;
    position: relative;
    left: 3px;
    margin-top: 6px;
    padding: 4px 7px;
    font-size: 16px;
    cursor: pointer;
    background-color: green; /* Blue */
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.email-submit-button:hover {
    background-color: #45a049;
}
