/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
.verranda-monitor-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.verranda-monitor {
    position: relative;
    width: 100%;
    background: #071f3b;
    border-radius: 16px;
    border: 1px solid rgba(183, 238, 46, 0.3);
    overflow: hidden;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 20px 60px rgba(7, 31, 59, 0.5);
    display: flex;
    flex-direction: column;
}

/* ===== ВЕРХНЯЯ HUD-ПАНЕЛЬ ===== */
.monitor-hud-top {
    position: relative;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(180deg, rgba(7, 31, 59, 0.95) 0%, rgba(7, 31, 59, 0.9) 100%);
    border-bottom: 1px solid rgba(183, 238, 46, 0.25);
    min-height: 44px;
    height: auto;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.hud-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.hud-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b7ee2e;
    animation: pulse-dot 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.hud-text {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #b7ee2e;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hud-right {
    flex-shrink: 0;
}

/* ===== КНОПКА ЗАКРЫТИЯ (СПРАВА СВЕРХУ) ===== */
.btn-shutter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #b7ee2e, #9fd429);
    color: #071f3b;
    border: none;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(183, 238, 46, 0.25);
    white-space: nowrap;
}

.btn-shutter:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(183, 238, 46, 0.4);
}

.btn-shutter:active {
    transform: scale(0.95);
}

.btn-shutter svg {
    width: 16px;
    height: 16px;
    fill: #071f3b;
    stroke: #071f3b;
    flex-shrink: 0;
}

/* ===== СЦЕНА (ОБЕРТКА ДЛЯ ИЗОБРАЖЕНИЯ) ===== */
.monitor-scene-wrapper {
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.monitor-scene {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    min-height: 350px;
    overflow: hidden;
    background: #071f3b;
}

.monitor-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}

.monitor-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(7, 31, 59, 0.3) 0%, transparent 35%, transparent 65%, rgba(7, 31, 59, 0.5) 100%);
    pointer-events: none;
}

/* ===== РАМКИ ===== */
.monitor-frame-left,
.monitor-frame-right {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 10;
    pointer-events: none;
    width: 20px;
}

