body {
    font-family: 'Roboto Mono', monospace;
    margin: 0;
    padding: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #181818;
    color: #fff;
    min-height: 100vh;
    font-weight: normal;
    box-sizing: border-box;
}

h1 {
    font-family: 'Jacquard 24', monospace;
    font-size: 64pt;
    color: #E7D1B9;
    font-weight: normal;
    text-align: center;
    margin:0;
    padding-bottom:0px;
}

h2 {
    font-family: 'Jacquard 24', monospace;
    font-size: 32pt;
    color: #E7D1B9;
    font-weight: normal;
    text-align: center;
    margin:0;
    padding-bottom:10px;
}

p {
    font-family: 'Roboto Mono', monospace;
    font-size:.85rem;
    font-weight: 300;
    text-align: center;
    line-height:1.5rem;
    margin:0;

}
#login-container {
    text-align: center;
    margin-top: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;  /* Space between elements */
}

#begin-button {
    font-size: 1.5rem;  /* Twice as large text */

}

#username-input {
    background-color: transparent;
    border: none;
    border-bottom: 2px solid #FFF;
    color: #FFF;
    font-size: 2.75em;
    padding: 5px 0;
    text-align: center;
    width: 100%;
    max-width: 300px;
    margin-top: .5em;
}

#username-input:focus {
    outline: none;
}

#username-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Optional: Add decorative line endings */
.input-container {
    position: relative;
    width: 80%;
    max-width: 300px;
    margin: 0 auto;
}

.input-container::before,
.input-container::after {
    content: '◆';
    color: #FFF;
    position: absolute;
    bottom: -10px;  /* Lowered by 6px */
    font-size: 1em;
}

.input-container::before {
    left: -4px;  /* Changed from -1em to 0 */
}

.input-container::after {
    right: -4px;  /* Changed from -1em to 0 */
}

#game-container {
    display: none;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    margin-top:0px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.canvas-container {
    width: 100%;
    margin-top: 25px;
    margin-bottom: 25px;
    max-width: 600px;  /* Increased from 400px */
    position: relative;
    aspect-ratio: 4/3;
    image-rendering: -moz-crisp-edges;    /* Firefox */
    image-rendering: -webkit-crisp-edges; /* Webkit */
    image-rendering: pixelated;           /* Chrome, Edge, Safari */
    image-rendering: crisp-edges;         /* Generic */
}

#sand-game {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #222;
    cursor: pointer;
    z-index: 1;
}

.game-divider {
    position: absolute;
    width: 2px;
    height: 150px;
    background-color: #444;
    bottom: 0;
}

.game-label {
    position: absolute;
    color: white;
    font-size: min(18px, 3vw);
    bottom: 5px;
    transform: rotate(-90deg);
    transform-origin: left top;
    white-space: nowrap;
}

#results-container {
    display: none;
    margin-top: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

button {
    margin-top: 15px;
    padding: .75rem 1.5rem;
    background-color: #573547;
    color: #E7D1B9;
    border: none;
    cursor: pointer;
    font-family: 'Jacquard 24';
    max-width: 100%;
    box-sizing: border-box;
    font-size: 1.5rem;
}

button:hover {
    background-color: #663D53;
}

#message {
    color: white;
    margin-top: 15px;
    font-family: 'Roboto Mono', monospace;
    font-size:.85rem;
    font-weight: 300;
    text-align: center;
    line-height:1.5rem;
}

input {
    background-color: #444;
    font-family: 'Jacquard 24', monospace;
    color: white;
    border: 1px solid #666;
    padding: 8px;
    border-radius: 4px;
    max-width: 100%;
    box-sizing: border-box;
}

input::placeholder {
    font-family: 'Jacquard 24', monospace;
    color: #999;
}

button.reset {
    background-color: #ff4444;
    margin-top: 10px;
}

button.reset:hover {
    background-color: #ff0000;
}

#vote-mask {
    position: absolute;
    background: #222;
    z-index: 1;
    transition: opacity 1s ease;
    width: 600px;  /* Updated from 400px */
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

#user-colors {
    display: none;  /* Initially hidden */
    margin-top: 10px;
    text-align: left;
}

#user-colors h4 {
    font-family: 'Jacquard 24', monospace;
    font-size: 30pt;
    margin: 0 0 20px 0;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    color: #E7D1B9;
    font-weight: normal;
}

.user-entry {
    font-family: 'Roboto Mono', monospace;
    font-size: 10pt;
    font-weight: 500;
    line-height: 1.5rem;
    margin-bottom: 5px;
    text-align: center;
}

/* Add fixed-width counter container */
.grains-counter {
    display: inline-block;
    font-family: 'Jacquard 24';
    font-size: 32pt;
    padding: 5px 0px 10px;
    text-align: center;
}

/* Add media queries for smaller screens */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    #logo {
        width: 90%; /* Makes logo responsive on mobile */
    }
    
    .game-label {
        font-size: 10px;
    }
}

#vote-switch-buttons {
    margin: 20px auto;
    text-align: center;
    z-index: 100;
}

#vote-switch-buttons button {
    margin: 0 10px;
}

#logo {
    max-width: 100%;
    height: auto;
    width: 600px; /* Adjust this value based on your desired default size */
    margin: 0 auto;
    display: block;
    padding-bottom: 0px;
}