/* --- НАСТРОЙКИ ЦВЕТОВ --- */
:root {
    --neon-blue: #00f3ff;
    --deep-bg: #020b14;
    --glass-bg: rgba(0, 243, 255, 0.001);
    --glass-border: rgba(0, 243, 255, 0.3);
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--deep-bg);
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-blue);
}

/* Фон (Canvas 2D) */
#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Основной контейнер интерфейса */
#app-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
    pointer-events: none;
}

/* Заголовок */
header {
    text-align: center;
    margin-bottom: 10px;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 3.5rem);
    margin: 0;
    text-shadow: 0 0 25px rgba(0, 243, 255, 0.6);
    letter-spacing: 4px;
    font-weight: 900;
    pointer-events: auto;
}

.status-text {
    font-size: clamp(0.7rem, 1vw, 1rem);
    opacity: 0.8;
    letter-spacing: 2px;
    margin-top: 5px;
}

/* --- ОБЩАЯ СЕТКА (DASHBOARD) --- */
.dashboard {
    display: flex;
    width: 100%;
    max-width: 1400px;
    height: 60vh;
    gap: 20px;
    pointer-events: none;
}

/* Общий стиль для стеклянных панелей */
.glass-panel {
    pointer-events: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.05), inset 0 0 30px rgba(0, 243, 255, 0.02);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}

.glass-panel:hover {
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.15), inset 0 0 30px rgba(0, 243, 255, 0.1);
    border-color: rgba(0, 243, 255, 0.6);
}

/* ЛЕВАЯ ПАНЕЛЬ (КАРТА) */
.map-section {
    flex: 2;
    position: relative;
    overflow: hidden;
}

#map-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

#map-container svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 5px rgba(0, 243, 255, 0.3));
    pointer-events: none;
}

#anim-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.map-section path {
    fill: rgba(0, 243, 255, 0.01) !important;
    stroke: var(--neon-blue) !important;
    stroke-width: 0.8px !important;
}

.button-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

.button-wrapper .action-btn {
    pointer-events: auto;
}

/* ПРАВАЯ ПАНЕЛЬ (СТАТИСТИКА) */
.stats-section {
    flex: 1;
    gap: 15px;
    min-width: 300px;
}

/* Блоки внутри статистики */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.7;
}

.stat-value-small {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Графики */
.chart-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 243, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
}

.chart-title {
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #fff;
    display: flex;
    justify-content: space-between;
}

.chart-value-big {
    font-size: 2rem;
    font-weight: 900;
    text-shadow: 0 0 10px var(--neon-blue);
}

.unit {
    font-size: 0.8rem;
    opacity: 0.6;
    font-weight: normal;
}

canvas.stat-canvas {
    width: 100%;
    height: 60px;
    margin-top: auto;
}

/* КНОПКА */
.action-btn {
    padding: clamp(10px, 2vw, 15px) clamp(30px, 5vw, 50px);
    background: rgba(0, 20, 40, 0.9);
    backdrop-filter: blur(5px);
    border: 2px solid var(--neon-blue);
    color: var(--neon-blue);
    font-family: 'Orbitron';
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-weight: bold;
    cursor: pointer;
    pointer-events: auto;
    transition: 0.3s;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 100;
    white-space: nowrap;
}

.action-btn:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 40px var(--neon-blue);
    transform: scale(1.05);
}

/* АДАПТИВНОСТЬ */
@media (max-width: 900px) {
    .dashboard {
        flex-direction: column;
        height: auto;
    }

    .map-section {
        height: 40vh;
        min-height: 300px;
        display: block !important;
    }

    .stats-section {
        height: auto;
    }

    #app-content {
        overflow-y: auto;
        justify-content: flex-start;
    }

    .action-btn {
        font-size: 1rem;
        padding: 12px 35px;
        letter-spacing: 1px;
    }

    .button-wrapper {
        display: flex !important;
        position: absolute !important;
    }
}

@media (max-width: 500px) {
    .action-btn {
        font-size: 0.85rem;
        padding: 10px 25px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .map-section {
        min-height: 250px;
    }
}