.monitor-frame-left {
    left: 0;
    background: linear-gradient(90deg, #071f3b 0%, rgba(7, 31, 59, 0.7) 60%, transparent 100%);
    border-right: 1px solid rgba(183, 238, 46, 0.2);
}

.monitor-frame-right {
    right: 0;
    background: linear-gradient(270deg, #071f3b 0%, rgba(7, 31, 59, 0.7) 60%, transparent 100%);
    border-left: 1px solid rgba(183, 238, 46, 0.2);
}

/* ===== ШТОРКА ===== */
.monitor-shutter {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 5;
    background: linear-gradient(90deg, rgba(183, 238, 46, 0.12) 0%, rgba(7, 31, 59, 0.35) 50%, rgba(183, 238, 46, 0.15) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: width 0.1s linear;
    pointer-events: none;
}

.shutter-effect {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, rgba(183, 238, 46, 0.12) 0px, rgba(183, 238, 46, 0.12) 2px, transparent 2px, transparent 80px);
    pointer-events: none;
}

.shutter-edge {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 16px;
    background: linear-gradient(90deg, rgba(7, 31, 59, 0.8), #b7ee2e);
    border-left: 2px solid #b7ee2e;
    box-shadow: 0 0 30px rgba(183, 238, 46, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shutter-edge::after {
    content: 'WINDLOCK';
    writing-mode: vertical-rl;
    font-size: 7px;
    font-weight: 700;
    color: #071f3b;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

/* ===== HUD-МЕТКИ (НА СЦЕНЕ) ===== */
.monitor-hud {
    position: absolute;
    inset: 0;
    z-index: 15;
    pointer-events: none;
}

.monitor-hud.hidden {
    display: none;
}

.hud-label {
    position: absolute;
    padding: 5px 12px;
    background: rgba(7, 31, 59, 0.85);
    border: 1px solid rgba(183, 238, 46, 0.25);
    border-radius: 6px;
    font-size: 9px;
    font-weight: 600;
    color: #b7ee2e;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
}

.hud-label-top-left {
    top: 16px;
    left: 32px;
}

.hud-label-top-right {
    top: 16px;
    right: 32px;
    color: #efe7d3;
}

.hud-label-bottom-left {
    bottom: 50px;
    left: 32px;
}

.hud-label-bottom-right {
    bottom: 50px;
    right: 32px;
    color: #EBEBEB;
}

/* ===== СТАТУС (НА СЦЕНЕ) ===== */
.monitor-status {
    position: absolute;
    top: 16px;
    right: 32px;
    z-index: 20;
    padding: 5px 14px;
    background: rgba(7, 31, 59, 0.9);
    border: 1px solid rgba(183, 238, 46, 0.25);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 10px;
    font-family: 'Courier New', monospace;
    pointer-events: none;
    white-space: nowrap;
}

.status-label {
    color: #EBEBEB;
    font-weight: 400;
}

.status-value {
    color: #b7ee2e;
    font-weight: 700;
    margin-left: 4px;
}

/* ===== НИЖНЯЯ HUD-ПАНЕЛЬ (НА СЦЕНЕ) ===== */
.monitor-hud-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 16px;
    background: linear-gradient(0deg, rgba(7, 31, 59, 0.95) 0%, rgba(7, 31, 59, 0.6) 100%);
    border-top: 1px solid rgba(183, 238, 46, 0.2);
    min-height: 40px;
    height: auto;
    gap: 8px;
    flex-wrap: wrap;
}

.hud-bottom-left {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #EBEBEB;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.hud-bottom-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-weather {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(7, 31, 59, 0.6);
    border: 1px solid rgba(183, 238, 46, 0.15);
    border-radius: 6px;
    color: #EBEBEB;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.btn-weather:hover {
    background: rgba(183, 238, 46, 0.15);
    border-color: #b7ee2e;
}

.btn-weather.active {
    background: rgba(183, 238, 46, 0.2);
    border-color: #b7ee2e;
    color: #b7ee2e;
}

.btn-weather svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    flex-shrink: 0;
}

.btn-weather span {
    display: inline;
}

.btn-control {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    background: rgba(7, 31, 59, 0.6);
    border: 1px solid rgba(183, 238, 46, 0.15);
    border-radius: 6px;
    color: #EBEBEB;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-control:hover {
    background: rgba(183, 238, 46, 0.15);
    border-color: #b7ee2e;
    color: #b7ee2e;
}

.btn-control svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* ===== ПРОГРЕСС-БАР ===== */
.monitor-progress {
    padding: 12px 20px 10px;
    background: #071f3b;
    border-top: 1px solid rgba(183, 238, 46, 0.1);
    flex-shrink: 0;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9px;
    color: #EBEBEB;
    font-family: 'Courier New', monospace;
    margin-bottom: 5px;
    flex-wrap: wrap;
    gap: 4px;
}

.progress-position {
    color: #b7ee2e;
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(7, 31, 59, 0.8);
    border: 1px solid rgba(183, 238, 46, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #b7ee2e, #9fd429);
    border-radius: 8px;
    transition: width 0.15s ease;
}

/* ===== ХАРАКТЕРИСТИКИ ===== */
.monitor-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #071f3b;
    border-top: 1px solid rgba(183, 238, 46, 0.08);
    padding: 8px 0;
    flex-shrink: 0;
}

.stat-item {
    text-align: center;
    padding: 4px 8px;
    border-right: 1px solid rgba(183, 238, 46, 0.08);
}

.stat-item:last-child {
    border-right: none;
}

.stat-label {
    display: block;
    font-size: 8px;
    color: #EBEBEB;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.6;
    margin-bottom: 1px;
}

.stat-value {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #b7ee2e;
    font-family: 'Courier New', monospace;
}

/* ===== АНИМАЦИЯ ПОГОДЫ ===== */
.monitor-scene.weather-rain .monitor-overlay {
    background: linear-gradient(180deg, rgba(7, 31, 59, 0.4) 0%, rgba(7, 31, 59, 0.2) 40%, rgba(7, 31, 59, 0.4) 100%);
}

.monitor-scene.weather-rain .monitor-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 30px, rgba(183, 238, 46, 0.06) 30px, rgba(183, 238, 46, 0.06) 31px);
    animation: rain 0.5s linear infinite;
    pointer-events: none;
}

@keyframes rain {
    0% { background-position: 0 0; }
    100% { background-position: 0 30px; }
}

.monitor-scene.weather-wind .monitor-overlay {
    background: linear-gradient(180deg, rgba(7, 31, 59, 0.5) 0%, rgba(7, 31, 59, 0.3) 40%, rgba(7, 31, 59, 0.5) 100%);
}

.monitor-scene.weather-wind .monitor-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(105deg, transparent, transparent 20px, rgba(183, 238, 46, 0.08) 20px, rgba(183, 238, 46, 0.08) 21px);
    animation: wind 0.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes wind {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

.monitor-scene.weather-clear .monitor-overlay {
    background: linear-gradient(180deg, rgba(7, 31, 59, 0.15) 0%, transparent 40%, transparent 60%, rgba(7, 31, 59, 0.25) 100%);
}

/* ============================================
   ===== АДАПТИВНОСТЬ =====
   ============================================ */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 1024px) {
    .hud-text {
        font-size: 9px;
        letter-spacing: 1px;
    }
    
    .btn-shutter {
        font-size: 9px;
        padding: 5px 12px;
    }
    
    .btn-shutter svg {
        width: 14px;
        height: 14px;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .monitor-hud-top {
        padding: 6px 12px;
        min-height: 38px;
        gap: 6px;
    }
    
    .hud-text {
        font-size: 7px;
        letter-spacing: 0.5px;
    }
    
    .hud-dot {
        width: 6px;
        height: 6px;
    }
    
    .btn-shutter {
        font-size: 8px;
        padding: 4px 10px;
        gap: 4px;
        border-radius: 6px;
    }
    
    .btn-shutter svg {
        width: 12px;
        height: 12px;
    }
    
    .monitor-scene {
        min-height: 220px;
        aspect-ratio: 4/3;
    }
    
    .monitor-frame-left,
    .monitor-frame-right {
        width: 12px;
    }
    
    .shutter-edge {
        width: 12px;
    }
    
    .shutter-edge::after {
        font-size: 5px;
        letter-spacing: 1px;
    }
    
    .monitor-hud-bottom {
        padding: 4px 10px;
        min-height: 34px;
        gap: 4px;
    }
    
    .hud-bottom-left {
        font-size: 7px;
        letter-spacing: 0.5px;
    }
    
    .btn-weather {
        padding: 3px 6px;
        font-size: 7px;
        gap: 2px;
        border-radius: 4px;
    }
    
    .btn-weather svg {
        width: 10px;
        height: 10px;
    }
    
    .btn-weather span {
        display: none;
    }
    
    .btn-control {
        padding: 3px 4px;
    }
    
    .btn-control svg {
        width: 12px;
        height: 12px;
    }
    
    .hud-label {
        font-size: 7px;
        padding: 3px 8px;
        border-radius: 4px;
    }
    
    .hud-label-top-left {
        top: 10px;
        left: 18px;
    }
    
    .hud-label-top-right {
        display: none;
    }
    
    .hud-label-bottom-left {
        bottom: 42px;
        left: 18px;
    }
    
    .hud-label-bottom-right {
        display: none;
    }
    
    .monitor-status {
        top: 10px;
        right: 18px;
        padding: 3px 10px;
        font-size: 8px;
        border-radius: 6px;
    }
    
    .monitor-progress {
        padding: 8px 12px 6px;
    }
    
    .progress-labels {
        font-size: 7px;
        gap: 2px;
    }
    
    .progress-bar {
        height: 4px;
    }
    
    .monitor-stats {
        grid-template-columns: repeat(4, 1fr);
        padding: 4px 0;
    }
    
    .stat-item {
        padding: 2px 4px;
    }
    
    .stat-label {
        font-size: 6px;
        letter-spacing: 0.5px;
    }
    
    .stat-value {
        font-size: 9px;
    }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
    .monitor-hud-top {
        padding: 4px 8px;
        min-height: 32px;
    }
    
    .hud-text {
        font-size: 6px;
        letter-spacing: 0px;
    }
    
    .hud-dot {
        width: 4px;
        height: 4px;
    }
    
    .btn-shutter {
        font-size: 7px;
        padding: 3px 8px;
        gap: 3px;
        border-radius: 4px;
    }
    
    .btn-shutter svg {
        width: 10px;
        height: 10px;
    }
    
    .monitor-scene {
        min-height: 180px;
        aspect-ratio: 1/1;
    }
    
    .monitor-frame-left,
    .monitor-frame-right {
        width: 8px;
    }
    
    .shutter-edge {
        width: 8px;
    }
    
    .shutter-edge::after {
        font-size: 4px;
        letter-spacing: 0.5px;
    }
    
    .monitor-hud-bottom {
        padding: 3px 6px;
        min-height: 28px;
        gap: 2px;
    }
    
    .hud-bottom-left {
        font-size: 6px;
        letter-spacing: 0.3px;
    }
    
    .btn-weather {
        padding: 2px 4px;
        font-size: 6px;
        border-radius: 3px;
    }
    
    .btn-weather svg {
        width: 8px;
        height: 8px;
    }
    
    .btn-control {
        padding: 2px 3px;
    }
    
    .btn-control svg {
        width: 10px;
        height: 10px;
    }
    
    .hud-label-top-left {
        display: none;
    }
    
    .hud-label-bottom-left {
        display: none;
    }
    
    .monitor-status {
        top: 6px;
        right: 12px;
        padding: 2px 6px;
        font-size: 6px;
        border-radius: 4px;
    }
    
    .monitor-progress {
        padding: 4px 8px 3px;
    }
    
    .progress-labels {
        font-size: 6px;
        gap: 1px;
    }
    
    .progress-bar {
        height: 3px;
    }
    
    .monitor-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 3px 0;
    }
    
    .stat-item:nth-child(2) {
        border-right: none;
    }
    
    .stat-item {
        padding: 1px 4px;
    }
    
    .stat-label {
        font-size: 5px;
        letter-spacing: 0.3px;
    }
    
    .stat-value {
        font-size: 7px;
    }
}

/* ============================================
   ===== FULLSCREEN =====
   ============================================ */
.verranda-monitor-wrapper.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    background: #071f3b;
    max-width: 100vw !important;
}

.verranda-monitor-wrapper.fullscreen .verranda-monitor {
    border-radius: 0;
    height: 100vh;
}

.verranda-monitor-wrapper.fullscreen .monitor-scene-wrapper {
    flex: 1;
    min-height: 0;
}

.verranda-monitor-wrapper.fullscreen .monitor-scene {
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
}

.verranda-monitor-wrapper.fullscreen .monitor-hud-top,
.verranda-monitor-wrapper.fullscreen .monitor-hud-bottom,
.verranda-monitor-wrapper.fullscreen .monitor-progress,
.verranda-monitor-wrapper.fullscreen .monitor-stats {
    flex-shrink: 0;
}

/* ===== УБИРАЕМ КОНФЛИКТЫ ===== */
.verranda-monitor * {
    box-sizing: border-box;
}