* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fafafa;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: #333;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Анимация самолетов */
.airplane-animation {
    position: fixed;
    font-size: 14px;
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
    color: #ccc;
}

.airplane-1 {
    top: 5%;
    animation: flyAcross 25s linear infinite;
    animation-delay: 0s;
}

.airplane-2 {
    top: 15%;
    animation: flyAcross 30s linear infinite;
    animation-delay: 2s;
}

.airplane-3 {
    top: 25%;
    animation: flyAcross 22s linear infinite;
    animation-delay: 5s;
}

.airplane-4 {
    top: 35%;
    animation: flyAcross 28s linear infinite;
    animation-delay: 8s;
}

.airplane-5 {
    top: 45%;
    animation: flyAcross 26s linear infinite;
    animation-delay: 11s;
}

.airplane-6 {
    top: 55%;
    animation: flyAcross 24s linear infinite;
    animation-delay: 14s;
}

.airplane-7 {
    top: 65%;
    animation: flyAcross 29s linear infinite;
    animation-delay: 17s;
}

.airplane-8 {
    top: 75%;
    animation: flyAcross 27s linear infinite;
    animation-delay: 20s;
}

.airplane-9 {
    top: 85%;
    animation: flyAcross 23s linear infinite;
    animation-delay: 23s;
}

.airplane-10 {
    top: 95%;
    animation: flyAcross 31s linear infinite;
    animation-delay: 26s;
}

@keyframes flyAcross {
    0% {
        left: -50px;
        transform: rotate(0deg);
    }
    20% {
        left: 20%;
        transform: rotate(2deg);
    }
    40% {
        left: 40%;
        transform: rotate(4deg);
    }
    60% {
        left: 60%;
        transform: rotate(6deg);
    }
    80% {
        left: 80%;
        transform: rotate(8deg);
    }
    100% {
        left: 110%;
        transform: rotate(10deg);
    }
}

/* Темная тема для самолетиков */
body.dark-theme .airplane-animation {
    color: #555 !important;
    opacity: 0.2 !important;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

header {
    background: white;
    color: #333;
    padding: 40px 40px 20px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #eee;
}

/* Убираем брендинг */
header::after,
header::before {
    display: none;
}

header h1 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
}

.subtitle {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

.tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #eee;
    padding: 0 40px;
}

.tab-btn {
    flex: 1;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: #333;
    background: #f8f9fa;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: white;
}

.tab-content {
    display: none;
    padding: 40px;
}

.tab-content.active {
    display: block;
}

.info-block {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 32px;
    border-left: 3px solid #007bff;
}

.info-block h2 {
    color: #1a1a1a;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
}

.info-block p {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #555;
}

.thanks {
    font-weight: bold;
    color: #667eea;
    margin-top: 15px;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
}

.form-section h3 {
    color: #1e3c72;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.form-section h4 {
    color: #2a5298;
    margin: 20px 0 15px 0;
}

.instruction {
    font-style: italic;
    color: #666;
    margin-bottom: 15px;
}

.form-group, .criteria-group {
    margin-bottom: 15px;
}

.form-group label, .criteria-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input, .criteria-group input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border 0.3s;
}

.form-group input:focus, .criteria-group input:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

