body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 420px;
}

#auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="text"], input[type="password"] {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    padding: 0.8rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#logout-button {
    background-color: #dc3545;
}

#logout-button:hover {
    background-color: #c82333;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.error {
    color: red;
    margin-top: 1rem;
    height: 1em; /* 预留空间，防止布局跳动 */
}

/* 用于隐藏元素的工具类 */
.hidden {
    display: none;
}

#game-canvas {
    background-color: #333;
    border: 2px solid #555;
    margin-top: 1rem;
}

#user-info, #game-info {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#game-over-message {
    color: #ffc107;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 1rem;
}