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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f8;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
}

.main-content {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 25px;
    width: 100%;
    max-width: 700px;
}

h1 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 25px;
}

nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

nav button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s;
}
nav button:hover {
    background-color: #ced4da;
}
nav button.active {
    background-color: #007bff;
    color: white;
}

.content-section {
    display: none;
}
.content-section.active {
    display: block;
}

.scenario-box {
    background-color: #e2f0fb;
    border-left: 5px solid #007bff;
    padding: 15px;
    margin-bottom: 20px;
}

.scenario-buttons {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
}
.scenario-buttons button {
    padding: 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.scenario-buttons button:hover {
    background-color: #218838;
}

#action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
#action-buttons button {
    padding: 12px;
    border-radius: 5px;
}
#action-buttons button.danger {
    background-color: #dc3545; /* Красный для экстренных действий */
}
#action-buttons button.success {
    background-color: #28a745; /* Зелёный для стабилизации */
}
#action-buttons button.success.disabled,
#action-buttons button.danger.disabled {
     background-color: #6c757d !important; /* Серый, если недоступно */
}

pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}
