* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", sans-serif;
}

body {
    background-color: #1a1a2e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#app {
    max-width: 768px;
    margin: 0 auto;
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    background: linear-gradient(to bottom, #15181d 50%, #f1f8fe 50%);
}

/* 非首页页面使用统一浅色背景 */
.page {
    display: none;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.page:not(#home) {
    background: #f1f8fe;
}

.page.active {
    display: block;
}

/* 首页样式 */
.home-container {
    max-width: 768px;
    margin: 0 auto;
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    position: relative;
    min-height: 100vh;
}

.avatar {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    border: 3px solid #4cc9f0;
    background-color: rgba(76, 201, 240, 0.1);
}

/* 标题、文本等需要居中的元素单独设置居中 */
.title h1, .title p, .or-text, .online-friends {
    text-align: center;
}

.title {
    margin-top: 60px;
    margin-bottom: 20px;
}

.title h1 {
    font-size: 42px;
    color: #fff;
    text-shadow: 0 0 15px #4cc9f0, 0 0 30px #4cc9f0;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    font-family: "Arial Rounded MT Bold", "PingFang SC", sans-serif;
}

.title p {
    font-size: 24px;
    color: #fff;
    text-shadow: 0 0 15px #4cc9f0, 0 0 30px #4cc9f0;
    margin-bottom: 20px;
    font-weight: 500;
    letter-spacing: 1px;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.nickname-input {
    width: 100%;
    padding: 18px 20px;
    border: 3px solid #4cc9f0;
    border-radius: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 20px;
    text-align: center;
    box-shadow: 0 0 15px #4cc9f0;
    margin-bottom: 20px;
    outline: none;
}

.nickname-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.create-btn {
    width: 100%;
    padding: 18px 20px;
    border: none;
    border-radius: 40px;
    background: linear-gradient(90deg, #4cc9f0, #7209b7);
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 15px;
    transition: transform 0.2s;
}

.create-btn:hover {
    transform: scale(1.02);
}

.btn-icon {
    width: 32px;
    height: 32px;
}

.or-text {
    color: #4cc9f0;
    font-size: 20px;
    margin-bottom: 15px;
}

.join-room {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.room-code-input {
    flex: 1;
    padding: 18px 20px;
    border: 2px solid #4cc9f0;
    border-radius: 12px;
    font-size: 20px;
    outline: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: #4cc9f0;
}

.room-code-input::placeholder {
    color: rgba(76, 201, 240, 0.6);
}

.join-btn {
    padding: 0 30px;
    border: 3px solid #4cc9f0;
    border-radius: 12px;
    background-color: #4cc9f0;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.join-btn:hover {
    background-color: #3bb8db;
    transform: scale(1.05);
}

.games-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 15px;
}

.game-card {
    flex: 0 0 calc(50% - 8px);
    max-width: calc(50% - 8px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    aspect-ratio: 4/5;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.game-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.online-friends {
    color: #1a1a2e;
    font-size: 18px;
    margin-top: 10px;
}

/* 平板电脑适配 */
@media (min-width: 768px) {
    .home-container {
        padding: 30px 40px;
    }

    .avatar {
        width: 100px;
        height: 100px;
        margin: 0 auto 30px;
    }

    .title h1 {
        font-size: 56px;
    }

    .title p {
        font-size: 28px;
    }

    .nickname-input,
    .room-code-input {
        font-size: 22px;
        padding: 20px 24px;
    }

    .create-btn {
        font-size: 24px;
        padding: 20px 24px;
    }

    .games-container {
        gap: 20px;
    }

    .game-card {
        flex: 0 0 calc(25% - 15px);
        max-width: calc(25% - 15px);
    }

    .online-friends {
        font-size: 20px;
    }

    /* 房间页面 */
    .room-header h2 {
        font-size: 30px;
    }

    .player-card {
        min-width: 170px;
    }

    /* 游戏选择 */
    .game-types {
        gap: 22px;
    }

    .game-type-card img {
        width: 110px;
        height: 110px;
    }

    /* 答题游戏 */
    .timer {
        font-size: 52px;
    }

    .question-text {
        font-size: 26px;
    }

    .option-btn {
        font-size: 20px;
        padding: 22px 28px;
    }

    /* 绘画游戏 */
    .word-selection-area {
        padding: 45px 35px;
    }

    .word-item h4 {
        font-size: 22px;
    }

    #drawCanvas,
    #guessCanvas {
        width: 350px;
        height: 350px;
    }

    /* 类别选择 */
    .category-list {
        gap: 22px;
    }

    .category-btn {
        padding: 32px 22px;
        font-size: 21px;
    }

    /* 结果页面 */
    .result-icon {
        width: 200px;
        height: 200px;
    }

    #resultTitle {
        font-size: 40px;
    }
}

/* 桌面端适配 */
@media (min-width: 1024px) {
    #app {
        max-width: 1024px;
    }

    .home-container {
        padding: 40px 60px;
    }

    .game-card {
        flex: 0 0 calc(20% - 16px);
        max-width: calc(20% - 16px);
    }

    /* 房间页面 */
    .room-header {
        padding: 35px;
    }

    .room-header h2 {
        font-size: 32px;
    }

    .player-card {
        min-width: 180px;
        padding: 30px;
    }

    /* 游戏选择 */
    .game-types {
        gap: 25px;
    }

    .game-type-card {
        padding: 35px;
    }

    .game-type-card img {
        width: 120px;
        height: 120px;
    }

    /* 惩罚选择 */
    .punishment-options {
        gap: 15px;
    }

    /* 答题游戏 */
    .game-header {
        padding: 30px;
    }

    .timer {
        font-size: 56px;
    }

    .question-text {
        font-size: 28px;
    }

    /* 绘画游戏 */
    .word-item {
        padding: 25px;
    }

    #drawCanvas,
    #guessCanvas {
        width: 400px;
        height: 400px;
    }

    /* 类别选择 */
    .category-btn {
        padding: 35px 25px;
        font-size: 22px;
    }
}

/* 移动端优化 */
@media (max-width: 480px) {
    .home-container {
        padding: 15px;
    }

    .avatar {
        width: 70px;
        height: 70px;
    }

    .title h1 {
        font-size: 36px;
    }

    .title p {
        font-size: 20px;
    }

    .nickname-input,
    .room-code-input {
        font-size: 18px;
        padding: 14px 16px;
    }

    .create-btn {
        font-size: 20px;
        padding: 14px 16px;
    }

    .join-btn {
        padding: 0 20px;
        font-size: 18px;
    }

    .games-container {
        gap: 12px;
    }

    .game-card {
        flex: 0 0 calc(50% - 6px);
        max-width: calc(50% - 6px);
    }

    .online-friends {
        font-size: 16px;
    }
}

.subtitle {
    color: #666;
    font-size: 18px;
}

.form-container {
    padding: 30px;
}

.input {
    width: 100%;
    padding: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 18px;
    color: #333;
    background: white;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.input:focus {
    outline: none;
    border-color: #667eea;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 18px 30px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
}

.or {
    text-align: center;
    color: #999;
    margin: 20px 0;
}

.features {
    display: flex;
    justify-content: space-around;
    padding: 30px 20px;
    background: #f8f9fa;
    margin-top: 20px;
    border-radius: 15px;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
}

/* 房间页面样式 */
.room-header {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #4cc9f0 0%, #7209b7 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(76, 201, 240, 0.3);
}

.room-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.room-header p {
    font-size: 18px;
    opacity: 0.95;
}

.players-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.player-card {
    background: white;
    border: 3px solid #4cc9f0;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 4px 15px rgba(76, 201, 240, 0.2);
    transition: all 0.3s;
}

.player-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 201, 240, 0.4);
}

.player-card.ready {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f5e8 100%);
}

