/* ────────────────────────────────────────────────
   CosmoVisión Digital – Custom Player Design
   Dark Purple Theme + Logo Loading + Watermark
──────────────────────────────────────────────── */

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: #0d0218;
  color: #eee;
  font: 14px/1.4 "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}

/* ========== FULL SCREEN STAGE ========== */
#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  z-index: 1;
}

video#v {
 position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: block;

}

/* ========== WATERMARK LOGO ========== */
#logo {
  position: absolute !important;
  bottom: 80px !important;
  right: 28px !important;
  width: clamp(100px, 13vw, 180px) !important;
  height: auto !important;
  opacity: 0.82 !important;
  pointer-events: none !important;
  z-index: 20 !important;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.7));
  transition: opacity 0.3s ease;
  display: block !important;
}

#stage:hover #logo {
  opacity: 0.95 !important;
}

/* ========== LOADING SCREEN ========== */
#over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: radial-gradient(circle at center, #1a0a2ecc, #0d0218);
  z-index: 10;
  transition: opacity 0.4s ease;
}

#loading-logo {
  width: clamp(140px, 22vw, 240px);
  opacity: 0.95;
  filter: drop-shadow(0 4px 20px rgba(168, 85, 247, 0.45));
  animation: pulse 2s ease-in-out infinite;
}

#spin {
  width: 48px;
  height: 48px;
  border: 4px solid #9b59b644;
  border-top-color: #c084fc;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

#msg {
  color: #d8b4fe;
  font-size: 14px;
  text-align: center;
  max-width: 80%;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.04); opacity: 1; }
}

/* ========== CONTROL BAR ========== */
#bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 14px;
  background: linear-gradient(transparent, #1a0a2eee 40%, #0d0218);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 6;
}

#stage:hover #bar,
#stage.idle-no #bar,
#bar:focus-within {
  opacity: 1;
}

#bar button {
  background: none;
  border: 0;
  color: #e9d5ff;
  font-size: 20px;
  width: 40px;
  height: 36px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

#bar button:hover {
  background: #7c3aed55;
  color: #fff;
  transform: scale(1.08);
}

#vol {
  width: 90px;
  accent-color: #a855f7;
}

#live {
  background: #4c1d95;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.6px;
}

#live.on {
  background: linear-gradient(90deg, #7c3aed, #c026d3);
  box-shadow: 0 0 12px #a855f7aa;
}

#how, #viewers {
  font-size: 12px;
  color: #d8b4fe;
}

#now {
  font-size: 13px;
  color: #f3e8ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.grow { flex: 1; }

/* Unmute prompt */
#unmute {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(124, 58, 237, 0.9);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  z-index: 15;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

/* Hide unused / optional platform elements for a clean fullscreen look */
#backdrop,
#art,
#eq,
#side,
#info {
  display: none !important;
}

/* Mobile */
@media (hover: none) {
  #bar { opacity: 1; }
  #vol { display: none; }
}

@media (max-width: 600px) {
  #logo {
    bottom: 70px !important;
    right: 16px !important;
    width: 110px !important;
  }

  #loading-logo {
    width: 160px;
  }

  #bar {
    padding: 16px 10px 12px;
    gap: 6px;
  }

  #bar button {
    font-size: 18px;
    width: 36px;
  }
}