/* ================================================================
   SAGRUS.TOP — HI-TECH CAMERA (single page, no HUD corners)
   ================================================================ */

/* ================================================================
   FRAME — контейнер видео
   ================================================================ */
.camera__frame {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #000;
    transform: translateZ(0);
    will-change: transform;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.camera__frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    /* ИЗМЕНЕНО: contain -> fill для растягивания на весь экран */
    object-fit: fill; 
    background: #000;
    transform-origin: 0 0;
    will-change: transform;
    cursor: default;
    backface-visibility: hidden;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* ================================================================
   КРУГЛАЯ PLAY/PAUSE
   ================================================================ */
.camera__bigplay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e90ff 0%, #0066ff 100%);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 34px;
    padding-left: 6px;
    box-shadow:
        0 20px 70px rgba(30, 144, 255, 0.6),
        0 0 120px rgba(0, 102, 255, 0.4);
    z-index: 6;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
    animation: bigPlayPulse 2.4s ease-in-out infinite;
}
.camera__bigplay:hover {
    transform: translate(-50%, -50%) scale(1.07);
    box-shadow:
        0 24px 90px rgba(30, 144, 255, 0.8),
        0 0 160px rgba(0, 102, 255, 0.55);
}
.camera__bigplay[hidden] { display: none; }
.camera__bigplay .fa-pause { padding-left: 0; }

@keyframes bigPlayPulse {
    0%, 100% {
        box-shadow:
            0 20px 70px rgba(30, 144, 255, 0.6),
            0 0 0 0 rgba(30, 144, 255, 0.55),
            0 0 120px rgba(0, 102, 255, 0.4);
    }
    50% {
        box-shadow:
            0 20px 70px rgba(30, 144, 255, 0.6),
            0 0 0 26px rgba(30, 144, 255, 0),
            0 0 120px rgba(0, 102, 255, 0.4);
    }
}

@media (max-width: 480px) {
    .camera__bigplay { width: 68px; height: 68px; font-size: 26px; padding-left: 5px; }
}

.camera__frame.is-zoomed video { cursor: grab; touch-action: none; }
.camera__frame.is-zoomed video:active { cursor: grabbing; touch-action: none; }

/* ================================================================
   ПАНЕЛЬ ИНСТРУМЕНТОВ
   ================================================================ */
.camera__tools {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(5, 7, 15, 0.78);
    border: 1px solid rgba(30, 144, 255, 0.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 32px rgba(30, 144, 255, 0.1);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.camera-solo__player.tools-hidden .camera__tools,
.camera-solo__player.tools-hidden .camera__tools:hover {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(-50%) translateY(20px) !important;
}

.ctool {
    display: grid;
    grid-auto-flow: column;
    place-items: center;
    gap: 6px;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.15s, transform 0.15s;
}
.ctool[hidden],
.ctool-sep[hidden] { display: none; }
.ctool:hover { background: rgba(30, 144, 255, 0.18); }
.ctool:active { transform: scale(0.92); }
.ctool:focus-visible { outline: 2px solid #1e90ff; outline-offset: 2px; }
.ctool i { font-size: 15px; }

.ctool--rec i { color: #1e90ff; }
.ctool--rec.is-rec {
    background: rgba(30, 144, 255, 0.95);
    animation: camRecPulse 1.4s infinite;
}
.ctool--rec.is-rec i { color: #fff; }

.ctool--zoom,
.ctool__time {
    font-family: var(--font-mono, monospace);
    font-variant-numeric: tabular-nums;
}

.ctool-sep {
    width: 1px;
    height: 20px;
    margin: 0 2px;
    background: rgba(30, 144, 255, 0.28);
}

@keyframes camRecPulse {
    0%   { box-shadow: 0 0 0 0 rgba(30, 144, 255, 0.65); }
    70%  { box-shadow: 0 0 0 10px rgba(30, 144, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 144, 255, 0); }
}

/* ================================================================
   ГРОМКОСТЬ
   ================================================================ */
.ctool-volume {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 4px 0 0;
    border-radius: 999px;
    transition: background 0.15s;
}
.ctool-volume:hover { background: rgba(30, 144, 255, 0.1); }

.ctool__slider {
    -webkit-appearance: none;
    appearance: none;
    width: 70px;
    height: 4px;
    border-radius: 2px;
    background: rgba(30, 144, 255, 0.28);
    outline: none;
    cursor: pointer;
    margin: 0 2px;
}
.ctool__slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(30, 144, 255, 0.28);
}
.ctool__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1e90ff;
    border: 0;
    margin-top: -4px;
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.8);
    cursor: pointer;
}
.ctool__slider::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(30, 144, 255, 0.28);
}
.ctool__slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1e90ff;
    border: 0;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.8);
}

