/**
 * Rekaptr Medal Clip Studio - Dedicated Clip Watching & Theater Page
 * Features: 16:9 Cinema Player, Teammate Multi-POV Match Switcher,
 * Isolated Audio Channel Inspector, Timecoded Comments, and Related Match Clips
 */

.watch-container-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  overflow-y: auto;
  background-color: var(--bg-app);
  padding: 20px 32px 80px 32px;
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* -------------------------------------------------------------
 * 1. Top Navigation & Breadcrumb Action Bar
 * ------------------------------------------------------------- */
.watch-top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.watch-breadcrumb-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-watch-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  height: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-watch-back:hover {
  background: var(--bg-surface-hover);
  color: #ffffff;
  border-color: var(--border-hover);
}

.watch-breadcrumb-text {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.watch-breadcrumb-text span {
  color: var(--text-primary);
  font-weight: 600;
}

.watch-header-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-watch-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: var(--accent-iris);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-watch-action-primary:hover {
  background: var(--accent-iris-hover);
}

.btn-watch-action-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-watch-action-secondary:hover {
  background: var(--bg-surface-hover);
  color: #ffffff;
  border-color: var(--border-hover);
}

/* -------------------------------------------------------------
 * 2. Main Theater Layout (Two-Column: Player + Details & Comments)
 * ------------------------------------------------------------- */
.watch-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .watch-main-grid {
    grid-template-columns: 1fr;
  }
}

.watch-player-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cinema Video Stage Canvas */
.watch-cinema-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.watch-video-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: background-image 200ms ease;
}

.watch-cinema-viewport.split-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #000;
}

.watch-split-pane {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.watch-split-label {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
  z-index: 5;
}

/* Video Stage Overlays & Floating HUD */
.watch-stage-hud-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
}

.watch-hud-pov-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(11, 12, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.watch-hud-badges-right {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

/* Play/Pause Central Click Target */
.watch-center-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  z-index: 15;
}

.watch-center-play-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--accent-iris);
}

.watch-center-play-button.playing {
  opacity: 0;
  pointer-events: none;
}

/* -------------------------------------------------------------
 * 3. Pro Video Scrubber & Playback Controls Bar
 * ------------------------------------------------------------- */
.watch-controls-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.watch-scrubber-track-box {
  position: relative;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  cursor: pointer;
}

.watch-scrubber-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 4px;
  background: var(--accent-iris);
  width: 35%;
}

.watch-scrubber-marker-dot {
  position: absolute;
  top: -2px;
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: #f59e0b;
  transform: translateX(-50%);
}

.watch-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.watch-controls-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-watch-play-toggle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-watch-play-toggle:hover {
  background: var(--accent-iris);
  border-color: var(--accent-iris);
}

.watch-timecode-display {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

.watch-timecode-muted {
  color: var(--text-muted);
}

.watch-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.watch-speed-selector {
  height: 26px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 0 6px;
  outline: none;
  cursor: pointer;
}

.btn-watch-icon-toggle {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-watch-icon-toggle:hover {
  background: var(--bg-surface-raised);
  color: #fff;
}

.btn-watch-icon-toggle.active {
  color: var(--accent-iris);
}

/* -------------------------------------------------------------
 * 4. Teammate Multi-POV Perspectives Box
 * ------------------------------------------------------------- */
.watch-teammate-povs-box {
  background: var(--bg-panel);
  border: 1px solid rgba(124, 58, 237, 0.28);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.watch-pov-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.watch-pov-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #c4b5fd;
  text-transform: uppercase;
}

.watch-pov-pills-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-watch-split-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-watch-split-toggle:hover {
  border-color: var(--accent-iris);
  color: #ffffff;
}

.btn-watch-split-toggle.active {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--accent-iris);
  color: #c4b5fd;
}

/* -------------------------------------------------------------
 * 5. Multi-Track Audio Channel Inspector
 * ------------------------------------------------------------- */
.watch-audio-tracks-inspector {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.watch-audio-inspector-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.watch-audio-channels-toggles {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-watch-track-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-watch-track-toggle:hover {
  border-color: var(--border-hover);
  color: #fff;
}

.btn-watch-track-toggle.muted {
  opacity: 0.45;
  text-decoration: line-through;
}

/* -------------------------------------------------------------
 * 6. Clip Info & Creator Profile Card
 * ------------------------------------------------------------- */
.watch-clip-info-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.watch-clip-headline-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.watch-clip-title-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.watch-clip-main-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.3px;
}

.watch-clip-metadata-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.watch-author-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.watch-author-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.watch-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.watch-author-names-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.watch-author-name-text {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.watch-author-squad-text {
  font-size: 11px;
  color: var(--text-muted);
}

.watch-reactions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------
 * 7. Right Column: Timecoded Comments & Related Clips
 * ------------------------------------------------------------- */
.watch-sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.watch-comments-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.watch-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.watch-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.watch-comment-input-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
}

.watch-comment-textarea {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  resize: none;
  height: 48px;
}

.watch-comment-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-attach-timestamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--accent-iris);
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
}

.btn-post-comment {
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  background: var(--accent-iris);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-post-comment:hover {
  background: var(--accent-iris-hover);
}

.watch-comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 260px;
  overflow-y: auto;
}

.watch-comment-item {
  display: flex;
  gap: 10px;
}

.watch-comment-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.watch-comment-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.watch-comment-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.watch-comment-author {
  font-weight: 700;
  color: #ffffff;
}

.watch-timestamp-jump-tag {
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid var(--accent-iris);
  color: #c4b5fd;
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
}

.watch-timestamp-jump-tag:hover {
  background: var(--accent-iris);
  color: #ffffff;
}

.watch-comment-time {
  font-size: 10px;
  color: var(--text-muted);
}

.watch-comment-text {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Related Match Clips */
.watch-related-clips-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.watch-related-clips-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.watch-related-clip-item {
  display: flex;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.watch-related-clip-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
}

.watch-related-thumb {
  position: relative;
  width: 80px;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  background: #0b0d14;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  flex-shrink: 0;
}

.watch-related-duration {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.85);
  font-size: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
  padding: 1px 3px;
  border-radius: 2px;
}

.watch-related-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
}

.watch-related-title {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-related-meta {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
