/* 在线版本专用样式 */

/* 主菜单样式 */
.menu-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.menu-container h1 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.menu-container p {
    color: #718096;
    margin-bottom: 40px;
    font-size: 1.2em;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu-btn {
    padding: 20px 40px;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.menu-btn:nth-child(2) {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.menu-btn:nth-child(3) {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

/* 房间相关样式 */
.room-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    width: 100%;
}

.room-container h2 {
    text-align: center;
    color: #4a5568;
    margin-bottom: 30px;
}

.room-info {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.room-info p {
    margin: 10px 0;
    color: #4a5568;
    font-weight: bold;
}

.room-info span {
    color: #667eea;
    font-weight: bold;
}

/* 房间列表样式 */
.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f7fafc;
    border-radius: 15px;
    margin-bottom: 15px;
    border: 2px solid transparent;
    transition: all 0.3s;
    cursor: pointer;
}

.room-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.room-item.available {
    background: #c6f6d5;
    border-color: #48bb78;
}

.room-item.full {
    background: #fed7d7;
    border-color: #f56565;
    opacity: 0.7;
    cursor: not-allowed;
}

.room-item.playing {
    background: #bee3f8;
    border-color: #4299e1;
}

.room-info-left {
    flex: 1;
}

.room-name {
    font-weight: bold;
    color: #4a5568;
    font-size: 18px;
    margin-bottom: 5px;
}

.room-status {
    color: #718096;
    font-size: 14px;
}

.room-info-right {
    text-align: right;
}

.room-players {
    font-weight: bold;
    color: #667eea;
}

.room-id {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 5px;
}

/* 按钮样式 */
.back-btn {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 20px;
    width: 100%;
}

.back-btn:hover {
    transform: translateY(-2px);
}

.refresh-btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
    margin: 20px 10px 0 0;
}

.refresh-btn:hover {
    transform: translateY(-2px);
}

/* 房间等待界面样式 */
.room-controls {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.room-controls button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.ready-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    font-weight: bold;
}

.ready-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.3);
}

.ready-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.leave-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    font-weight: bold;
}

.leave-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.3);
}

.start-game-btn {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    font-weight: bold;
}

.start-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 137, 54, 0.3);
}

.start-game-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.room-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
}

.room-status.waiting {
    background: #bee3f8;
    color: #2b6cb0;
}

.room-status.ready {
    background: #c6f6d5;
    color: #22543d;
}

.room-status.error {
    background: #fed7d7;
    color: #742a2a;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .menu-container {
        padding: 30px 20px;
    }
    
    .room-container {
        padding: 30px 20px;
    }
    
    .room-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .room-controls {
        flex-direction: column;
    }
    
    .menu-buttons {
        gap: 15px;
    }
    
    .menu-btn {
        padding: 15px 30px;
        font-size: 16px;
    }
}

/* 屏幕显示/隐藏逻辑 */
.hidden {
    display: none !important;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.screen:not(.hidden) {
    animation: fadeIn 0.5s ease-out;
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.online {
    background: #48bb78;
}

.status-indicator.offline {
    background: #e53e3e;
}

.status-indicator.playing {
    background: #4299e1;
}

/* 复制房间ID功能 */
.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 10px;
}

.copy-btn:hover {
    background: #5a67d8;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background: #48bb78;
}

.notification.error {
    background: #f56565;
}

.notification.info {
    background: #667eea;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* 新功能样式 */
.word-input-container {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.word-input-row {
    display: flex;
    gap: 8px;
}

.target-player-select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    flex: 1;
}

.target-player-select:focus {
    outline: none;
    border-color: #667eea;
}

.word-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.word-input:focus {
    outline: none;
    border-color: #667eea;
}

.word-submit {
    padding: 8px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.word-submit:hover {
    background: #5a67d8;
}

.word-submit:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.player-word {
    font-size: 16px;
    font-weight: bold;
    color: #2d3748;
    min-height: 24px;
    padding: 8px;
    background: #fef5e7;
    border-radius: 5px;
    margin-top: 8px;
    text-align: center;
}

.player-word.hidden {
    display: none !important;
}

.word-status {
    font-size: 12px;
    color: #718096;
    margin-top: 5px;
    text-align: center;
    min-height: 16px;
}

.word-status.filled {
    color: #48bb78;
    font-weight: bold;
}

.word-status.error {
    color: #f56565;
    font-weight: bold;
}

/* 头像选择样式 */
.avatar-selection {
    margin: 20px 0;
}

.avatar-selection label {
    display: block;
    margin-bottom: 10px;
    color: #4a5568;
    font-weight: bold;
    text-align: center;
}

.avatar-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.avatar-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

.avatar-option:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

.avatar-option.selected {
    border-color: #48bb78;
    box-shadow: 0 0 10px rgba(72, 187, 120, 0.5);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .word-input-row {
        flex-direction: column;
    }
    
    .target-player-select,
    .word-input,
    .word-submit {
        width: 100%;
    }
    
    .avatar-options {
        gap: 10px;
    }
    
    .avatar-option {
        width: 40px;
        height: 40px;
    }
}



/* 游戏控制按钮 */
.laugh-btn {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    font-weight: bold;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.laugh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 137, 54, 0.3);
}

.laugh-btn:active {
    transform: translateY(0);
}

/* 游戏界面样式 */
.game-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h2 {
    color: #4a5568;
    margin-bottom: 10px;
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: #718096;
    font-weight: bold;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.seat {
    background: #f7fafc;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.seat:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.seat.occupied {
    border-color: #48bb78;
    background: #f0fff4;
}

.seat.current-turn {
    border-color: #ed8936;
    background: #fffaf0;
    box-shadow: 0 5px 15px rgba(237, 137, 54, 0.3);
}

.player-avatar {
    text-align: center;
    margin-bottom: 15px;
}

.avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-placeholder:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.player-info {
    text-align: center;
}

.player-name {
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 16px;
}

.player-word {
    background: #e2e8f0;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: bold;
    color: #2d3748;
    display: none;
}

.player-word.hidden {
    display: none !important;
}

.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.game-controls button {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

/* 响应式游戏界面 */
@media (max-width: 768px) {
    .game-board {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-controls {
        flex-direction: column;
    }
}

/* 玩家列表样式 */
.players-list {
    background: #f7fafc;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.players-list h3 {
    color: #4a5568;
    margin-bottom: 15px;
    text-align: center;
}

.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 2px solid transparent;
}

.player-item.ready {
    border-color: #48bb78;
    background: #f0fff4;
}

.player-item .player-name {
    font-weight: bold;
    color: #4a5568;
}

.player-item .player-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.player-item.ready .player-status {
    background: #48bb78;
    color: white;
}

.player-item:not(.ready) .player-status {
    background: #e2e8f0;
    color: #718096;
}

.host-badge {
    background: #ed8936;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: bold;
} 