/* ==========================================================================
   DYNAMIC TOP READING & SCROLL HUD SLIDER
   Ayush Dubey High-Craft Physical AI Aesthetic
   ========================================================================== */

.top-reading-slider-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(4, 7, 16, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000000;
  cursor: pointer;
  transition: height 0.22s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
  user-select: none;
  touch-action: none;
}

.top-reading-slider-container:hover,
.top-reading-slider-container.scrubbing {
  height: 8px;
  background: rgba(6, 11, 24, 0.92);
}

.top-reading-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.top-reading-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f0ff 0%, #7000ff 50%, #00ff88 100%);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.7), 0 0 20px rgba(112, 0, 255, 0.45);
  transition: width 0.08s linear;
}

.top-reading-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%) scale(0.6);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #00f0ff;
  box-shadow: 0 0 10px #00f0ff, 0 0 20px rgba(0, 240, 255, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-reading-slider-container:hover .top-reading-thumb,
.top-reading-slider-container.scrubbing .top-reading-thumb {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Floating HUD pill indicator */
.top-reading-hud-pill {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  opacity: 0;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(6, 10, 22, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 14px rgba(0, 240, 255, 0.15);
  border-radius: 999px;
  padding: 4px 14px;
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #94a3b8;
  z-index: 1000002;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.top-reading-hud-pill.hud-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.top-reading-hud-pill:hover {
  border-color: rgba(0, 240, 255, 0.7);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.3);
  transform: translateX(-50%) translateY(-1px);
}

.top-reading-hud-pill .hud-prog-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 6px #00f0ff;
  animation: hud-dot-pulse 2s infinite ease-in-out;
}

@keyframes hud-dot-pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 10px #00f0ff; }
}

.top-reading-hud-pill .hud-prog-val {
  color: #00f0ff;
  font-weight: 700;
}

.top-reading-hud-pill .hud-prog-time {
  color: #10b981;
  font-weight: 600;
}

.top-reading-hud-pill .hud-prog-section {
  color: #cbd5e1;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.top-reading-hud-pill .hud-sep {
  color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .top-reading-hud-pill {
    top: 8px;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    padding: 3px 10px;
    font-size: 0.65rem;
    gap: 5px;
    max-width: 82vw;
  }
  .top-reading-hud-pill .hud-prog-section,
  .top-reading-hud-pill .hud-sep-hide-mob {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .brand-title {
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
  }
}
