/* ═══════════════════════════════════════════════════════
   LLGS Components — Player, Archive, Processing
═══════════════════════════════════════════════════════ */

/* ── Player ── */
.llgs-player {
  background: var(--llgs-surface);
  border: 1px solid var(--llgs-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.llgs-player-canvas {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #000;
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
}
.llgs-player-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity .12s ease;
}
.llgs-player-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: .7rem;
  padding: .25rem .6rem;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity .3s;
}
.llgs-player-canvas:hover .llgs-player-hint { opacity: 0; }
.llgs-player-controls { padding: .5rem 1rem; }
.llgs-player-placeholder {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--llgs-muted);
  background: var(--llgs-surface-2);
}
.llgs-player-preview { border-radius: var(--radius-lg); overflow: hidden; }

/* Embed page player */
.llgs-player-page .llgs-player { border-radius: var(--radius-xl); }

/* ── Depth indicator ── */
.llgs-depth-indicator {
  height: 4px;
  background: linear-gradient(90deg, var(--depth-near), var(--depth-mid), var(--depth-far));
  border-radius: 2px;
  margin-top: .25rem;
}
.llgs-depth-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  margin-top: -7px;
  position: relative;
  transition: left .1s;
  box-shadow: 0 0 6px rgba(var(--accent-rgb),.5);
}

/* ── Archive page ── */
.llgs-archive-hero {
  background: var(--llgs-surface);
  border: 1px solid var(--llgs-border);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.llgs-archive-logo {
  width: 56px;
  height: 56px;
  background: var(--accent-bg);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent);
  flex-shrink: 0;
}
.llgs-archive-notice {
  background: rgba(var(--accent-rgb),.08);
  border: 1px solid rgba(var(--accent-rgb),.3);
  border-radius: var(--radius-md);
  color: var(--llgs-text);
  font-size: .85rem;
}

.llgs-archive-card {
  background: var(--llgs-surface);
  border: 1px solid var(--llgs-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}
.llgs-archive-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.llgs-archive-card-header {
  display: flex;
  align-items: center;
  padding: .85rem 1rem;
  background: var(--llgs-surface-2);
  border-bottom: 1px solid var(--llgs-border);
  font-size: .85rem;
}
.llgs-archive-card-body { padding: .85rem 1rem; flex: 1; }
.llgs-archive-card-footer {
  padding: .75rem 1rem;
  border-top: 1px solid var(--llgs-border);
}

/* Platform badges */
.llgs-platform-windows { color: #00adef; }
.llgs-platform-mac     { color: #aaa; }
.llgs-platform-camera  { color: var(--depth-near); }

/* ── Processing timeline ── */
.llgs-processing-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--llgs-border);
}
.llgs-processing-step:last-child { border-bottom: none; }
.llgs-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}
.llgs-step-done    { background: rgba(63,185,80,.15); color: #3fb950; }
.llgs-step-running { background: rgba(88,166,255,.15); color: var(--accent); }
.llgs-step-pending { background: var(--llgs-surface-2); color: var(--llgs-muted); }
.llgs-step-failed  { background: rgba(248,81,73,.15); color: #f85149; }

/* ── Focus layer timeline ── */
.llgs-layer-timeline {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .5rem 0;
}
.llgs-layer-thumb {
  flex-shrink: 0;
  width: 60px;
  text-align: center;
  cursor: pointer;
}
.llgs-layer-thumb img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: border-color .12s;
}
.llgs-layer-thumb:hover img,
.llgs-layer-thumb.active img { border-color: var(--accent); }
.llgs-layer-thumb .layer-label { font-size: .65rem; color: var(--llgs-muted); margin-top: .2rem; }

/* ── Manifest viewer ── */
.llgs-manifest-viewer {
  background: var(--llgs-bg);
  border-radius: var(--radius-md);
  padding: .75rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  max-height: 300px;
  overflow: auto;
  color: var(--llgs-text);
}

/* ── Status flash ── */
@keyframes statusFlash {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}
.llgs-status-flash { animation: statusFlash 1.5s ease infinite; }

/* ── Skeleton loader ── */
.llgs-skeleton {
  background: linear-gradient(90deg, var(--llgs-surface-2) 25%, var(--llgs-border) 50%, var(--llgs-surface-2) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive sidebar ── */
@media (max-width: 991.98px) {
  .llgs-sidebar {
    position: fixed;
    left: -240px;
    z-index: 1050;
    transition: left .2s ease;
    box-shadow: var(--shadow-xl);
  }
  .llgs-sidebar.open { left: 0; }
}

/* ── Album navigation arrows ── */
.llgs-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 50%;
  font-size: 1.1rem;
  text-decoration: none;
  opacity: 0;
  transition: opacity .2s, background .2s;
}
.llgs-nav-prev { left: 10px; }
.llgs-nav-next { right: 10px; }
.llgs-player-canvas:hover .llgs-nav-arrow,
.llgs-player-canvas:focus-within .llgs-nav-arrow { opacity: 1; }
.llgs-nav-arrow:hover { background: rgba(0,0,0,.8); color: #fff; }
@media (max-width: 767px) {
  .llgs-nav-arrow { opacity: .7; width: 36px; height: 36px; }
}
