.game-room {
    width: 100%;
    height: calc(100vh - 40px); /* 预留顶部空间 */
    padding: 20px;
    background: var(--mocha-bg);
    position: relative;
    overflow: hidden; /* 禁止滚动条 */
}

.game-room-container {
    display: flex;
    gap: 20px;
    height: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.game-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0; /* 防止内容溢出 */
    height: 100%;
    overflow: hidden; /* 禁止滚动条 */
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--mocha-light);
    border-radius: 8px;
}

.game-info {
    padding: 15px;
    background: var(--mocha-light);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scores {
    display: flex;
    gap: 20px;
    font-size: 1.2em;
}

.round-result {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--mocha-light);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    z-index: 1000;
}

.round-result button {
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--sage-green);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.round-result button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.game-status {
    display: flex;
    gap: 20px;
    font-size: 1.1em;
    color: var(--muted-yellow);
}

.scores-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.player-score {
    font-size: 1.1em;
    color: var(--sage-green);
}

.guess-input {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.suggestions-list {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: var(--mocha-light);
    border-radius: 8px;
    margin-top: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-item:hover {
    background: var(--slate-blue);
    color: var(--text-light);
}

.submit-guess {
    padding: 12px 24px;
    background: var(--sage-green);
    color: var(--text-light);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.submit-guess:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-guess:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.round-result-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--mocha-light);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    z-index: 1000;
    min-width: 300px;
}

.chat-section {
    width: 300px;
    background: var(--mocha-light);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 20px;
    bottom: 20px;
    transition: all 0.3s ease;
    z-index: 100;
}

.chat-section.expanded {
    height: 400px;
}

.chat-section.collapsed {
    height: 40px;
}

.chat-header {
    padding: 10px 15px;
    background: var(--mocha-bg);
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.chat-header .toggle-button {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
}

.chat-section.collapsed .messages-container,
.chat-section.collapsed .message-input {
    display: none;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    word-break: break-word;
}

.message-time {
    font-size: 0.8em;
    color: var(--text-light);
    opacity: 0.7;
}

.message.system {
    background: var(--slate-blue);
    color: white;
    font-style: italic;
}

.message-input {
    display: flex;
    padding: 10px;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.message-input input {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    background: var(--mocha-bg);
    color: var(--text-light);
}

.message-input button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background: var(--sage-green);
    color: white;
    cursor: pointer;
}

.players-guesses {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: var(--mocha-light);
    border-radius: 8px;
}

.player-guesses {
    flex: 1;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.player-guesses h4 {
    margin-bottom: 10px;
    color: var(--muted-yellow);
}

.guesses-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.guess-item {
    padding: 8px;
    background: var(--mocha-bg);
    border-radius: 4px;
    font-size: 0.9em;
}

.players-section {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.player-section {
    flex: 1;
    background: var(--mocha-light);
    padding: 15px;
    border-radius: 8px;
}

.guess-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.guess-table th,
.guess-table td {
    padding: 8px;
    text-align: left;
    border: 1px solid var(--mocha-bg);
}

.guess-table th {
    background: var(--mocha-bg);
    color: var(--text-light);
}

.guess-histories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.player-history {
    background: var(--mocha-light);
    border-radius: 8px;
    padding: 15px;
}

.player-history h3 {
    color: var(--muted-yellow);
    margin-bottom: 10px;
}

@media screen and (max-width: 1200px) {
    .game-room-container {
        gap: 10px;
    }

    .chat-section {
        width: 250px;
    }
}

@media screen and (max-width: 1024px) {
    .game-room-container {
        flex-direction: column;
    }

    .chat-section {
        width: 100%;
        height: 300px;
    }
}

@media screen and (max-width: 768px) {
    .game-room-container {
        flex-direction: column;
    }

    .chat-section {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 8px 8px 0 0;
    }

    .chat-section.expanded {
        height: 300px;
    }

    .guess-histories {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media screen and (max-height: 600px) {
    .chat-section.expanded {
        height: 250px;
    }
}

/* 添加单人模式风格的输入区域样式 */
.input-section {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.player-input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: var(--mocha-light);
    color: var(--text-light);
    font-size: 16px;
    transition: all 0.3s;
}

.player-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--slate-blue);
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: var(--mocha-light);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    margin-top: 4px;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-item:hover {
    background: var(--slate-blue);
    color: var(--text-light);
}

.submit-guess {
    padding: 12px 24px;
    background: var(--sage-green);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    width: 100%;
}

.submit-guess:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.game-main::-webkit-scrollbar,
.messages-container::-webkit-scrollbar {
    width: 6px;
}

.game-main::-webkit-scrollbar-thumb,
.messages-container::-webkit-scrollbar-thumb {
    background: var(--slate-blue);
    border-radius: 3px;
}
