/* Placeholder styles for the v2 static viewer entry. */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}

#root {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-header {
  height: 64px;
  border-bottom: 1px solid #1f2937;
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: #0b1220;
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #60a5fa;
}

.app-title h1 {
  margin: 0;
  font-size: 18px;
  color: #e2e8f0;
  letter-spacing: -0.02em;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 16px 16px;
  gap: 12px;
  max-height: calc(100vh - 64px);
  overflow: hidden;
}

.player-wrap {
  width: 100%;
  max-width: 1100px;
  height: calc((100vh - 64px) * 0.66);
  min-height: 240px;
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.player-wrap video {
  width: 100%;
  height: 100%;
}

.log-panel {
  width: 100%;
  max-width: 1100px;
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  flex-shrink: 0;
  height: calc((100vh - 64px) * 0.34);
  min-height: 160px;
}

.log-title {
  font-size: 12px;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 6px;
}

.log-body {
  height: calc(100% - 28px);
  overflow-y: auto;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: #cbd5e1;
}

/* DoubleBufferedPlayer */
.dbp-root {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #000;
  border: 1px solid #1f2937;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.dbp-video-area {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
}

.dbp-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  transition: opacity 0.2s linear;
}

.dbp-video-active {
  opacity: 1;
  z-index: 2;
}

.dbp-video-inactive {
  opacity: 0;
  z-index: 1;
}

.dbp-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.0) 30%, rgba(0,0,0,0.65) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  gap: 12px;
  z-index: 3;
  transition: opacity 0.3s ease;
}

.dbp-top-info h3 {
  margin: 0 0 4px 0;
  color: #fff;
  font-size: 18px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.dbp-top-info p {
  margin: 0;
  font-size: 12px;
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: rgba(0, 0, 0, 0.6);
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
}

.dbp-progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
  cursor: default;
}

.dbp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #34d399);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
  transition: width 0.2s linear;
}

.dbp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.dbp-controls button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.dbp-controls button:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.dbp-controls button:nth-child(2) {
  width: 64px;
  height: 64px;
  background: #fff;
  color: #0f172a;
}

.dbp-status {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.dbp-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 12px;
}

.dbp-chip-error {
  background: rgba(248, 113, 113, 0.22);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecdd3;
}

.spin {
  animation: spin 1s linear infinite;
}

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

.dbp-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  pointer-events: none;
}

.dbp-loading-inner {
  background: rgba(0, 0, 0, 0.65);
  padding: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.dbp-error {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(127, 29, 29, 0.85);
  color: #fecdd3;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.6);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  z-index: 5;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

.dbp-status-bar {
  background: #0b1220;
  border-top: 1px solid #1f2937;
  color: #94a3b8;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
}

.dbp-status-left,
.dbp-status-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