@media (max-width: 720px) { .ctool__slider { width: 52px; } }
@media (max-width: 480px) { .ctool__slider { width: 40px; } }

/* ================================================================
   TOAST + FLASH
   ================================================================ */
.camera__toast {
    position: absolute;
    left: 50%;
    bottom: 72px;
    z-index: 9;
    max-width: calc(100% - 32px);
    padding: 11px 18px;
    text-align: center;
    border-radius: 999px;
    background: rgba(5, 7, 15, 0.94);
    border: 1px solid rgba(30, 144, 255, 0.3);
    color: #fff;
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    letter-spacing: 0.04em;
    opacity: 0;
    transform: translate(-50%, 8px);
    pointer-events: none;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.camera__toast.is-on {
    opacity: 1;
    transform: translate(-50%, 0);
}

.camera__flash {
    position: absolute;
    inset: 0;
    z-index: 7;
    background: #fff;
    opacity: 0;
    pointer-events: none;
}
.camera__flash.is-on { animation: camFlash 0.35s ease-out; }
@keyframes camFlash {
    0% { opacity: 0.55; }
    100% { opacity: 0; }
}

/* ================================================================
   БЕЙДЖИ LIVE + REC
   ================================================================ */
.camera__badges {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    pointer-events: none;
}

.camera__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-sizing: border-box;
    min-width: 80px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    color: #fff;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.camera__badge--live {
    background: rgba(5, 7, 15, 0.78);
    border: 1px solid rgba(30, 144, 255, 0.4);
    box-shadow: 0 0 24px rgba(30, 144, 255, 0.18);
}
.camera__badge--live .camera__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e676;
    flex-shrink: 0;
    box-shadow: 0 0 8px #00e676;
    animation: livePulseDot 1.8s ease-in-out infinite;
}
@keyframes livePulseDot {
    0%   { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); opacity: 1; }
    70%  { box-shadow: 0 0 0 8px rgba(0, 230, 118, 0); opacity: 1; }
    100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); opacity: 1; }
}

.camera__badge--rec {
    background: rgba(5, 7, 15, 0.78);
    border: 1px solid rgba(30, 144, 255, 0.5);
    box-shadow: 0 0 24px rgba(30, 144, 255, 0.28);
}
.camera__badge--rec[hidden] { display: none; }
.camera__badge--rec .camera__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1e90ff;
    flex-shrink: 0;
    box-shadow: 0 0 8px #1e90ff;
    animation: recBlink 1.1s ease-in-out infinite;
}
@keyframes recBlink {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(30, 144, 255, 0.6); }
    50% { opacity: 0.35; box-shadow: 0 0 0 4px rgba(30, 144, 255, 0); }
}

/* ================================================================
   ЛОАДЕР
   ================================================================ */
.camera__loader {
    position: absolute;
    left: 50%;
    top: calc(50% + 80px);
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
    text-align: center;
    opacity: 0;
    animation: loaderFadeIn 0.35s ease-out forwards;
}
@keyframes loaderFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.camera__loader.is-hiding { animation: loaderFadeOut 0.3s ease-in forwards; }
@keyframes loaderFadeOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(6px); }
}

