/* 听一听页面的专用样式 */

/* 语音助手区域 */
.voice-assistant {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.assistant-avatar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 30px;
    text-align: center;
    color: white;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.status-text {
    font-size: 0.9em;
    opacity: 0.9;
}

/* 对话区域 */
.conversation-area {
    padding: 20px;
}

.message-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.message {
    display: flex;
    margin-bottom: 15px;
    gap: 12px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: #e3f2fd;
    color: #1976d2;
}

.assistant-message .message-avatar {
    background: #f3e5f5;
    color: #7b1fa2;
}

.message-content {
    flex: 1;
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
}

.user-message .message-content {
    background: #e3f2fd;
    margin-left: auto;
    border-bottom-right-radius: 6px;
}

.assistant-message .message-content {
    background: #f3e5f5;
    border-bottom-left-radius: 6px;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
}

.message-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* 输入区域 */
.input-area {
    border-top: 1px solid #eee;
    padding: 20px;
}

.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#userInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease;
}

#userInput:focus {
    border-color: #667eea;
}

.send-btn, .voice-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.send-btn {
    background: #4CAF50;
    color: white;
}

.send-btn:hover {
    background: #45a049;
    transform: scale(1.1);
}

.voice-btn {
    background: #ff9800;
    color: white;
}

.voice-btn:hover {
    background: #f57c00;
    transform: scale(1.1);
}

.input-hints {
    text-align: center;
}

.hint-text {
    color: #666;
    font-size: 0.9em;
}

/* 学习主题 */
.learning-topics {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.learning-topics h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5em;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.topic-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.topic-card:hover {
    background: white;
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.topic-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.topic-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.topic-card p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

/* 语音控制 */
.voice-controls {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 30px;
}

.voice-controls h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5em;
}

.control-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-item label {
    font-weight: bold;
    color: #2c3e50;
}

.control-item input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.control-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.control-item select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease;
}

.control-item select:focus {
    border-color: #667eea;
}

.control-item span {
    color: #666;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .topic-grid {
        grid-template-columns: 1fr;
    }
    
    .control-panel {
        grid-template-columns: 1fr;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    .send-btn, .voice-btn {
        width: 100%;
        border-radius: 25px;
    }
    
    .message-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .assistant-avatar {
        padding: 20px;
    }
    
    .avatar-circle {
        width: 60px;
        height: 60px;
        font-size: 2em;
    }
    
    .conversation-area {
        padding: 15px;
    }
    
    .input-area {
        padding: 15px;
    }
} 