:root {
    --foreground: #6c584c;
    --background: #f0ead2; 
    --secondary: #a98467; 
    --accent: #adc178;

    font-size: 20px;

    background-color: var(--background);
    color: var(--foreground);
}

.content-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

.home {
    width: 95vw;
    margin: auto;
    overflow: auto;
    padding: 20px;
}

.title {
    text-align: center;
}

.home-main {
    display: flex;
    justify-content: space-evenly;
    align-content: stretch;
    flex-direction: row;
}

.home-content {
    display: flex;
    flex-direction: column;
    margin: 20px;
    padding: 5px;
    min-width: 600px;
    max-height: 80vh;
    border: 2px solid var(--accent);
    border-radius: 5px;
    overflow: auto;
}

.home-left {
    justify-content: space-between;
    flex-grow: 0;
    flex-shrink: 1;
    align-self: flex-start;
    min-height: 8em;
}

.home-left button {
    flex-grow: 0;
}

.home-right {
    flex-grow: 0;
    flex-shrink: 1;
    align-self: flex-start;
}

.home-right #search {
    margin-bottom: 2em;
}

.home-right p {
    text-align: center;
}

@media (max-width: 1200px) {
    .home-main {
        flex-direction: column;
    }
}



.input-button {
    display: flex;
    justify-content: space-between; 
    width: 100%;
}

.chat-container {
    display: flex;
    flex-direction: column;
}

.room-list {
    overflow: auto;
}

.room {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--secondary);
    color: var(--background);
    margin: .5em 20px;
    padding: 5px .5em;
    border-radius: 8px;
    border: 1px solid var(--accent);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


.room-info {
    display: flex;
    align-items: left;
    flex-grow: 1;
    gap: 0.2em;
    color: var(--background);
    flex-direction: column;
}

.room-info p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-info div {
    display: flex;
    gap: 1em;
}

.room-info .game-title {
    font-weight: bold;
    color: var(--accent);
}

.room button {
    flex-shrink: 0;
    padding: 6px 12px;
}

input {
    flex: 2;
    background-color: var(--secondary);
    font-size: 1em;
    color: var(--background);
    padding: 5px .5em;
    margin: .5em 20px;
    border: none;
    border-radius: 5px;
}

textarea {
    background-color: var(--secondary);
    font-size: 1em;
    color: var(--background);
    
    margin: .5em 20px;
    padding: 5px .5em;

    border: none;
    border-radius: 5px;

    min-height: 600px;
    overflow-y: auto;
    resize: none;
}

button {
    flex: 1;
    background-color: var(--accent);
    font-size: 1em;
    margin: .5em 20px;
    padding: 5px .5em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: color-mix(in srgb, var(--accent) 80%, black);
}


.dropdown {
    position: relative;
    display: inline-block; /* Allows side-by-side display if needed */
    font-family: sans-serif;
}

.dropdown-toggle {
    background-color: var(--accent);
    color: var(--foreground);
    padding: 12px 16px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 150px;
}

.dropdown-toggle:hover, .dropdown-toggle:focus {
    background-color: color-mix(in srgb, var(--accent) 80%, black);
}

.dropdown-menu {
    display: block; /* Overridden by JS, but good default */
    position: absolute;
    background-color: var(--background);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    list-style-type: none; /* Remove bullet points */
    padding: 0;
    margin: 0;
    border-radius: 4px;
    overflow-y: auto; /* For rounded corners on items */
}

.dropdown-item {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: color-mix(in srgb, var(--background) 80%, black);
}

.arrow {
    margin-left: 10px;
}

.tic-tac-toe {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;

    gap: 4em;
}

@media (max-width: 1400px) {
    .tic-tac-toe {
        flex-direction: column;
        gap: 1em;
    }
}

@media (max-width: 1050px) {
    .content-wrapper {
        flex-direction: column-reverse;
        overflow-y: auto;
    }
}

.ttt-board {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: auto;

    min-height: 16em;
    min-width: 16em;
    max-width: min(800px, 100%);
    max-height: min(800px, 100%);
    aspect-ratio: 1 / 1;
}

.ttt-row {
    display: flex;
    gap: 1%;
}

.ttt-cell {
    flex-grow: 1;
    flex-basis: 0%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1;

    border-radius: 10%;
    margin: 1%;
    background-color: var(--secondary);

    display: flex;
    justify-content: center;
    align-items: center;
}

.ttt-cell svg {
    width: 90%;
    height: 90%;

    max-width: 90%;
    max-height: 90%;

    aspect-ratio: 1;
}

.ttt-info {
    flex-grow: 0;
    height: 40%;
    min-height: 8em;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: var(--secondary);
    color: var(--background);
}

.ttt-info p { 
    white-space: nowrap;
    margin: .5em 1em;
    text-align: center;
}

.ttt-log {
    flex-grow: 1;
    background-color: var(--secondary);
    border: 2px solid var(--accent);
    border-radius: 6px;
    padding: 0em 1em;
    margin: 1em;
    overflow-y: auto;
}

.ttt-log ul {
    min-width: 8em;
}

.ttt-log li {
    white-space: nowrap;
}

.ttt-status {
    height: auto;
}
