﻿/* Основные стили сценария */
:root {
    --primary-color: #0f4cff;
    --primary-light: #3a6bff;
    --primary-dark: #0028a8;
    --secondary-color: #00f2ff;
    --accent-color: #00ff88;
    --error-color: #ff2d75;
    --text-color: #ffffff;
    --text-secondary: #c3d1ff;
    --background-dark: #0a0a20;
    --background-light: #121235;
}

body {
    font-family: 'Rajdhani', 'Roboto', sans-serif;
    background: var(--background-dark);
    color: var(--text-color);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Анимация перехода между страницами */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.page-transition.active {
    opacity: 1;
}

/* Контейнер сценария */
.scenario-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Шапка сценария */
.scenario-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.back-button {
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.back-button:hover {
    color: var(--accent-color);
    transform: translateX(-3px);
}

.scenario-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin: 20px 0 10px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
}

.scenario-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

/* Прогресс бар */
.scenario-progress {
    margin: 30px 0;
    position: relative;
}

.progress-bar {
    height: 6px;
    background: rgba(58, 107, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    content: '';
    display: block;
    height: 100%;
    width: 20%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: width 0.5s ease;
}

.progress-text {
    position: absolute;
    right: 0;
    top: -25px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Контент сценария */
.scenario-content {
    background: rgba(18, 18, 53, 0.7);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(58, 107, 255, 0.2);
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.scenario-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 242, 255, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 136, 0.03) 0%, transparent 20%);
    z-index: -1;
}

.scenario-question {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.scenario-description {
    margin-bottom: 20px;
    line-height: 1.6;
}

.scenario-image {
    max-width: 100%;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid rgba(0, 242, 255, 0.2);
}

/* Варианты ответов */
.scenario-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.action-button {
    position: relative;
    display: block;
    padding: 15px 20px;
    background: rgba(15, 76, 255, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(0, 242, 255, 0.3);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.action-button:hover {
    background: rgba(15, 76, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 114, 255, 0.2);
    border-color: var(--accent-color);
}

.action-button.correct {
    background: rgba(0, 255, 136, 0.15);
    border-color: var(--accent-color);
}

.action-button.incorrect {
    background: rgba(255, 45, 117, 0.15);
    border-color: var(--error-color);
}

/* Обратная связь */
.scenario-feedback {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.feedback-title {
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.feedback-title .icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.feedback-correct {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-color);
}

.feedback-correct .feedback-title {
    color: var(--accent-color);
}

.feedback-incorrect {
    background: rgba(255, 45, 117, 0.1);
    border: 1px solid var(--error-color);
}

.feedback-incorrect .feedback-title {
    color: var(--error-color);
}

.feedback-explanation {
    line-height: 1.6;
}

/* Результат сценария */
.scenario-result {
    display: block !important;
    position: relative !important;
    z-index: 1000 !important;
    opacity: 1 !important;
    background: var(--background-light) !important;
    padding: 30px !important;
    border-radius: 10px !important;
    margin: 20px 0 !important;
    border: 1px solid var(--primary-color) !important;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.result-title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.result-score {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.result-message {
    margin-bottom: 30px;
    line-height: 1.6;
}

.restart-button {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.restart-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 114, 255, 0.3);
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Адаптивность */
@media (max-width: 768px) {
    .scenario-container {
        padding: 15px;
    }
    
    .scenario-header h1 {
        font-size: 2rem;
        margin-top: 30px;
    }
    
    .scenario-content {
        padding: 20px;
    }
    
    .scenario-actions {
        grid-template-columns: 1fr;
    }
}