.player-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 12px;
}

.player-name {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

.role-label {
    font-size: 14px;
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    margin-left: 5px;
    font-weight: normal;
}

.selector-badge {
    background: #f39c12;
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    margin-left: 5px;
    font-size: 14px;
    font-weight: normal;
}

.player-status {
    font-size: 12px;
    color: #666;
}

.game-selection,
.punishment-selection {
    margin-bottom: 30px;
}

.game-selection h3,
.punishment-selection h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #7209b7;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.game-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 10px;
}

.game-type-card {
    background: white;
    border: 3px solid #4cc9f0;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(76, 201, 240, 0.2);
}

.game-type-card:hover {
    border-color: #7209b7;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(114, 9, 183, 0.3);
}

.game-type-card img {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.game-type-card h4 {
    color: #1a1a2e;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: bold;
}

.game-type-card p {
    font-size: 14px;
    color: #666;
}

.game-type-card.selected {
    border-color: #7209b7;
    background: linear-gradient(135deg, #f0f4ff 0%, #f5e8ff 100%);
    box-shadow: 0 4px 15px rgba(114, 9, 183, 0.3);
}

.punishment-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 10px;
}

.punishment-option {
    background: white;
    border: 2px solid #ff6b6b;
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.punishment-option:hover {
    border-color: #ff8a8a;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.punishment-option h4 {
    color: #1a1a2e;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: bold;
}

.punishment-option p {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.hidden {
    display: none !important;
}

/* 计时答题游戏样式 */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, #4cc9f0 0%, #7209b7 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(76, 201, 240, 0.3);
}

.timer {
    font-size: 48px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.timer.warning {
    color: #ff6b6b;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.progress {
    background: rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 20px;
    font-weight: bold;
}

.question-container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.question-text {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 35px;
    line-height: 1.6;
    color: #1a1a2e;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-btn {
    padding: 20px 25px;
    background: white;
    border: 2px solid #4cc9f0;
    border-radius: 12px;
    font-size: 18px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(76, 201, 240, 0.15);
    color: #1a1a2e;
}

.option-btn:hover {
    border-color: #7209b7;
    background: linear-gradient(135deg, #f0f4ff 0%, #f5e8ff 100%);
    transform: translateX(5px);
}

.option-btn.correct {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border-color: #4CAF50;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.option-btn.incorrect {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    border-color: #ff6b6b;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.score-board {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.player-score,
.opponent-score {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #1a1a2e;
}

.player-score {
    color: #4cc9f0;
}

/* 你画我猜游戏样式 */
.draw-header {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #4cc9f0 0%, #7209b7 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(76, 201, 240, 0.3);
}

.draw-header h2 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 词条选择界面 */
.word-selection-area {
    text-align: center;
    padding: 40px 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.word-selection-area h3 {
    font-size: 24px;
    color: #7209b7;
    margin-bottom: 25px;
    font-weight: bold;
}

.timer-display {
    text-align: center;
    padding: 18px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.word-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.word-item {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid #4cc9f0;
    box-shadow: 0 2px 8px rgba(76, 201, 240, 0.15);
}

.word-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 201, 240, 0.4);
    border-color: #7209b7;
}

.word-item h4 {
    font-size: 20px;
    color: #1a1a2e;
    margin-bottom: 8px;
    font-weight: bold;
}

.word-item p {
    font-size: 16px;
    color: #666;
}

/* 绘画工具 */
.drawing-tools {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
}

.tool-group {
    flex: 1;
}

.tool-group h4 {
    font-size: 18px;
    color: #7209b7;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.tool-btn {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #4cc9f0;
    border-radius: 8px;
    background: white;
    color: #4cc9f0;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
    box-shadow: 0 2px 6px rgba(76, 201, 240, 0.2);
}

.tool-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 201, 240, 0.4);
    background: linear-gradient(135deg, #4cc9f0 0%, #3ab0d8 100%);
    color: white;
}

.tool-btn.active {
    background: linear-gradient(135deg, #4cc9f0 0%, #7209b7 100%);
    color: white;
    border-color: #7209b7;
}

.tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 提示显示 */
.hint-display {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff4 100%);
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px solid #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.hint-display h3 {
    font-size: 22px;
    color: #4CAF50;
    margin-bottom: 15px;
    font-weight: bold;
}

.hint-display p {
    font-size: 18px;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.drawer-area,
.guesser-area {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.draw-info {
    text-align: center;
    padding: 18px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff4cc 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid #ff9800;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
    color: #1a1a2e;
}

#drawCanvas,
#guessCanvas {
    border: 3px solid #4cc9f0;
    border-radius: 12px;
    background: white;
    display: block;
    margin: 0 auto 25px;
    cursor: crosshair;
    max-width: 100%;
    box-shadow: 0 4px 15px rgba(76, 201, 240, 0.2);
}

.color-picker {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.color-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #4cc9f0;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(76, 201, 240, 0.2);
}

.color-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(76, 201, 240, 0.4);
}

.color-btn.active {
    border-color: #7209b7;
    box-shadow: 0 0 0 4px rgba(114, 9, 183, 0.4);
}

.brush-size {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.size-btn {
    padding: 10px 25px;
    background: white;
    border: 2px solid #4cc9f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(76, 201, 240, 0.2);
}

.size-btn:hover {
    border-color: #7209b7;
    background: linear-gradient(135deg, #f0f4ff 0%, #f5e8ff 100%);
}

.size-btn.active {
    background: linear-gradient(135deg, #4cc9f0 0%, #7209b7 100%);
    color: white;
    border-color: #7209b7;
}

.guess-input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.guess-input-field {
    width: 100%;
    padding: 18px;
    border: 2px solid #4cc9f0;
    border-radius: 12px;
    font-size: 18px;
    color: #1a1a2e !important;
    background: white !important;
    transition: border-color 0.3s;
    box-shadow: 0 2px 8px rgba(76, 201, 240, 0.15);
}

.guess-input-field:focus {
    outline: none;
    border-color: #7209b7;
    box-shadow: 0 4px 12px rgba(114, 9, 183, 0.3);
}

.guess-input-field::placeholder {
    color: #999;
}

.guess-history {
    max-height: 150px;
    overflow-y: auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4ff 100%);
    border-radius: 12px;
    padding: 12px;
    border: 2px solid #4cc9f0;
}

.guess-item {
    padding: 10px 14px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    color: #1a1a2e;
}

.guess-item.correct {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.guess-item.incorrect {
    color: #666;
}

/* 结果页面样式 */
.result-container {
    text-align: center;
    padding: 50px 30px;
}

.result-icon {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin-bottom: 30px;
    animation: bounce 1s ease-in-out;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#resultTitle {
    font-size: 36px;
    color: #7209b7;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#resultMessage {
    font-size: 20px;
    color: #1a1a2e;
    margin-bottom: 35px;
    line-height: 1.6;
}

.punishment-area {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 35px;
    border: 2px solid #ff6b6b;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
}

.punishment-area h3 {
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: bold;
}

.punishment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.punishment-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid #ff6b6b;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.15);
}

.punishment-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    border-color: #ff8a8a;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
}

.punishment-item h4 {
    font-size: 18px;
    color: #1a1a2e;
    margin-bottom: 8px;
    font-weight: bold;
}

.punishment-item p {
    font-size: 16px;
    color: #666;
}

.result-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-direction: column;
}

.result-buttons .btn {
    margin-top: 10px;
}

/* 类别选择页面样式 */
.category-selection-container {
    text-align: center;
    padding: 40px 30px;
}

.category-selection-container h2 {
    font-size: 32px;
    color: #7209b7;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#selectorInfo {
    font-size: 20px;
    color: #1a1a2e;
    margin-bottom: 30px;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.category-btn {
    padding: 30px 20px;
    border: 3px solid #4cc9f0;
    border-radius: 15px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
    color: #4cc9f0;
    box-shadow: 0 2px 8px rgba(76, 201, 240, 0.2);
}

.category-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 201, 240, 0.4);
    background: linear-gradient(135deg, #4cc9f0 0%, #7209b7 100%);
    color: white;
    border-color: #7209b7;
}

.category-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.punishment-item {
    background: white;
    border: 2px solid #ff6b6b;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.punishment-item:hover {
    background: #ff6b6b;
    color: white;
    transform: translateY(-2px);
}

.punishment-item h4 {
    margin-bottom: 5px;
}

.punishment-item p {
    font-size: 12px;
    opacity: 0.8;
}

/* 消息提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 1000;
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast.show {
    display: block;
}

/* 响应式 */
@media (max-width: 768px) {
    #app {
        max-width: 100%;
        margin: 0;
        box-shadow: none;
    }

    .page {
        padding: 20px;
    }

    .title {
        font-size: 32px;
    }

    .logo {
        width: 120px;
        height: 120px;
    }

    .player-avatar {
        width: 60px;
        height: 60px;
    }

    .game-type-card img {
        width: 80px;
        height: 80px;
    }

    .timer {
        font-size: 36px;
    }

    .question-text {
        font-size: 20px;
    }

    .option-btn {
        font-size: 16px;
        padding: 15px 20px;
    }

    /* 房间页面移动端优化 */
    .room-header h2 {
        font-size: 24px;
    }

    .player-card {
        min-width: 140px;
        padding: 15px;
    }

    /* 游戏选择移动端 */
    .game-types {
        gap: 12px;
    }

    .game-type-card {
        padding: 18px;
    }

    /* 惩罚选择移动端 */
    .punishment-options {
        gap: 8px;
    }

    /* 答题游戏移动端 */
    .question-text {
        font-size: 18px;
    }

    /* 绘画游戏移动端 */
    #drawCanvas,
    #guessCanvas {
        width: 280px;
        height: 280px;
    }

    .word-list {
        gap: 10px;
    }

    /* 类别选择移动端 */
    .category-list {
        gap: 12px;
    }

    .category-btn {
        padding: 20px 15px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 28px;
    }

    .logo {
        width: 100px;
        height: 100px;
    }

    .header {
        padding: 40px 20px;
    }

    .game-types {
        grid-template-columns: 1fr;
    }

    .draw-header h2 {
        font-size: 24px;
    }

    /* 更多移动端优化 */
    .room-header {
        padding: 18px;
    }

    .players-container {
        gap: 12px;
    }

    .player-card {
        min-width: 120px;
        padding: 12px;
    }

    .game-header {
        padding: 18px;
    }

    .timer {
        font-size: 32px;
    }

    .question-container {
        padding: 25px;
    }

    #drawCanvas,
    #guessCanvas {
        width: 250px;
        height: 250px;
    }

    .drawing-tools {
        flex-direction: column;
        gap: 15px;
    }

    .color-picker {
        gap: 8px;
    }

    .color-btn {
        width: 40px;
        height: 40px;
    }

    .result-icon {
        width: 150px;
        height: 150px;
    }

    #resultTitle {
        font-size: 28px;
    }
}
