/* 输入区域状态样式 */
.input-area.waiting {
    background: rgba(139, 90, 60, 0.1);
    border-top-color: #8b5a3c;
}

.input-area.waiting #playerInput {
    background: #2a1f1a;
    border-color: #8b5a3c;
    color: #8b5a3c;
    cursor: not-allowed;
}

.input-area.error {
    background: rgba(220, 53, 69, 0.1);
    border-top-color: #dc3545;
}

.input-area.error #playerInput {
    border-color: #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
}

.input-area.normal #playerInput:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
}

/* 错误提示动画 */
@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
}

/* 按钮状态样式 */
#sendAction:disabled {
    background: linear-gradient(135deg, #666 0%, #555 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#sendAction:disabled:hover {
    background: linear-gradient(135deg, #666 0%, #555 100%);
    transform: none;
}

/* 输入框自适应高度 */
#playerInput {
    min-height: 60px;
    max-height: 120px;
    overflow-y: auto;
    resize: vertical;
    transition: all 0.3s ease;
}

/* 游戏结束对话框动画 */
@keyframes dialogFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#gameOverDialog > div {
    animation: dialogFadeIn 0.5s ease-out;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .input-container {
        flex-direction: column;
        gap: 15px;
    }
    
    #playerInput {
        min-height: 80px;
    }
    
    #sendAction {
        width: 100%;
        padding: 20px;
    }
}
