body {
    font-family: sans-serif;
    margin: 0;
    overflow: hidden;
}

.ui-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    z-index: 10;
    text-align: center;
}

h1 {
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.settings-button {
    position: fixed; /* Changed to fixed positioning */
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 100; /* Ensure it's above other elements */
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.settings-button svg {
    width: 100%;
    height: 100%;
    color: black; /* Set the color of the SVG */
}

.settings-button:hover svg {
    color: #007bff; /* Change color on hover */
}

.search-container {
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 5px;
}

#suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-top: none;
    text-align: left;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
}

.suggestion-item:hover, .suggestion-item.selected {
    background-color: #f0f0f0;
}

#search-input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

#new-game-button {
    margin-top: 10px;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#new-game-button:hover {
    background-color: #0056b3;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background-color: #f2eecb;
    background-image: url('https://www.transparenttextures.com/patterns/notebook-dark.png');
    background-repeat: repeat;
    background-size: auto;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    text-align: left;
}
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}
.form-group label {
    font-weight: bold;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 100%; /* Make buttons full width in modal actions */
    box-sizing: border-box;
}

.modal-button:hover {
    background-color: #0056b3;
}

.modal-button.secondary {
    background-color: #6c757d;
}

.modal-button.secondary:hover {
    background-color: #5a6268;
}

.suggestions-container-modal {
    display: none; /* start hidden */
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 2000;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
}
.suggestions-container-modal .suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
}

.suggestions-container-modal .suggestion-item:hover {
    background-color: #f0f0f0;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.log-window {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 300px;
    height: 150px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-family: monospace;
    font-size: 0.8em;
    padding: 10px;
    border-radius: 5px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.log-window p {
    margin: 2px 0;
    line-height: 1.2;
}
