/**
 * Simulation Styles
 */

/* Container */
.simulation-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.simulation-header {
    text-align: center;
    margin-bottom: 2rem;
}

.simulation-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.simulation-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Scenario Grid */
.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.scenario-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.scenario-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.scenario-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.scenario-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.scenario-card p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.scenario-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-beginner {
    background: #d1fae5;
    color: #065f46;
}

.badge-intermediate {
    background: #dbeafe;
    color: #1e40af;
}

.badge-advanced {
    background: #fee2e2;
    color: #991b1b;
}

.time {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Scenario Details */
.scenario-details {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.scenario-icon-large {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.scenario-description {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.scenario-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.tips-box {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.tips-box h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.tips-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.tips-box li {
    margin-bottom: 0.5rem;
    color: #6b7280;
}

/* Chat Interface */
.chat-mode {
    max-width: 100%;
    padding: 0;
    height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chat-title {
    flex: 1;
}

.chat-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    transition: width 0.3s ease;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f9fafb;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

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

.ai-message {
    justify-content: flex-start;
}

.user-message {
    justify-content: flex-end;
}

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

.message-content {
    max-width: 70%;
}

.message-text {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    line-height: 1.5;
}

.user-message .message-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.message-evaluation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.message-evaluation.success {
    color: #10b981;
}

.message-evaluation.warning {
    color: #f59e0b;
}

.message-evaluation.error {
    color: #ef4444;
}

.eval-icon {
    font-size: 1rem;
}

/* Chat Input */
.chat-input-area {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
}

.feedback-area {
    margin-bottom: 0.5rem;
}

.feedback {
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.feedback.success {
    background: #d1fae5;
    color: #065f46;
}

.feedback.warning {
    background: #fef3c7;
    color: #92400e;
}

.feedback.error {
    background: #fee2e2;
    color: #991b1b;
}

.suggestions {
    margin-top: 0.5rem;
}

.suggestion {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    opacity: 0.9;
}

.input-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.btn-microphone {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-microphone:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.btn-microphone:active {
    transform: scale(0.95);
}

.btn-microphone.listening {
    animation: pulse 1.5s infinite;
    background: #ef4444;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    }
}

.mic-status {
    font-size: 0.9rem;
    color: #6b7280;
}

.text-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.text-input:focus {
    border-color: var(--primary-color);
}

.btn-send {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-send:hover {
    transform: scale(1.05);
}

/* Results */
.results-mode {
    max-width: 800px;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.overall-score {
    margin-top: 1.5rem;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto 0.5rem;
}

.score-label {
    font-size: 1.2rem;
    font-weight: 600;
}

.results-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-item span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.stat-item small {
    display: block;
    color: #6b7280;
    margin-top: 0.25rem;
}

.conversation-review {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    max-height: 400px;
    overflow-y: auto;
}

.conversation-review h3 {
    margin-bottom: 1rem;
}

.review-message {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    background: var(--light-bg);
}

.review-message.user-message {
    background: #fff5f0;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.review-score {
    font-weight: 600;
    white-space: nowrap;
    margin-left: 1rem;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn-back {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(255,255,255,0.3);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-custom {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.btn-outline-custom {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-custom:hover {
    background: var(--primary-color);
    color: white;
}

/* Alert styles */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .scenario-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .scenario-card {
        padding: 1.5rem;
    }
    
    .scenario-info {
        gap: 1rem;
    }
    
    .chat-mode {
        height: calc(100vh - 80px);
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .results-stats {
        gap: 1rem;
    }
    
    .stat-item i {
        font-size: 1.5rem;
    }
    
    .stat-item span {
        font-size: 1.2rem;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .simulation-header h2 {
        font-size: 1.5rem;
    }
    
    .scenario-icon {
        font-size: 2.5rem;
    }
    
    .btn-microphone {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }
}
