body { margin: 0; overflow: hidden; }
#game-container { 
    width: 100%; 
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
}
#canvas-container { 
    width: 100%; 
    height: 80vh; 
    flex: 0 0 80vh; 
    overflow: hidden; 
    position: relative; /* Added for positioning joystick */
}

#touch-joystick.active {
    background: rgba(255, 255, 255, 0.4);
}

#touch-joystick {
    position: absolute;
    bottom: 190px;
    right: 190px; /* Move to bottom right */
    left: auto;  /* Override any left positioning */
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

#touch-joystick .knob {
    width: 70px;
    height: 70px;
    background: #ff4500;
    border-radius: 50%;
    position: absolute;
    left: 50%; /* Center horizontally */
    top: 50%;  /* Center vertically */
    transform: translate(-50%, -50%); /* Offset by half its size */
    transition: transform 0.1s ease-out; /* Smooth movement */
}

canvas { 
    display: block; 
    width: 100%; 
    height: 100%; 
}
#times { 
    padding: 10px; 
    font-family: 'Courier New', Courier, monospace;
    background-color: #333333;
    color: #ff4500;
    flex: 1; 
    overflow: auto; 
    display: flex;
    justify-content: space-between;
}
.time-column {
    flex: 1;
    text-align: center;
}
.time-column h2 { 
    margin: 5px 0; 
    font-size: 1.2em; 
    text-transform: uppercase;
}
.time-column ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}
.time-column li { 
    font-size: 1em; 
    line-height: 1.5; 
}
.personal-time {
    color: #ffff00;
}
.time-column button {
    background-color: #444444;
    color: #ff4500;
    border: 2px solid #555555;
    border-radius: 5px;
    padding: 5px 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: inset 2px 2px 5px #666666, inset -2px -2px 5px #222222;
}
.time-column button:hover {
    background-color: #555555;
}
.time-column button:active {
    box-shadow: inset -2px -2px 5px #666666, inset 2px 2px 5px #222222;
}
#name-input {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px;
    background-color: #333333;
    border: 2px solid #555555;
    border-radius: 5px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}
#name-input input[type="text"] {
    font-family: 'Courier New', Courier, monospace;
    padding: 3px;
    margin: 0;
    width: 120px;
}
#name-input input[type="text"]:disabled {
    background-color: #444444;
    color: #888888;
    cursor: not-allowed;
}
#name-input button, #name-input a {
    background-color: #444444;
    color: #ff4500;
    border: 2px solid #555555;
    border-radius: 5px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: none;
}
#name-input label {
    font-family: 'Courier New', Courier, monospace;
    color: #ff4500;
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 0;
    font-size: 0.9em;
    white-space: nowrap;
}
#name-input input[type="checkbox"] {
    accent-color: #ff4500;
    transform: scale(1.1);
    margin: 0;
}
/* Popup styles */
.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #333333;
    color: #ff4500;
    padding: 20px;
    border: 2px solid #555555;
    border-radius: 10px;
    z-index: 100;
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.5);
}
.popup a {
    color: #ffff00;
    text-decoration: underline;
}
.popup button {
    background-color: #444444;
    color: #ff4500;
    border: 2px solid #555555;
    border-radius: 5px;
    padding: 5px 15px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1em;
    cursor: pointer;
    margin-top: 15px;
}
/* Easter egg cursor effect */
.cat-cursor {
    cursor: none;
}
#cursor-cat {
    position: absolute;
    width: 24px;
    height: 24px;
    background: url('./tex/tex_marble.png') no-repeat center/cover;
    border-radius: 50%;
    pointer-events: none;
    z-index: 101;
    animation: spin 1s linear infinite;
}
.paw-print {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #ff4500;
    border-radius: 50%;
    opacity: 0.7;
    pointer-events: none;
    z-index: 100;
    animation: fadeOut 1s ease-out forwards;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes fadeOut {
    0% { opacity: 0.7; }
    100% { opacity: 0; }
}