.camera__loader-text {
    font-family: var(--font-mono, monospace);
    font-weight: 700;
    font-size: 14px;
    color: #e8f4ff;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85), 0 0 24px rgba(30, 144, 255, 0.55);
    white-space: nowrap;
}
.camera__loader-dots { display: inline-flex; margin-left: 2px; }
.camera__loader-dots span {
    display: inline-block;
    animation: dotBlink 1.4s infinite;
    opacity: 0.3;
    color: #1e90ff;
}
.camera__loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.camera__loader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBlink {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

@media (max-width: 480px) {
    .camera__loader { top: calc(50% + 62px); }
    .camera__loader-text { font-size: 12px; }
}

/* ================================================================
   МОБИЛЬНАЯ ВЕРСИЯ
   ================================================================ */
@media (max-width: 720px) {
    .camera-solo__player .camera__tools {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
        gap: 2px;
        padding: 6px 8px;
        opacity: 1;
        visibility: visible;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        background: rgba(5, 7, 15, 0.92);
    }
    .camera-solo__player.tools-hidden .camera__tools {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(20px) !important;
    }

    .ctool {
        min-width: 34px;
        height: 34px;
        padding: 0 5px;
        gap: 3px;
    }
    .ctool i { font-size: 13px; }
    .ctool__time { font-size: 11px; margin-left: 2px; }

    .ctool-sep { margin: 0 1px; height: 16px; }
    .ctool-volume { gap: 2px; }
    .ctool__slider { width: 42px; margin: 0 1px; }

    .camera__info { font-size: 11px; padding: 8px 10px; max-width: 245px; }
    .camera__toast { bottom: auto; top: calc(100% + 50px); font-size: 11px; }

    .camera__badges { top: 6px; right: 6px; gap: 5px; }
    .camera__badge {
        min-width: 68px;
        height: 24px;
        padding: 0 9px;
        font-size: 10px;
        gap: 5px;
    }
    .camera__badge--live .camera__badge-dot,
    .camera__badge--rec  .camera__badge-dot {
        width: 7px;
        height: 7px;
    }
}

@media (max-width: 380px) {
    .ctool {
        min-width: 30px;
        height: 30px;
        padding: 0 4px;
    }
    .ctool i { font-size: 12px; }
    .ctool__time { font-size: 10px; }
    .ctool__slider { width: 36px; }
    .ctool-sep { margin: 0; }

    .camera__badge {
        min-width: 62px;
        height: 22px;
        padding: 0 7px;
        font-size: 9px;
    }
}

/* ================================================================
   ПОЛНОЭКРАННЫЙ РЕЖИМ (телефон)
   ================================================================ */
.camera-solo__player.is-full {
    position: fixed;
    top: 0; left: 0;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none;
    aspect-ratio: auto;
    z-index: 3000;
    background: #000;
    box-shadow: none;
    outline: 0;
}
.camera-solo__player.is-full .camera__tools {
    position: absolute !important;
    left: 50% !important;
    bottom: 16px !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    max-width: calc(100% - 32px) !important;
    border-radius: 999px !important;
    border: 1px solid rgba(30, 144, 255, 0.22) !important;
    background: rgba(5, 7, 15, 0.82) !important;
    padding: 6px !important;
}
.camera-solo__player.is-full.tools-hidden .camera__tools {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(-50%) translateY(20px) !important;
}
@media (max-width: 720px) {
    .camera-solo__player.is-full .camera__tools {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
        border-bottom: 0 !important;
        transform: none !important;
    }
    .camera-solo__player.is-full.tools-hidden .camera__tools {
        transform: translateY(20px) !important;
    }
}

/* ================================================================
   ЛОГОТИП-ССЫЛКА НА RTSP.RU
   ================================================================ */
.camera__sponsor-link {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: block;
    line-height: 0;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.camera__sponsor-link:hover {
    opacity: 1;
    transform: scale(1.03);
}
.camera__sponsor-link:focus-visible {
    outline: 2px solid #1e90ff;
    outline-offset: 2px;
    border-radius: 4px;
}
.camera__sponsor-link img {
    display: block;
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

@media (max-width: 720px) {
    .camera__sponsor-link { top: 6px; left: 6px; }
    .camera__sponsor-link img { height: 30px; max-width: 120px; }
}
@media (max-width: 380px) {
    .camera__sponsor-link img { height: 26px; max-width: 100px; }
}