/* --- START OF FILE static/scope.css --- */

/* --- VARIABLES --- */
:root {
    --scope-bg: #0b0c0d; 
    --scope-border: #333;
    --grid-color: rgba(255, 255, 255, 0.08);
    --grid-axis: rgba(255, 255, 255, 0.15);
    
    /* Pro Colors */
    --trace-color: #00fff2; 
    --trace-glow: rgba(0, 255, 242, 0.45);
    
    --ui-text: #889;
    --ui-active: #00fff2;
    --trigger-color: #ffbd2e; 
}

/* --- WINDOW CONTAINER --- */
.scope-window {
    background-color: var(--scope-bg);
    border: 1px solid var(--scope-border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.5rem;
    height: 220px; /* Совпадает с Terminal и Architecture */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    user-select: none;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease, transform 0.3s ease;
    /* Убираем мерцание при трансформации на мобильных */
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0);
}

/*
   ИСПРАВЛЕНИЕ: Эффект наведения работает только на устройствах с мышью.
   На телефонах это убирает "дрыганье" блока при скролле пальцем по нему.
*/
@media (hover: hover) {
    .scope-window:hover {
        border-color: #555;
        transform: translateY(-2px);
    }
}

/* --- HEADER --- */
.scope-header {
    height: 30px; /* Чуть компактнее */
    background: #111213;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    color: var(--ui-text);
    flex-shrink: 0;
    z-index: 10;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #ddd;
}
.status-dot {
    width: 5px;
    height: 5px;
    background: #27c93f;
    border-radius: 50%;
    box-shadow: 0 0 6px #27c93f;
}

.info-area {
    display: flex;
    gap: 12px;
}
.info-tag span { color: var(--ui-active); }

/* --- SCREEN & GRID --- */
.scope-screen {
    flex-grow: 1;
    position: relative;
    background: var(--scope-bg);
    cursor: crosshair;
    overflow: hidden; /* Гарантия, что ничего не вылезет */
}

/* Grid Lines (Pure CSS) */
.grid-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* Сетка 40px */
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px; 
    background-position: center center; 
    z-index: 1;
}

/* Axis Crosshair (Center lines) */
.grid-lines::after {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: var(--grid-axis);
}
.grid-lines::before {
    content: '';
    position: absolute;
    left: 50%; top: 0; bottom: 0;
    width: 1px;
    background: var(--grid-axis);
}

/* TRIGGER INDICATOR */
.trigger-indicator {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0; 
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 6px solid var(--trigger-color);
    z-index: 5;
}
.trigger-line {
    position: absolute;
    right: 0; left: 0; top: 50%;
    height: 1px;
    background: var(--trigger-color);
    opacity: 0.2;
    border-bottom: 1px dashed var(--trigger-color);
    z-index: 1;
}

/* CANVAS */
#scope-canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    /* Улучшает свечение линий */
    mix-blend-mode: screen; 
}

/* --- UI OVERLAY (DATA) --- */
.scope-data {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Более компактные отступы */
    padding: 4px 10px;
    /* Градиент более прозрачный, чтобы было видно волну снизу */
    background: linear-gradient(to top, rgba(11, 12, 13, 0.95) 0%, rgba(11, 12, 13, 0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-family: 'Fira Code', monospace;
    z-index: 10;
    pointer-events: none; /* Чтобы клики проходили сквозь */
}

.measurements {
    display: flex;
    gap: 15px;
}
.meas-block {
    display: flex;
    flex-direction: column;
}
.label { font-size: 8px; color: var(--ui-text); text-transform: uppercase; margin-bottom: 1px; }
.value { font-size: 11px; color: var(--trace-color); text-shadow: 0 0 4px var(--trace-glow); font-weight: 500; }

.mode-label {
    background: rgba(0, 255, 242, 0.05);
    color: var(--ui-active);
    border: 1px solid rgba(0, 255, 242, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
}