* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background: black;
  overflow: hidden;
  touch-action: none;
  font-family: system-ui, -apple-system;
}

#player {
  position: fixed;
  inset: 0;
  background: black;
  overflow: hidden;
  touch-action: none;
}

video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
  will-change: transform;
}

video.hidden {
  opacity: 0;
  pointer-events: none;
}

video.visible {
  opacity: 1;
}

/* 🔘 SIDE CONTROLS */
#controls {
  position: fixed;
  right: 14px;
  bottom: 60px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* PERFECT CIRCLES — WHITE */
#controls button {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;

  background: #ffffff;
  color: #000000;
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* animation helper */
.animate {
  transition: transform 0.25s ease-out;
}

/* 🔒 NEXT VIDEO LOCK */
#nextLock {
  position: fixed;
  left: 10px;
  bottom: 10px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  filter: drop-shadow(0 0 4px rgba(255, 204, 0, 0.6));
  z-index: 9999;
}

#nextLock.locked {
  opacity: 1;
  animation: lockPulse 1.4s ease-in-out infinite;
}

#nextLock.unlocked {
  animation: unlockPop 0.35s ease-out forwards;
}

@keyframes lockPulse {
  0%   { transform: scale(0.9); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(0.9); }
}

@keyframes unlockPop {
  0%   { opacity: 1; transform: scale(1); }
  60%  { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(0.6); }
}

/* 🎮 TAP CONTROLS OVERLAY */
#tapControls {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  pointer-events: none;
  opacity: 0;
  z-index: 9998;
}

#tapControls.visible {
  opacity: 1;
  pointer-events: auto;
}

/* FACEBOOK / iOS STYLE CONTROLS */
.ctrl {
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  color: #ffffff;

  transform: scale(0.85);
  animation: ctrlPulse 1.6s ease-in-out infinite;
  transition: transform 0.2s ease, opacity 0.25s ease;
  user-select: none;
}

/* 5− and 5+ text style */
.ctrl-back,
.ctrl-fwd {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* play / pause icon ONLY */
.ctrl-play i {
  font-size: 26px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.ctrl-play.morph i {
  transform: scale(0.6);
  opacity: 0;
}

.ctrl:active,
#controls button:active {
  transform: scale(0.92);
}

#tapControls.visible .ctrl {
  transform: scale(1);
}

#tapControls.hiding .ctrl {
  opacity: 0;
  transform: scale(0.6);
}

@keyframes ctrlPulse {
  0%   { transform: scale(0.95); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(0.95); }
}


/* 🇸🇴 SOMALI FLAG PROGRESS BAR */

#progressWrap {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.15);
  z-index: 9999;
  overflow: hidden;
}

#progressBar {
  height: 100%;
  width: 0%;
  background: #4AA3FF; /* Somali flag blue */
  box-shadow:
    0 0 6px rgba(74,163,255,0.9),
    0 0 12px rgba(74,163,255,0.7);
  transition: width 0.08s linear;
}

/* ✨ glow pulse while playing */
.playing #progressBar {
  animation: glowPulse 1.4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%   { box-shadow: 0 0 4px rgba(74,163,255,0.5); }
  50%  { box-shadow: 0 0 12px rgba(74,163,255,1); }
  100% { box-shadow: 0 0 4px rgba(74,163,255,0.5); }
}

