/* AI Conversation Mode Styles */

.conversation-mode-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.mode-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: #f5f5f5;
    color: #666;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn:hover {
    background: #e0e0e0;
}

.mode-btn.active {
    background: #1a73e8;
    color: white;
}

.difficulty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.difficulty-select {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.conversation-display {
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f9f9f9;
}

.conversation-messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    align-self: flex-end;
    background: #1a73e8;
    color: white;
    margin-left: auto;
}

.ai-message {
    align-self: flex-start;
    background: white;
    border: 1px solid #e0e0e0;
}

.message-content strong {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    opacity: 0.8;
}

.cultural-tip-inline {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
}

.tip-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tip-icon {
    font-size: 20px;
}

.cultural-tips-panel {
    background: #e8f4fd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.cultural-tips-panel h4 {
    margin-top: 0;
    color: #1a73e8;
}

.cultural-tip-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.cultural-tip-item h5 {
    margin-top: 0;
    color: #333;
}

.tip-example {
    margin-top: 8px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
}

.input-panel {
    display: flex;
    gap: 10px;
    align-items: center;
}

.voice-input-btn {
    padding: 12px 24px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    min-width: 120px;
}

.voice-input-btn:hover {
    background: #45a049;
}

.voice-input-btn.recording {
    background: #f44336;
    animation: pulse 1.5s infinite;
}

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

.text-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.text-input:focus {
    outline: none;
    border-color: #1a73e8;
}

.send-btn {
    padding: 12px 24px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.send-btn:hover {
    background: #1557b0;
}

.feedback-panel {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #f44336;
}

/* Enhanced Feedback Styles */

.feedback-content.enhanced {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.transcript-comparison {
    margin-bottom: 20px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
}

.score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.score-item {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.score-label {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.score-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
}

.word-heat-map {
    margin: 20px 0;
}

.word-heat-map h5 {
    margin-bottom: 10px;
    color: #333;
}

.heat-map-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.heat-word {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    transition: transform 0.2s;
    cursor: help;
}

.heat-word:hover {
    transform: translateY(-2px);
}

.feedback-messages {
    margin-top: 20px;
}

.feedback-item {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid;
}

.feedback-item.excellent {
    background: #e8f5e9;
    border-color: #4CAF50;
}

.feedback-item.good {
    background: #f1f8e9;
    border-color: #8BC34A;
}

.feedback-item.fair {
    background: #fff3e0;
    border-color: #FF9800;
}

.feedback-item.needs-improvement,
.feedback-item.improvement {
    background: #ffebee;
    border-color: #f44336;
}

/* Responsive Design */

@media (max-width: 768px) {
    .conversation-mode-container {
        padding: 15px;
        margin: 10px;
    }

    .mode-selector {
        flex-direction: column;
    }

    .input-panel {
        flex-direction: column;
    }

    .voice-input-btn,
    .send-btn {
        width: 100%;
    }

    .score-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .message {
        max-width: 90%;
    }
}
