/* ==========================================================
   Цвета и размеры — меняйте переменные, чтобы перекрасить всё
   ========================================================== */
:root{
  --bg-1: #0d0906;
  --bg-2: #1c130c;
  --accent: #f7931e;
  --accent-2: #ffcf6b;
  --text: #fbf3ea;
  --muted: #c2ac97;
  --card-bg: #1e140c;
  --radius-lg: 22px;
  --marquee-duration: 14s; /* меньше = быстрее крутится слайдшоу */
  --player-slide-duration: 12s; /* полный круг смены фото в плеере (4 фото) */
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
}

body{
  min-height: 100vh;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(247,147,30,.20), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

/* ================= Общий контейнер ================= */

.shell{
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================= Контейнер верхней части ================= */

.page{
  padding: 26px 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ================= Плеер ================= */

.player-wrap{
  width: 100%;
  display: flex;
  justify-content: center;
}

.player-card{
  width: min(260px, 62vw);
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.player{
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: linear-gradient(135deg, #241a10, #140d08);
}

.player-fallback{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.3);
  font-size: 14px;
}

.player-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: player-crossfade var(--player-slide-duration) infinite;
}

.player-bg.is-missing{
  display: none;
}

.player-bg:nth-of-type(1){ animation-delay: 0s; }
.player-bg:nth-of-type(2){ animation-delay: calc(var(--player-slide-duration) * 0.25); }
.player-bg:nth-of-type(3){ animation-delay: calc(var(--player-slide-duration) * 0.5); }
.player-bg:nth-of-type(4){ animation-delay: calc(var(--player-slide-duration) * 0.75); }

@keyframes player-crossfade{
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  22%  { opacity: 1; }
  25%  { opacity: 0; }
  100% { opacity: 0; }
}

.player-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(10,6,3,.7));
}

/* --- верхняя строка плеера: аватар + имя + HD --- */

.player-top{
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-channel{
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-avatar{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 2px solid rgba(255,255,255,.25);
  flex: 0 0 auto;
}

.channel-name{
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
}

.badge-hd{
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #2a1707;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 4px 10px;
  border-radius: 999px;
}

/* --- кнопка play --- */

.play-btn{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(20,14,9,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
}

.play-icon{
  width: 30px;
  height: 30px;
  fill: var(--accent);
  transform: translateX(2px);
}

.play-ring{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(247,147,30,.55);
  animation: play-pulse 2.4s ease-out infinite;
}

@keyframes play-pulse{
  0%   { transform: scale(1);   opacity: .55; }
  100% { transform: scale(1.6); opacity: 0;   }
}

/* --- прогресс-бар --- */

.player-progress{
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  z-index: 2;
}

.progress-track{
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  overflow: hidden;
}

.progress-fill{
  height: 100%;
  width: 42%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.progress-time{
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
}

/* --- инфо-панель под видео (в той же карточке) --- */

.player-info{
  padding: 18px 20px 22px;
  text-align: left;
  border-top: 1px solid rgba(255,255,255,.06);
}

.info-desc{
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* ================= Заголовок под плеером ================= */

.page-title{
  margin: 24px 0 0;
  max-width: 480px;
  color: var(--text);
  font-size: clamp(18px, 3.2vw, 24px);
  font-weight: 800;
  line-height: 1.3;
}

/* ================= Слайдшоу ================= */

.marquee{
  width: 100%;
  overflow: hidden;
  padding: 16px 0 56px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track{
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee-scroll var(--marquee-duration) linear infinite;
}

@keyframes marquee-scroll{
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.slide{
  position: relative;
  flex: 0 0 auto;
  width: 180px;
  height: 236px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #241a10, #140d08);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.slide-num{
  color: rgba(255,255,255,.3);
  font-size: 14px;
  z-index: 0;
}

.slide img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.slide img.is-missing{
  display: none;
}

.slide::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(10,6,3,.6));
  z-index: 1;
}

.slide-play{
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-play::before{
  content: "";
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(20,14,9,.55);
  border: 1.5px solid rgba(255,255,255,.3);
  backdrop-filter: blur(3px);
  position: absolute;
}

.slide-play svg{
  position: relative;
  width: 15px;
  height: 15px;
  fill: var(--accent);
  transform: translateX(1px);
}

/* ================= Адаптив ================= */

@media (max-width: 480px){
  .page{ padding: 20px 0 24px; }
  .play-btn{ width: 68px; height: 68px; }
  .play-icon{ width: 24px; height: 24px; }
  .slide{ width: 148px; height: 194px; }
}
