@font-face {
    font-family: 'Scramble';
    src: url('../fonts/scramble.ttf') format('truetype');
}

@font-face {
    font-family: 'Tilez';
    src: url('../fonts/tilez.ttf') format('truetype');
}

* {
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
}

body {
    font-family: Arial, sans-serif;
    background-color: #36180d; 
    color: #e0e0e0; 
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.universal-header {
    background-color: #f2e6d9; /* Scrabble tile color */
    color: #333;
    padding: 10px;
    text-align: center;
}

.site-title {
    display: inline-block;
    color: #333;
    font-family: 'Tilez', sans-serif; /* Use the Scramble or Tilez font */
    font-size: 4em;
    text-align: center;
    line-height: 0.8; 
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.home-button-container {
    text-align: center;
    margin-top: 10px;
}

button.home-button {
    padding: 10px 200px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    background-color: #831c1c;
    color: #ffffff;
    border-radius: 5px;
    text-wrap: nowrap;
}

.button-container {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

button.home-button:hover {
    background-color: #915050; 
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

nav li {
    margin: 5px;
}

button {
    padding: 10px 10px;
    margin: 2px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    background-color: #831c1c; 
    color: #ffffff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3); 
    border-radius: 5px;
    flex-grow: 1;
    flex-basis: 30%;
}

button:hover {
    background-color: #915050; 
}

.page-title {
    width: 100%;
    max-width: 1200px;
    padding: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

main {
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    background-color: #412812; 
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); 
    min-height: 400px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

main > * {
    width: 100%;
    text-align: center;
}

#game-mode {
    font-size: 2em;
    color: #f2e6d9; 
    margin-bottom: 0px;
}

#game-mode-description {
    font-size: 1.2em;
    color: #dfb6b6; 
    margin-bottom: 5px;
}

.small-text {
    font-size: 0.8em;
    color: #dfb6b6; 
}

/* Style for the Scrabble tiles */
.tile {
    display: inline-block;
    width: 50px; 
    height: 50px; 
    margin: 1px;
    background-color: #f2e6d9; /* Scrabble tile color */
    color: #333;
    font-family: 'Tilez', sans-serif; /* Use the Scramble or Tilez font */
    font-size: 4em;
    text-align: center;
    line-height: 50px; /* Adjust to match tile height */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.tile:active {
    cursor: grabbing;
}

/* Style for the tiles container */
#tiles-container {
    min-height: 60px; /* Adjust this value based on your needs */
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #444; 
    padding: 5px; 
    max-width: 100%;
    overflow-x: auto;
}

/* Placeholder style */
#tiles-container.empty::after {
    content: "Tiles will appear after selecting a game mode.";
    color: #888;
    font-size: 1em;
    text-align: center;
}

.board {
    display: grid;
    gap: 1px; /* Gap between cells */
    margin-top: 20px;
    margin-bottom: 10px;
    justify-content: center;
    max-width: 100%;
    overflow-x: auto;
}

.board .cell {
    width: 50px;
    height: 50px;
    background-color: #333;
    border: 1px solid #888;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f2e6d9;
    font-family: 'Tilez', sans-serif;
    font-size: 1.0em;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.result {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 1.5em;
    min-height: 1.5em;
}

#words-section {
    margin-top: 5px;
}

#words-found,
#possible-words {
    margin-top: 10px;
    font-size: 1.0em;
    color: #dfb6b6;
}

footer {
    margin-top: 20px;
    font-size: 0.8em;
    color: #dfb6b6; 
    text-align: center;
    max-width: 100%;
    overflow-x: auto;
}
