﻿/* ========================================================================
   КИБЕРПАНК ВИДЕОПЛЕЕР: ЧАСТЬ 1 — СТИЛИ CSS (ИСПРАВЛЕННЫЕ)
   ======================================================================== */

/* Изоляция стилей видеоплеера от шаблона сайта */
.cyber-video-wrapper,
.cyber-video-wrapper ~ div,
.cyber-video-wrapper * { 
  box-sizing: border-box; 
  font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif !important;
}

  /* ВЕРНУЛИ ЧЁРНЫЙ ЗАЩИТНЫЙ КОНТУР ВОКРУГ КОРПУСА */
  .cyber-video-wrapper {
    width: 100%;
    max-width: 950px;
    margin: 15px auto;
    display: block;
    position: relative;
    padding: 6px !important;       /* 🌟 ВЕРНУЛИ: Создает те самые аккуратные поля вокруг неона */
    background: #000000 !important; /* 🌟 ВЕРНУЛИ: Плотная чёрная подложка-контур */
    border: none !important;
  }

/* ========================================================================
   ИЗНАЧАЛЬНОЕ СОСТОЯНИЕ: ЭКРАН ПОЛНОСТЬЮ СВЕРНУТ В ТОНКУЮ ЛИНИЮ
   ======================================================================== */
.cyber-video-screen-container {
  width: 100%;
  height: 0;               
  padding-bottom: 0;       
  overflow: hidden;        
  opacity: 0;              
  
  /* Задаем контур заранее, чтобы слои не прыгали */
  border: 2px solid transparent; 
  box-shadow: 0 0 0px transparent;
  margin-bottom: 0px;
  position: relative;
  
  /* Плавная анимация разворачивания за 0.4 секунды */
  transition: height 0.4s ease, padding-bottom 0.4s ease, opacity 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, margin 0.4s ease;
}

/* Стили самого тега video внутри контейнера */
.cyber-video-screen-container video {
  position: absolute;       
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================================================
   СОСТОЯНИЕ ВОСПРОИЗВЕДЕНИЯ: ЭКРАН ПЛАВНО РАЗВОРАЧИВАЕТСЯ В 16:9
   ======================================================================== */
.cyber-video-wrapper:has(.sub-active) .cyber-video-screen-container {
  height: auto;
  padding-bottom: 56.25%;   
  opacity: 1;               
  margin-bottom: 12px;      
  
  /* 🌟 ИСХОДНЫЕ НАСТРОЙКИ: Мягкий контур и легкая внутренняя подсветка, как в аудио */
  border-color: #00f0ff !important; 
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4), inset 0 0 5px rgba(0, 240, 255, 0.2) !important;
}


/* Анимации неона, синей/оранжевой пульсации и глитч-эффекта */
  /* ИСХОДНЫЕ НАСТРОЙКИ СВЕЧЕНИЯ КОРПУСА (УМЕНЬШЕНО ДО 8px И 10px) */
  @keyframes synchronizedNeon {
    0% {
      border-color: #00f0ff;
      color: #00f0ff;
      text-shadow: 0 0 4px #00f0ff;
      box-shadow: 0 0 8px rgba(0, 240, 255, 0.4), inset 0 0 4px rgba(0, 240, 255, 0.15);
    }
    50% {
      border-color: #00ff66;
      color: #00ff66;
      text-shadow: 0 0 5px #00ff66;
      box-shadow: 0 0 10px rgba(0, 255, 102, 0.4), inset 0 0 5px rgba(0, 255, 102, 0.2);
    }
    100% {
      border-color: #00f0ff;
      color: #00f0ff;
      text-shadow: 0 0 4px #00f0ff;
      box-shadow: 0 0 8px rgba(0, 240, 255, 0.4), inset 0 0 4px rgba(0, 240, 255, 0.15);
    }
  }


@keyframes activeHeavyBluePulse {
  0% {
    color: #0055ff;
    border-color: #0044ee;
    text-shadow: 0 0 6px rgba(0, 85, 255, 0.8); 
    box-shadow: 0 0 10px rgba(0, 68, 238, 0.6), inset 0 0 4px rgba(0, 68, 238, 0.3);
  }
  50% {
    color: #0022aa;
    border-color: #001199;
    text-shadow: 0 0 2px rgba(0, 34, 170, 0.3);
    box-shadow: 0 0 4px rgba(0, 34, 170, 0.2), inset 0 0 2px rgba(0, 34, 170, 0.1);
  }
  100% {
    color: #0055ff;
    border-color: #0044ee;
    text-shadow: 0 0 6px rgba(0, 85, 255, 0.8);
    box-shadow: 0 0 10px rgba(0, 68, 238, 0.6), inset 0 0 4px rgba(0, 68, 238, 0.3);
  }
}

