body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#game-container {
    width: 80%;
    max-width: 800px;
    height: 90vh;
    background-color: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

h1 {
    text-align: center;
    padding: 15px;
    margin: 0;
    background-color: #1f1f1f;
    border-bottom: 1px solid #333;
    font-size: 1.2em;
}

#chat-box {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* 滚动条样式 */
#chat-box::-webkit-scrollbar {
    width: 8px;
}
#chat-box::-webkit-scrollbar-track {
    background: #2a2a2a;
}
#chat-box::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}
#chat-box::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.message {
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 18px;
    margin-bottom: 15px;
    line-height: 1.5;
    white-space: pre-wrap; /* 保持换行和空格 */
}

.user-message {
    background-color: #0055b3;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.keeper-message {
    background-color: #3a3a3a;
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.loading-message {
    font-style: italic;
    color: #888;
    align-self: flex-start;
}


#input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid #333;
    background-color: #1f1f1f;
}

#player-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 20px;
    background-color: #333;
    color: #e0e0e0;
    font-size: 1em;
}

#player-input:focus {
    outline: none;
    border-color: #007bff;
}

#send-btn {
    margin-left: 10px;
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

#send-btn:hover {
    background-color: #0056b3;
}
