/* Точные стили по вашему изображению */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #0f1419;
    color: #ffffff;
    line-height: 1.4;
    min-height: 100vh;
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Шапка как на изображении */
.header {
    background: #1a2332;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #2a3a4a;
}

.header h1 {
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.subtitle {
    color: #8899a6;
    font-size: 14px;
    margin-bottom: 15px;
}

.header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-indicator {
    display: flex;
    align-items: center;
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.pulse {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    margin-right: 4px;
    animation: pulse 2s infinite;
}

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

.header-time {
    color: #8899a6;
    font-size: 12px;
}

/* Основные показатели */
.main-metrics {
    background: #1a2332;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #2a3a4a;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.metric-card {
    background: #2a3a4a;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.metric-label {
    color: #8899a6;
    font-size: 12px;
    margin-bottom: 8px;
}

.metric-value {
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.metric-max {
    color: #8899a6;
    font-size: 14px;
}

.metric-unit {
    color: #8899a6;
    font-size: 12px;
}

.metric-status {
    color: #f39c12;
    font-size: 11px;
    font-weight: bold;
}

/* Детальный индекс */
.detailed-index {
    background: #1a2332;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #2a3a4a;
}

.detailed-index h2 {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: bold;
}

.index-header {
    margin-bottom: 20px;
}

.index-time {
    color: #8899a6;
    font-size: 12px;
    margin-bottom: 10px;
}

.index-value-large {
    color: #ffffff;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.index-status-alert {
    color: #f39c12;
    font-size: 14px;
    font-weight: bold;
}

/* Таблица */
.index-table {
    margin-top: 15px;
}

.index-table table {
    width: 100%;
    border-collapse: collapse;
    background: #2a3a4a;
    border-radius: 4px;
    overflow: hidden;
}

.index-table th {
    background: #1a2332;
    color: #8899a6;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: normal;
    text-align: left;
    border-bottom: 1px solid #1a2332;
}

.index-table td {
    padding: 8px 12px;
    color: #ffffff;
    font-size: 12px;
    border-bottom: 1px solid #1a2332;
}

.index-table tr:last-child td {
    border-bottom: none;
}

/* Объяснение индекса */
.index-explanation {
    background: #1a2332;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #2a3a4a;
}

.index-explanation h3 {
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: bold;
}

.index-explanation p {
    color: #8899a6;
    font-size: 12px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.scale-levels {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scale-level {
    display: flex;
    align-items: center;
    gap: 10px;
}

.level-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.level-range {
    color: #ffffff;
    font-size: 12px;
    min-width: 100px;
}

.level-desc {
    color: #8899a6;
    font-size: 12px;
}

/* Текущая ситуация */
.current-situation {
    background: #1a2332;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #2a3a4a;
}

.current-situation h3 {
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: bold;
}

.current-situation p {
    color: #8899a6;
    font-size: 12px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.situation-metrics {
    margin: 15px 0;
}

.situation-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2a3a4a;
    padding: 10px 15px;
    border-radius: 4px;
}

.situation-label {
    color: #8899a6;
    font-size: 12px;
}

.situation-value {
    color: #f39c12;
    font-size: 14px;
    font-weight: bold;
}

.risk-factors {
    margin: 15px 0;
}

.risk-factors h4 {
    color: #ffffff;
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: bold;
}

.risk-factors ul {
    color: #8899a6;
    font-size: 12px;
    padding-left: 20px;
    line-height: 1.5;
}

.risk-factors li {
    margin-bottom: 5px;
}

.attention-alert {
    background: #3a2a2a;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 12px;
    margin: 15px 0;
}

.update-info {
    color: #8899a6;
    font-size: 11px;
    margin-top: 15px;
}

.last-update {
    margin-bottom: 5px;
}

.recommendations {
    font-style: italic;
}

/* Состав индекса */
.index-composition {
    background: #1a2332;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #2a3a4a;
}

.index-composition h3 {
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: bold;
}

.index-composition p {
    color: #8899a6;
    font-size: 12px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.composition-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.comp-button {
    background: #2a3a4a;
    border: 1px solid #3a4a5a;
    color: #8899a6;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.comp-button:hover {
    background: #3a4a5a;
}

/* Нижняя панель */
.bottom-panel {
    background: #1a2332;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #2a3a4a;
}

.panel-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.panel-button {
    background: #2a3a4a;
    border: 1px solid #3a4a5a;
    color: #8899a6;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.panel-button:hover {
    background: #3a4a5a;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .panel-buttons {
        flex-direction: column;
    }
    
    .panel-button {
        text-align: center;
    }
}