.scenario-ratings {
    background: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.btn-primary {
    background: #007bff;
    color: white;
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    margin: 20px 0;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.results-container, .experts-container {
    min-height: 400px;
}

.result-card {
    background: white;
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.result-card h3 {
    color: #1a1a1a;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

.result-table th, .result-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.result-table th {
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-table tr:hover {
    background: #f8f9fa;
}

.highlight {
    background: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid #28a745;
}

.chart-container {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
    }
    
    header h1 {
        font-size: 22px;
    }
    
    .tabs {
        flex-direction: column;
    }
}

.scenarios-description {
    margin-bottom: 30px;
}

.scenario-card {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.scenario-card h3 {
    color: #1e3c72;
    margin-bottom: 15px;
}

.scenario-card p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.scenario-card ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.scenario-card li {
    margin-bottom: 5px;
    line-height: 1.5;
}

.criteria-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.criteria-table th {
    background: #1e3c72;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
}

.criteria-table td {
    padding: 10px;
    border: 1px solid #ddd;
}

.criteria-table td:first-child {
    font-weight: 500;
    background: #f9f9f9;
}

.criteria-table input {
    width: 60px;
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.criteria-table input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.welcome {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left-color: #2a5298;
}

.instruction {
    background: #fff8e1;
    border-left-color: #ffa726;
}

.instruction h4 {
    color: #e65100;
    margin: 15px 0 8px 0;
    font-size: 16px;
}

.required {
    color: #d32f2f;
    font-weight: bold;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    padding: 8px;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.radio-group label:hover {
    background: #f5f5f5;
}

.radio-group input[type="radio"] {
    margin-right: 10px;
    width: auto;
}

.scale-legend {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border-left: 4px solid #4caf50;
}

.scale-legend p {
    margin: 5px 0;
    font-size: 14px;
}

.ranking-container {
    margin: 20px 0;
}

.ranking-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.ranking-item label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1e3c72;
}

.ranking-item select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    transition: border 0.3s;
}

.ranking-item select:focus {
    outline: none;
    border-color: #667eea;
}

.chart-box {
    background: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chart-box h4 {
    color: #1e3c72;
    margin-bottom: 15px;
    text-align: center;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-label {
    min-width: 200px;
    font-weight: 500;
    color: #333;
}

.bar-container {
    flex: 1;
    background: #e0e0e0;
    border-radius: 5px;
    height: 30px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
}

.pie-chart {
    width: 300px;
    height: 300px;
    margin: 20px auto;
    position: relative;
}

.radar-chart {
    width: 400px;
    height: 400px;
    margin: 20px auto;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.ranking-chart {
    margin: 30px 0;
}

.ranking-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 300px;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.ranking-bar {
    flex: 1;
    max-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ranking-bar-fill {
    width: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px 5px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: height 0.5s ease;
}

.ranking-bar-label {
    text-align: center;
    font-weight: 600;
    color: #1e3c72;
    font-size: 14px;
}

.btn-view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s;
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.btn-back {
    background: #f5f5f5;
    color: #333;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
    transition: background 0.2s;
}

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

.expert-detail-container {
    padding: 20px;
}

.expert-detail h2 {
    color: #1e3c72;
    margin-bottom: 20px;
}

.formula-box {
    background: #fff8e1;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid #ffa726;
}

.formula-box h4 {
    color: #e65100;
    margin-bottom: 15px;
}

.formula {
    background: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    border-left: 3px solid #ff9800;
}

.formula p {
    margin: 5px 0;
    line-height: 1.6;
}

.formula strong {
    color: #1e3c72;
}

/* Темная тема */
body.dark-theme {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
}

body.dark-theme .container {
    background: #1a1f3a;
    color: #e8eaf6;
}

body.dark-theme header {
    background: linear-gradient(135deg, #0d1117 0%, #1e2a47 100%);
    color: #ffffff;
}

body.dark-theme .subtitle {
    color: #b8c5d6;
}

body.dark-theme .tabs {
    background: #0d1117;
    border-bottom-color: #30363d;
}

body.dark-theme .tab-btn {
    color: #c9d1d9;
}

body.dark-theme .tab-btn:hover {
    background: #21262d;
}

body.dark-theme .tab-btn.active {
    background: #1a1f3a;
    border-bottom-color: #58a6ff;
    color: #ffffff;
}

body.dark-theme .info-block {
    background: #21262d;
    color: #e8eaf6;
    border-left-color: #58a6ff;
}

body.dark-theme .info-block h2,
body.dark-theme .info-block h3,
body.dark-theme .info-block h4 {
    color: #58a6ff;
}

body.dark-theme .form-section {
    background: #21262d;
    color: #e8eaf6;
}

body.dark-theme .form-section h3 {
    color: #58a6ff;
    border-bottom-color: #30363d;
}

body.dark-theme .form-section h4 {
    color: #79c0ff;
}

body.dark-theme .form-group label,
body.dark-theme .criteria-group label {
    color: #e8eaf6;
}

body.dark-theme .result-card {
    background: #21262d;
    color: #e8eaf6;
    border-left-color: #58a6ff;
}

body.dark-theme .result-card h3,
body.dark-theme .result-card h4 {
    color: #58a6ff;
}

body.dark-theme .scenario-card {
    background: #21262d;
    color: #e8eaf6;
    border-left-color: #58a6ff;
}

body.dark-theme .scenario-card h3 {
    color: #58a6ff;
}

body.dark-theme .scenario-card p,
body.dark-theme .scenario-card li {
    color: #c9d1d9;
}

body.dark-theme .form-group input,
body.dark-theme .criteria-group input,
body.dark-theme textarea,
body.dark-theme select {
    background: #0d1117;
    color: #e8eaf6;
    border-color: #30363d;
}

body.dark-theme .form-group input:focus,
body.dark-theme .criteria-group input:focus,
body.dark-theme textarea:focus,
body.dark-theme select:focus {
    border-color: #58a6ff;
}

body.dark-theme .result-table {
    background: #21262d;
    color: #e8eaf6;
}

body.dark-theme .result-table th {
    background: #0d1117;
    color: #ffffff;
}

body.dark-theme .result-table td {
    border-color: #30363d;
    color: #e8eaf6;
}

body.dark-theme .result-table tr:hover {
    background: #30363d;
}

body.dark-theme .criteria-table {
    background: #21262d;
    color: #e8eaf6;
}

body.dark-theme .criteria-table th {
    background: #0d1117;
    color: #ffffff;
}

body.dark-theme .criteria-table td {
    border-color: #30363d;
    color: #e8eaf6;
}

body.dark-theme .criteria-table td:first-child {
    background: #30363d;
    color: #e8eaf6;
}

body.dark-theme .formula-box {
    background: #21262d;
    border-left-color: #f0883e;
}

body.dark-theme .formula-box h4 {
    color: #ffa657;
}

body.dark-theme .formula {
    background: #0d1117;
    border-left-color: #f0883e;
    color: #e8eaf6;
}

body.dark-theme .formula p {
    color: #c9d1d9;
}

body.dark-theme .formula strong {
    color: #79c0ff;
}

body.dark-theme .chart-box {
    background: #21262d;
}

body.dark-theme .chart-box h4 {
    color: #58a6ff;
}

body.dark-theme .bar-label {
    color: #e8eaf6;
}

body.dark-theme .bar-container {
    background: #30363d;
}

body.dark-theme .ranking-item {
    background: #21262d;
    border-left-color: #58a6ff;
}

body.dark-theme .ranking-item label {
    color: #58a6ff;
}

body.dark-theme .ranking-bar-label {
    color: #e8eaf6;
}

body.dark-theme .scale-legend {
    background: #21262d;
    border-left-color: #3fb950;
}

body.dark-theme .scale-legend p {
    color: #c9d1d9;
}

body.dark-theme .instruction {
    background: #21262d;
    border-left-color: #f0883e;
    color: #c9d1d9;
}

body.dark-theme .welcome {
    background: linear-gradient(135deg, #1e2a47 0%, #2d1b69 100%);
    border-left-color: #58a6ff;
}

body.dark-theme .welcome p {
    color: #e8eaf6;
}

body.dark-theme .btn-view {
    background: linear-gradient(135deg, #1f6feb 0%, #7c3aed 100%);
}

body.dark-theme .btn-back {
    background: #21262d;
    color: #e8eaf6;
    border-color: #30363d;
}

body.dark-theme .btn-back:hover {
    background: #30363d;
}

body.dark-theme .highlight {
    background: #9e6a03;
    color: #ffffff;
}

body.dark-theme .success-message {
    background: #0d4429;
    color: #aff5b4;
    border-left-color: #3fb950;
}

body.dark-theme .radio-group label {
    background: #21262d;
    color: #e8eaf6;
}

body.dark-theme .radio-group label:hover {
    background: #30363d;
}

body.dark-theme .thanks {
    color: #79c0ff;
}

body.dark-theme .required {
    color: #ff7b72;
}

body.dark-theme .legend-item span {
    color: #e8eaf6;
}

body.dark-theme p,
body.dark-theme li,
body.dark-theme em {
    color: #c9d1d9;
}

/* Кнопки управления */
.header-controls {
    position: absolute;
    top: 20px;
    right: 40px;
    display: flex;
    gap: 8px;
}

.control-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.control-btn:hover {
    background: #e9ecef;
    color: #333;
}

header {
    position: relative;
}

/* Кнопки расчета */
.calc-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.calc-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.calc-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

/* Блоки выводов */
.conclusion-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid #28a745;
}

.conclusion-box h4 {
    color: #155724;
    margin-bottom: 15px;
}

.conclusion-box ul {
    margin-left: 20px;
    line-height: 1.8;
}

.conclusion-box li {
    margin-bottom: 8px;
    color: #495057;
}

/* Модальные окна для расчетов */
.calculation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin: 20px;
}

.modal-content {
    padding: 30px;
}

.modal-content h3 {
    color: #1e3c72;
    margin-bottom: 20px;
    text-align: center;
}

.calculation-example {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #4caf50;
}

.calculation-example h4 {
    color: #2e7d32;
    margin-bottom: 10px;
}

.calculation-example p {
    margin: 5px 0;
    font-family: 'Courier New', monospace;
}

.modal-close {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    display: block;
    margin: 20px auto 0;
    font-size: 16px;
    transition: transform 0.3s;
}

.modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Темная тема для новых элементов */
body.dark-theme .calc-btn {
    background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
    box-shadow: 0 2px 8px rgba(77, 171, 247, 0.3);
}

body.dark-theme .calc-btn:hover {
    background: linear-gradient(135deg, #339af0 0%, #4dabf7 100%);
    box-shadow: 0 4px 12px rgba(77, 171, 247, 0.5);
}

body.dark-theme .conclusion-box {
    background: #21262d;
    border-color: #30363d;
    border-left-color: #3fb950;
}

body.dark-theme .conclusion-box h4 {
    color: #aff5b4;
}

body.dark-theme .conclusion-box li {
    color: #c9d1d9;
}

body.dark-theme .modal-dialog {
    background: #1a1f3a;
}

body.dark-theme .modal-content h3 {
    color: #58a6ff;
}

body.dark-theme .calculation-example {
    background: #21262d;
    border-left-color: #3fb950;
}

body.dark-theme .calculation-example h4 {
    color: #aff5b4;
}

body.dark-theme .calculation-example p {
    color: #c9d1d9;
}

/* Стили для оценки рисков */
.risk-scales {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.risk-scale {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

.risk-scale h5 {
    color: #0c5460;
    margin-bottom: 10px;
    font-size: 14px;
}

.risk-scale p {
    margin: 3px 0;
    font-size: 12px;
    line-height: 1.4;
}

.risk-summary {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.risk-level-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.risk-level-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.risk-level-label {
    min-width: 150px;
    font-weight: 500;
    font-size: 14px;
}

.risk-level-bar {
    flex: 1;
    background: #e0e0e0;
    border-radius: 5px;
    height: 25px;
    position: relative;
    overflow: hidden;
}

.risk-level-fill {
    height: 100%;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
    font-size: 12px;
    transition: width 0.5s ease;
}

.risk-table {
    font-size: 13px;
}

.risk-table th {
    font-size: 12px;
    padding: 8px;
}

.risk-table td {
    padding: 8px;
    vertical-align: top;
}

.risk-table .high-risk {
    background: rgba(244, 67, 54, 0.1);
}

.risk-table .medium-risk {
    background: rgba(255, 152, 0, 0.1);
}

.risk-table .low-risk {
    background: rgba(76, 175, 80, 0.1);
}

/* Темная тема для рисков */
body.dark-theme .risk-scale {
    background: #21262d;
    border-left-color: #58a6ff;
}

body.dark-theme .risk-scale h5 {
    color: #58a6ff;
}

body.dark-theme .risk-scale p {
    color: #c9d1d9;
}

body.dark-theme .risk-summary {
    background: #21262d;
}

body.dark-theme .risk-level-bar {
    background: #30363d;
}

body.dark-theme .risk-level-label {
    color: #e8eaf6;
}

body.dark-theme .risk-table .high-risk {
    background: rgba(244, 67, 54, 0.2);
}

body.dark-theme .risk-table .medium-risk {
    background: rgba(255, 152, 0, 0.2);
}

body.dark-theme .risk-table .low-risk {
    background: rgba(76, 175, 80, 0.2);
}

/* Футер */
.footer {
    background: #f8f9fa;
    color: #666;
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid #eee;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 0 40px;
}

.footer-author {
    text-align: center;
}

.footer-author p {
    margin: 4px 0;
    line-height: 1.4;
    color: #555;
}

.footer-author strong {
    color: #333;
    font-size: 16px;
}

.footer-subtitle {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

/* Адаптивность футера */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .university-logo {
        max-width: 150px;
    }
    
    .svo-code {
        font-size: 20px;
        padding: 6px 12px;
    }
}

/* Темная тема для футера */
body.dark-theme .footer {
    background: linear-gradient(135deg, #0d1117 0%, #1e2a47 100%);
}

body.dark-theme .footer-author strong {
    color: #58a6ff;
}

body.dark-theme .footer-subtitle {
    color: #b8c5d6;
}

/* Научная инструкция */
.scientific-instruction {
    background: #f8f9fa;
    border-left-color: #007bff;
    margin-bottom: 32px;
}

.scientific-instruction h2 {
    color: #007bff;
    text-align: center;
    margin-bottom: 24px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.methodology-section h3 {
    color: #333;
    margin: 20px 0 12px 0;
    font-size: 15px;
    border-bottom: 1px solid #007bff;
    padding-bottom: 4px;
    font-weight: 600;
}

.methodology-section p {
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 16px;
    color: #555;
    font-size: 14px;
}

.methodology-section ul {
    margin: 12px 0 16px 24px;
}

.methodology-section li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #555;
    font-size: 14px;
}

.methodology-section strong {
    color: #007bff;
    font-weight: 600;
}

/* Темная тема для научной инструкции */
body.dark-theme .scientific-instruction {
    background: linear-gradient(135deg, #21262d 0%, #30363d 100%);
    border-left-color: #a855f7;
}

body.dark-theme .scientific-instruction h2 {
    color: #a855f7;
}

body.dark-theme .methodology-section h3 {
    color: #e8eaf6;
    border-bottom-color: #a855f7;
}

body.dark-theme .methodology-section p,
body.dark-theme .methodology-section li {
    color: #c9d1d9;
}

body.dark-theme .methodology-section strong {
    color: #a855f7;
}

/* Минималистичная темная тема */
body.dark-theme {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
}

body.dark-theme .container {
    background: #2d2d2d !important;
    box-shadow: 0 0 20px rgba(0,0,0,0.3) !important;
}

body.dark-theme header {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
    border-bottom-color: #404040 !important;
}

body.dark-theme header h1 {
    color: #ffffff !important;
}

body.dark-theme .subtitle {
    color: #b0b0b0 !important;
}

body.dark-theme .tabs {
    background: #2d2d2d !important;
    border-bottom-color: #404040 !important;
}

body.dark-theme .tab-btn {
    color: #b0b0b0 !important;
}

body.dark-theme .tab-btn:hover {
    color: #e0e0e0 !important;
    background: #3a3a3a !important;
}

body.dark-theme .tab-btn.active {
    color: #4dabf7 !important;
    border-bottom-color: #4dabf7 !important;
    background: #2d2d2d !important;
}

body.dark-theme .info-block {
    background: #3a3a3a !important;
    border-left-color: #4dabf7 !important;
}

body.dark-theme .info-block h2 {
    color: #ffffff !important;
}

body.dark-theme .info-block p {
    color: #b0b0b0 !important;
}

body.dark-theme .result-card {
    background: #3a3a3a !important;
    border-color: #404040 !important;
}

body.dark-theme .result-card h3 {
    color: #ffffff !important;
}

body.dark-theme .result-table {
    background: #3a3a3a !important;
    border-color: #404040 !important;
}

body.dark-theme .result-table th {
    background: #404040 !important;
    color: #e0e0e0 !important;
}

body.dark-theme .result-table td {
    border-color: #404040 !important;
    color: #e0e0e0 !important;
}

body.dark-theme .result-table tr:hover {
    background: #404040 !important;
}

body.dark-theme .btn-primary {
    background: #4dabf7 !important;
}

body.dark-theme .btn-primary:hover {
    background: #339af0 !important;
}

body.dark-theme .calc-btn {
    background: #4dabf7 !important;
}

body.dark-theme .calc-btn:hover {
    background: #339af0 !important;
}

body.dark-theme .control-btn {
    background: #404040 !important;
    border-color: #555 !important;
    color: #b0b0b0 !important;
}

body.dark-theme .control-btn:hover {
    background: #4a4a4a !important;
    color: #e0e0e0 !important;
}

body.dark-theme .footer {
    background: #2d2d2d !important;
    border-top-color: #404040 !important;
}

body.dark-theme .footer-author p {
    color: #b0b0b0 !important;
}

body.dark-theme .footer-author strong {
    color: #ffffff !important;
}

body.dark-theme .footer-subtitle {
    color: #888 !important;
}

body.dark-theme .scientific-instruction {
    background: #3a3a3a !important;
    border-left-color: #4dabf7 !important;
}

body.dark-theme .scientific-instruction h2 {
    color: #4dabf7 !important;
}

body.dark-theme .methodology-section h3 {
    color: #ffffff !important;
    border-bottom-color: #4dabf7 !important;
}

body.dark-theme .methodology-section p,
body.dark-theme .methodology-section li {
    color: #b0b0b0 !important;
}

body.dark-theme .airplane-svg {
    fill: #4dabf7 !important;
}

/* Стили для заключительного раздела */
.conclusion-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.conclusion-card h3 {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.final-conclusion {
    margin-bottom: 40px;
}

.conclusion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.conclusion-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.conclusion-icon {
    font-size: 32px;
    flex-shrink: 0;
    margin-top: 5px;
}

.conclusion-content h5 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.conclusion-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.strategic-recommendations {
    margin-bottom: 40px;
}

.strategic-recommendations h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommendation-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.recommendation-priority {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.priority-high .recommendation-priority {
    background: #e74c3c;
}

.priority-medium .recommendation-priority {
    background: #f39c12;
}

.priority-low .recommendation-priority {
    background: #27ae60;
}

.recommendation-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.implementation-roadmap {
    margin-bottom: 40px;
}

.implementation-roadmap h4 {
    color: white;
    margin-bottom: 25px;
    font-size: 20px;
    text-align: center;
}

.roadmap-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.timeline-period {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 15px;
}

.timeline-content h5 {
    color: white;
    margin-bottom: 15px;
    font-size: 18px;
}

.timeline-content ul {
    list-style: none;
    padding: 0;
}

.timeline-content li {
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
}

.timeline-content li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #fff;
    font-weight: bold;
}

.success-metrics {
    text-align: center;
}

.success-metrics h4 {
    color: white;
    margin-bottom: 25px;
    font-size: 20px;
}

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

.metric-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.metric-value {
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.metric-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

/* Адаптивность для заключительного раздела */
@media (max-width: 768px) {
    .conclusion-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .recommendation-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .recommendation-priority {
        align-self: flex-start;
    }
    
    .conclusion-card h3 {
        font-size: 24px;
    }
    
    .timeline-content h5 {
        font-size: 16px;
    }
    
    .metric-value {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .conclusion-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .conclusion-icon {
        margin-top: 0;
    }
}
/* Стили для улучшенных таблиц и диаграмм */

.detailed-table {
    font-size: 0.9em;
}

.detailed-table th,
.detailed-table td {
    padding: 8px 6px;
    text-align: center;
}

.summary-table {
    margin-top: 20px;
}

.summary-table .highlight {
    background-color: #e8f5e8;
    font-weight: bold;
}

.clickable-header,
.clickable-cell {
    cursor: pointer;
    color: #2196f3;
    transition: all 0.3s ease;
}

.clickable-header:hover,
.clickable-cell:hover {
    background-color: #f0f8ff;
    transform: scale(1.1);
}

/* Стили для диаграмм */

.bar-chart.horizontal .bar-item {
    margin-bottom: 15px;
}

.bar-chart.horizontal .bar-container {
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.bar-chart.horizontal .bar-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
    border-radius: 15px;
    transition: width 0.8s ease;
}

/* Диаграмма ранжирования */

.ranking-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ranking-scenario {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ranking-scenario h5 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.rank-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-label {
    min-width: 60px;
    font-size: 0.9em;
    font-weight: 500;
}

.rank-container {
    flex: 1;
    height: 25px;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}

.rank-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8em;
    font-weight: bold;
    border-radius: 12px;
    transition: width 0.6s ease;
}

/* Круговая диаграмма */

.pie-chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.pie-chart {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(
        #4caf50 0deg calc(var(--percentage) * 3.6deg),
        #f44336 calc(var(--percentage) * 3.6deg) 360deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.pie-center {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pie-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.pie-label {
    font-size: 0.8em;
    color: #666;
}

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

/* Формулы и расчеты */

.formula-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.formula-box {
    background: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    font-weight: bold;
    color: #2196f3;
    background: #f0f8ff;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 8px 0;
}

.calculation-details {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #e0e0e0;
}

.small-table {
    font-size: 0.85em;
}

.small-table th,
.small-table td {
    padding: 6px 8px;
}

/* Анализ чувствительности */

.sensitivity-chart {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.scenario-line {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.scenario-line h5 {
    margin-bottom: 15px;
    text-align: center;
}

.line-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 120px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.chart-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 80px;
}

.point-bar {
    width: 20px;
    min-height: 10px;
    border-radius: 10px 10px 0 0;
    transition: height 0.8s ease;
}

.point-label {
    font-size: 0.7em;
    margin-top: 5px;
    text-align: center;
    font-weight: 500;
}

.point-value {
    font-size: 0.8em;
    font-weight: bold;
    margin-top: 2px;
    color: #333;
}

.sensitivity-conclusion {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.sensitivity-conclusion h4 {
    color: #2e7d32;
    margin-bottom: 15px;
}

.sensitivity-conclusion ul {
    list-style-type: none;
    padding-left: 0;
}

.sensitivity-conclusion li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.sensitivity-conclusion li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
}

/* Модальные окна для расчетов */

.calculation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.calculation-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.calculation-modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.3em;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px 25px;
    line-height: 1.6;
}

.modal-body h3 {
    color: #2196f3;
    margin-bottom: 15px;
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-body ul, .modal-body ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 5px;
}

.modal-footer {
    padding: 15px 25px 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

.btn-close {
    background: #2196f3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.btn-close:hover {
    background: #1976d2;
}

/* Адаптивность */

@media (max-width: 768px) {
    .ranking-chart {
        grid-template-columns: 1fr;
    }
    
    .pie-chart-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .line-chart {
        height: 100px;
    }
    
    .chart-point {
        max-width: 60px;
    }
    
    .point-label {
        font-size: 0.6em;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .detailed-table {
        font-size: 0.8em;
    }
    
    .detailed-table th,
    .detailed-table td {
        padding: 4px 3px;
    }
}
/* Стили для новых разделов анализа */
.results-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 30px;
    border-radius: 15px;
    min-height: 100vh;
}

.results-container > h2 {
    color: #1a237e;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.section {
    margin-bottom: 40px;
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
}

.section h3 {
    color: #1a237e;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 3px solid #3498db;
    padding-bottom: 12px;
    font-weight: 700;
}

.section h4 {
    color: #283593;
    margin: 20px 0 15px 0;
    font-size: 1.2em;
    font-weight: 600;
}

/* Таблицы */
.weights-table, .scenario-scores-table, .results-summary, 
.concordance-table, .sensitivity-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    border: 1px solid #e0e0e0;
}

.weights-table th, .scenario-scores-table th, .results-summary th,
.concordance-table th, .sensitivity-table th {
    background: linear-gradient(135deg, #5e72e4 0%, #825ee4 100%);
    color: #ffffff;
    padding: 16px 12px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #4c63d2;
}

.weights-table td, .scenario-scores-table td, .results-summary td,
.concordance-table td, .sensitivity-table td {
    padding: 14px 12px;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
    font-size: 0.95em;
    color: #2c3e50;
    background: #ffffff;
}

.weights-table td:first-child,
.scenario-scores-table td:first-child,
.concordance-table td:first-child,
.sensitivity-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: #1a237e;
}

.weights-table tr:hover, .scenario-scores-table tr:hover,
.concordance-table tr:hover, .sensitivity-table tr:hover {
    background-color: #f0f4ff !important;
    transition: background-color 0.2s ease;
}

.total-row {
    background-color: #e3f2fd !important;
    font-weight: bold;
    border-top: 3px solid #2196f3;
    border-bottom: 3px solid #2196f3;
}

.total-row td {
    color: #1565c0 !important;
    font-size: 1.05em !important;
    font-weight: 700 !important;
    background-color: #e3f2fd !important;
}

.winner {
    background-color: #e8f5e9 !important;
    font-weight: bold;
}

.winner td {
    color: #2e7d32 !important;
    background-color: #e8f5e9 !important;
}

.significant {
    background-color: #e8f5e9 !important;
}

.significant td {
    color: #2e7d32 !important;
    font-weight: 600;
}

.not-significant {
    background-color: #fff3e0 !important;
}

.not-significant td {
    color: #e65100 !important;
    font-weight: 600;
}

/* Кнопки расчетов */
.calc-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.calc-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.calc-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

/* Диаграммы */
.chart-container {
    margin: 30px auto;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    max-width: 90%;
}

.chart-container canvas {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    padding: 15px;
}

/* Сводная таблица */
.summary-table {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    border: 2px solid #2196f3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.summary-table h4 {
    color: #0d47a1;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 700;
}

/* Формулы согласованности */
.concordance-formulas {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 5px solid #ff9800;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

.formula-block {
    margin: 15px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 2px solid #ffb74d;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.formula-block p {
    color: #424242;
    margin: 8px 0;
    line-height: 1.6;
}

.formula-block ul {
    color: #616161;
    margin: 10px 0 10px 20px;
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 1.15em;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    padding: 15px;
    border-radius: 6px;
    margin: 12px 0;
    text-align: center;
    font-weight: bold;
    color: #1a237e;
    border: 2px solid #bdbdbd;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Анализ чувствительности */
.sensitivity-variants {
    margin: 20px 0;
}

.sensitivity-results {
    margin-top: 30px;
}

.sensitivity-charts {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 20px 0;
}

/* Детали расчетов в модальном окне */
.calculation-detail {
    line-height: 1.8;
    color: #2c3e50;
}

.calculation-detail h4 {
    color: #1a237e;
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 700;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.calculation-steps {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 5px solid #4caf50;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.2);
}

.calculation-steps p {
    margin: 10px 0;
    color: #1b5e20;
    font-weight: 500;
}

.explanation {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 5px solid #2196f3;
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.2);
}

.explanation p {
    color: #0d47a1;
    font-weight: 500;
}

.ranking-details ul, .ranking-details ol {
    margin: 10px 0 10px 20px;
}

.ranking-details li {
    margin: 5px 0;
}

.variant-calculations {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 5px solid #9c27b0;
    box-shadow: 0 3px 10px rgba(156, 39, 176, 0.2);
}

.variant-calculations h5 {
    color: #4a148c;
    font-weight: 700;
    margin-bottom: 12px;
}

.variant-calculations p,
.variant-calculations ul {
    color: #6a1b9a;
}

.variant-calculations ul {
    margin: 10px 0 10px 20px;
}

.sensitivity-conclusions {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 5px solid #4caf50;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.2);
}

.sensitivity-conclusions h5 {
    color: #1b5e20;
    font-weight: 700;
    margin-bottom: 12px;
}

.sensitivity-conclusions p,
.sensitivity-conclusions ul {
    color: #2e7d32;
}

.sensitivity-conclusions ul {
    margin: 10px 0 10px 20px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .sensitivity-charts {
        flex-direction: column;
        gap: 20px;
    }
    
    .weights-table, .scenario-scores-table, .results-summary,
    .concordance-table, .sensitivity-table {
        font-size: 0.8em;
    }
    
    .weights-table th, .scenario-scores-table th, .results-summary th,
    .concordance-table th, .sensitivity-table th {
        padding: 10px 5px;
    }
    
    .weights-table td, .scenario-scores-table td, .results-summary td,
    .concordance-table td, .sensitivity-table td {
        padding: 8px 5px;
    }
    
    .calc-btn {
        padding: 4px 8px;
        font-size: 0.7em;
    }
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.6s ease-out;
}

/* Улучшенные стили для таблиц */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
}

/* Стили для выделения важных строк */
.total-row td {
    background-color: #e3f2fd !important;
    font-weight: bold;
    border-top: 3px solid #2196f3;
    border-bottom: 3px solid #2196f3;
    font-size: 1.05em;
    color: #1565c0 !important;
}

.winner td {
    background-color: #e8f5e9 !important;
    font-weight: bold;
    color: #2e7d32 !important;
}

/* Темная тема для результатов анализа */
body.dark-theme .results-container {
    background: #2d2d2d !important;
}

body.dark-theme .results-container > h2 {
    color: #4dabf7 !important;
}

body.dark-theme .section {
    background: #3a3a3a !important;
    border-color: #555 !important;
}

body.dark-theme .section h3 {
    color: #4dabf7 !important;
    border-bottom-color: #4dabf7 !important;
}

body.dark-theme .section h4 {
    color: #74c0fc !important;
}

body.dark-theme .weights-table,
body.dark-theme .scenario-scores-table,
body.dark-theme .results-summary,
body.dark-theme .concordance-table,
body.dark-theme .sensitivity-table {
    background: #3a3a3a !important;
    border-color: #555 !important;
}

body.dark-theme .weights-table th,
body.dark-theme .scenario-scores-table th,
body.dark-theme .results-summary th,
body.dark-theme .concordance-table th,
body.dark-theme .sensitivity-table th {
    background: #404040 !important;
    color: #e0e0e0 !important;
    border-bottom-color: #555 !important;
}

body.dark-theme .weights-table td,
body.dark-theme .scenario-scores-table td,
body.dark-theme .results-summary td,
body.dark-theme .concordance-table td,
body.dark-theme .sensitivity-table td {
    background: #3a3a3a !important;
    color: #e0e0e0 !important;
    border-bottom-color: #555 !important;
}

body.dark-theme .weights-table td:first-child,
body.dark-theme .scenario-scores-table td:first-child,
body.dark-theme .concordance-table td:first-child,
body.dark-theme .sensitivity-table td:first-child {
    color: #4dabf7 !important;
}

body.dark-theme .weights-table tr:hover,
body.dark-theme .scenario-scores-table tr:hover,
body.dark-theme .concordance-table tr:hover,
body.dark-theme .sensitivity-table tr:hover {
    background-color: #404040 !important;
}

body.dark-theme .total-row {
    background-color: #404040 !important;
}

body.dark-theme .total-row td {
    background-color: #404040 !important;
    color: #4dabf7 !important;
    border-top-color: #4dabf7 !important;
    border-bottom-color: #4dabf7 !important;
}

body.dark-theme .winner {
    background-color: #2d4a2d !important;
}

body.dark-theme .winner td {
    background-color: #2d4a2d !important;
    color: #69db7c !important;
}

body.dark-theme .chart-container {
    background: #3a3a3a !important;
    border-color: #555 !important;
}

body.dark-theme .chart-container canvas {
    background: #2d2d2d !important;
}

body.dark-theme .summary-table {
    background: #3a3a3a !important;
    border-color: #4dabf7 !important;
}

body.dark-theme .summary-table h4 {
    color: #4dabf7 !important;
}

body.dark-theme .concordance-formulas {
    background: #3a3a3a !important;
    border-left-color: #ffa94d !important;
}

body.dark-theme .formula-block {
    background: #2d2d2d !important;
    border-color: #ffa94d !important;
}

body.dark-theme .formula-block p {
    color: #e0e0e0 !important;
}

body.dark-theme .formula-block ul {
    color: #b0b0b0 !important;
}

body.dark-theme .formula {
    background: #404040 !important;
    color: #4dabf7 !important;
    border-color: #555 !important;
}

body.dark-theme .calculation-steps {
    background: #2d4a2d !important;
    border-left-color: #69db7c !important;
}

body.dark-theme .calculation-steps p {
    color: #69db7c !important;
}

body.dark-theme .explanation {
    background: #2d3a4a !important;
    border-left-color: #4dabf7 !important;
}

body.dark-theme .explanation p {
    color: #4dabf7 !important;
}

body.dark-theme .variant-calculations {
    background: #3a2d4a !important;
    border-left-color: #cc5de8 !important;
}

body.dark-theme .variant-calculations h5 {
    color: #cc5de8 !important;
}

body.dark-theme .variant-calculations p,
body.dark-theme .variant-calculations ul {
    color: #e599f7 !important;
}

body.dark-theme .sensitivity-conclusions {
    background: #2d4a2d !important;
    border-left-color: #69db7c !important;
}

body.dark-theme .sensitivity-conclusions h5 {
    color: #69db7c !important;
}

body.dark-theme .sensitivity-conclusions p,
body.dark-theme .sensitivity-conclusions ul {
    color: #8ce99a !important;
}

body.dark-theme .table-container {
    border-color: #555 !important;
}

/* Темная тема для заключительного раздела */
body.dark-theme .conclusion-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%) !important;
    border: 1px solid #555 !important;
}

body.dark-theme .conclusion-card h3 {
    color: #4dabf7 !important;
}

body.dark-theme .conclusion-item {
    background: rgba(74, 171, 247, 0.1) !important;
    border-color: rgba(74, 171, 247, 0.3) !important;
}

body.dark-theme .conclusion-content h5 {
    color: #4dabf7 !important;
}

body.dark-theme .conclusion-content p {
    color: #e0e0e0 !important;
}

body.dark-theme .strategic-recommendations h4 {
    color: #4dabf7 !important;
}

body.dark-theme .recommendation-item {
    background: rgba(74, 171, 247, 0.1) !important;
    border-color: rgba(74, 171, 247, 0.3) !important;
}

body.dark-theme .recommendation-priority {
    background: rgba(74, 171, 247, 0.3) !important;
    color: #ffffff !important;
}

body.dark-theme .priority-high .recommendation-priority {
    background: #c92a2a !important;
}

body.dark-theme .priority-medium .recommendation-priority {
    background: #f76707 !important;
}

body.dark-theme .priority-low .recommendation-priority {
    background: #2f9e44 !important;
}

body.dark-theme .recommendation-text {
    color: #e0e0e0 !important;
}

body.dark-theme .implementation-roadmap h4 {
    color: #4dabf7 !important;
}

body.dark-theme .timeline-item {
    background: rgba(74, 171, 247, 0.1) !important;
    border-color: rgba(74, 171, 247, 0.3) !important;
}

body.dark-theme .timeline-period {
    background: rgba(74, 171, 247, 0.3) !important;
    color: #ffffff !important;
}

body.dark-theme .timeline-content h5 {
    color: #4dabf7 !important;
}

body.dark-theme .timeline-content li {
    color: #e0e0e0 !important;
}

body.dark-theme .success-metrics h4 {
    color: #4dabf7 !important;
}

body.dark-theme .metric-item {
    background: rgba(74, 171, 247, 0.1) !important;
    border-color: rgba(74, 171, 247, 0.3) !important;
}

body.dark-theme .metric-value {
    color: #4dabf7 !important;
}

body.dark-theme .metric-label {
    color: #e0e0e0 !important;
}

/* Темная тема для оценки рисков */
body.dark-theme .risk-summary {
    background: #3a3a3a !important;
}

body.dark-theme .risk-level-label {
    color: #e0e0e0 !important;
}

body.dark-theme .risk-level-bar {
    background: #555 !important;
}

body.dark-theme .risk-table .high-risk {
    background: rgba(201, 42, 42, 0.2) !important;
}

body.dark-theme .risk-table .medium-risk {
    background: rgba(247, 103, 7, 0.2) !important;
}

body.dark-theme .risk-table .low-risk {
    background: rgba(47, 158, 68, 0.2) !important;
}