@keyframes cyberMatrixJitter {
  0% { transform: translate(1.5px, -1px); }
  15% { transform: translate(-2px, 1.5px); }
  30% { transform: translate(2px, -2px); }
  45% { transform: translate(-1.5px, 2px); }
  60% { transform: translate(2.5px, -1px); }
  75% { transform: translate(-2px, -1.5px); }
  90% { transform: translate(1px, 2px); }
  100% { transform: translate(0, 0); }
}

@keyframes cyberMarquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* Основная панель управления под видео */
.cyber-bar-video {
  display: flex;
  align-items: center;
  background: #000000 !important;
  border: 2px solid #00f0ff;
  padding: 8px 12px; 
  width: 100%;
  height: 50px;
  position: relative;
  z-index: 100;
  animation: synchronizedNeon 6s infinite ease-in-out;
}

.bar-controls {
  display: flex;
  align-items: center;
  gap: 6px; 
}

.bar-btn {
  background: transparent !important;
  border: 1px solid currentColor;
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.2s ease, box-shadow 0.2s ease, text-shadow 0.2s ease, border-color 0.2s ease;
}

#v-play { width: 75px; min-width: 75px; font-weight: 900; }
#v-stop { width: 65px; min-width: 65px; }
#v-fullscreen { width: 45px; min-width: 45px; }

.bar-btn:hover {
  animation: cyberMatrixJitter 0.12s infinite steps(1) !important;
  background: rgba(0, 240, 255, 0.15) !important;
  color: #ffffff !important;
  border-color: #00f0ff !important;
  text-shadow: 0 0 10px #00f0ff, 0 0 20px #00f0ff !important;
  box-shadow: 0 0 20px #00f0ff, inset 0 0 10px rgba(0, 240, 255, 0.5) !important;
}

.bar-btn:active { transform: scale(0.95); }

.cyber-sys-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
  user-select: none;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 1px solid #44444d;
  color: #44444d;
  background: transparent !important;
}

.cyber-sys-label.sys-active {
  animation: activeHeavyBluePulse 5s infinite ease-in-out !important;
}

.bar-progress-block {
  display: flex;
  align-items: center;
  flex-grow: 1;
  margin-left: 15px;
  gap: 10px;
}

.bar-time {
  font-size: 10px;
  color: #b0b0bc; 
  min-width: 35px;
  text-align: center;
  line-height: 1;
  text-shadow: 0 0 2px rgba(176, 176, 188, 0.2); 
}

.bar-progress-container {
  background: #111115;
  border: 1px solid #222233;
  height: 6px;
  flex-grow: 1;
  cursor: pointer;
  position: relative;
}

.bar-progress-bar {
  background: linear-gradient(90deg, #00f0ff, #00ff66);
  width: 0%;
  height: 100%;
  box-shadow: 0 0 8px #00ff66;
  transition: width 0.1s linear;
}

.cyber-sub-bar {
  width: 96%;
  margin: 0 auto;
  height: 0px; 
  background: #050508 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  overflow: hidden;
  position: relative;
  z-index: 50;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-top: none;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cyber-sub-bar.sub-active {
  height: 52px;
  animation: synchronizedNeon 6s infinite ease-in-out;
}

.decryption-center-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  text-align: center;
  gap: 4px;
  padding: 0 20px;
  overflow: hidden;
}

.sub-btn {
  height: 26px;
  width: 60px;
  min-width: 60px;
  font-size: 9px;
}

.decryption-status-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  user-select: none;
}

.decryption-status-label.sys-active {
  animation: activeHeavyBluePulse 5s infinite ease-in-out !important;
}

.marquee-box {
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.decryption-status-filename {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  user-select: none;
  animation: synchronizedNeon 6s infinite ease-in-out !important;
}

.cyber-sub-bar:hover .marquee-active {
  display: inline-block;
  padding-left: 100%;
  animation: cyberMarquee 12s linear infinite !important;
}

@keyframes activeHeavyOrangePulse {
  0% {
    color: #ff5500;
    border-color: #dd4400;
    text-shadow: 0 0 5px #ff5500; 
    box-shadow: 0 0 8px rgba(255, 85, 0, 0.4), inset 0 0 4px rgba(255, 85, 0, 0.2);
  }
  50% {
    color: #cc3300;
    border-color: #aa2200;
    text-shadow: 0 0 2px rgba(204, 51, 0, 0.5);
    box-shadow: 0 0 4px rgba(170, 34, 0, 0.3), inset 0 0 2px rgba(170, 34, 0, 0.1);
  }
  100% {
    color: #ff5500;
    border-color: #dd4400;
    text-shadow: 0 0 5px #ff5500;
    box-shadow: 0 0 8px rgba(255, 85, 0, 0.4), inset 0 0 4px rgba(255, 85, 0, 0.2);
  }
}

.cyber-sys-label.sys-loading {
  animation: activeHeavyOrangePulse 2s infinite ease-in-out !important;
}

.decryption-status-label.typing-orange {
  animation: none !important;
  color: #ff5500 !important;   
  text-shadow: 0 0 8px #ff5500, 0 0 15px #ff5500 !important;
}
