* {
  user-select: none;
}

body.hv-replay-embed #menu,
body.hv-replay-embed #load,
body.hv-replay-embed .gameMenu,
body.hv-replay-embed .hv-extra-label,
body.hv-replay-embed .hv-extra-input {
  display: none !important;
}

html.hv-replay-embed-root,
body.hv-replay-embed {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.hv-replay-embed {
  /* In iframe embed, % fills the iframe; 100vh can mismatch parent layout. */
  width: 100% !important;
  height: 100% !important;
}

body.hv-replay-embed .toolbar2 {
  padding: 0;
  height: auto;
  flex-shrink: 0;
  background: transparent;
}

body.hv-replay-embed .hv-replay-toolbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 12, 22, 0.98));
}

body.hv-replay-embed .hv-toolbar-row {
  padding: 6px 8px;
  gap: 8px;
}

body.hv-replay-embed .hv-tb-btn {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

body.hv-replay-embed .hv-mute-icon {
  font-size: 14px;
  line-height: 1;
}

body.hv-replay-embed .hv-timebar-label {
  min-width: 88px;
  font-size: 12px;
}

body.hv-replay-embed .hv-speed-label {
  min-width: 32px;
  font-size: 12px;
}

body.hv-replay-embed .hv-timebar-track {
  height: 10px;
}

body.hv-replay-embed .hv-timebar-handle {
  width: 10px;
  height: 16px;
  top: -3px;
}

body.hv-replay-embed .hv-goal-marker {
  width: 3px;
  height: 14px;
  top: -2px;
}

body.hv-replay-embed .canvasContainer {
  flex: 1;
  min-height: 0;
}

body.hv-replay-embed canvas {
  cursor: grab;
  touch-action: none;
}

body.hv-replay-embed canvas.hv-canvas-panning {
  cursor: grabbing;
}

body.hv-replay-embed .gameStateContainer {
  top: 0;
  left: calc(50% - 200px);
  width: 400px;
  height: 30px;
  font-size: 18px;
  padding: 4px;
}

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: white;
  overflow: hidden;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
}

.marginRight {
  margin-right: 3px;
}

.toolbarbtn {
  position: absolute;
  left: 5px;
  top: 5px;
  opacity: 0.5;
  z-index: 100000;
}

.toolbar2 {
  width: calc(100% - 10px);
  height: auto;
  background-color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
}

.hv-replay-toolbar {
  width: 100%;
  box-sizing: border-box;
}

.hv-toolbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px 6px 47px;
  box-sizing: border-box;
}

.hv-toolbar-controls,
.hv-toolbar-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hv-tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
}

.hv-tb-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.hv-tb-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.hv-tb-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.hv-tb-btn:focus {
  outline: none;
}

.hv-tb-btn:focus:not(.active) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.hv-tb-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}

.hv-tb-btn-accent.active {
  background: rgba(56, 189, 248, 0.28);
  border-color: rgba(56, 189, 248, 0.55);
}

.hv-tb-btn-ghost {
  background: transparent;
}

.hv-tb-btn-sm {
  width: 22px;
  height: 22px;
  font-size: 14px;
  font-weight: 700;
}

.hv-tb-icon {
  pointer-events: none;
  line-height: 1;
}

.hv-tb-btn .hv-tb-icon {
  font-size: 15px;
  font-weight: 700;
}

.hv-timebar-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hv-timebar {
  flex: 1;
  min-width: 0;
  padding: 6px 0;
  cursor: pointer;
}

.hv-timebar-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: visible;
}

.hv-timebar-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.55), rgba(14, 165, 233, 0.85));
  pointer-events: none;
}

.hv-timebar-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hv-goal-marker {
  position: absolute;
  top: -3px;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: pointer;
  opacity: 0.95;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s, opacity 0.12s;
  z-index: 2;
}

.hv-goal-marker:hover {
  transform: translateX(-50%) scaleY(1.15);
  opacity: 1;
}

.hv-goal-marker.red {
  background: linear-gradient(180deg, #fca5a5, #ef4444);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.55);
}

.hv-goal-marker.blue {
  background: linear-gradient(180deg, #93c5fd, #3b82f6);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.55);
}

.hv-timebar-handle {
  position: absolute;
  top: -4px;
  left: 0;
  width: 12px;
  height: 20px;
  margin-left: -6px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f8fafc, #cbd5e1);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  cursor: grab;
  z-index: 3;
}

.hv-timebar-handle:active {
  cursor: grabbing;
}

.hv-timebar-label {
  flex-shrink: 0;
  min-width: 36px;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
  text-align: right;
}

.hv-speed-label {
  min-width: 28px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

.hv-extra-label {
  font-size: 11px;
  color: #94a3b8;
  margin-left: 4px;
}

.hv-extra-input {
  width: 48px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #e2e8f0;
  font-size: 11px;
  padding: 0 4px;
}

.fixedTb2ButtonHeight {
  height: 25px;
}

.gameMenu {
  display: none;
}
.playerElement {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding-left: 20px;
}
.playerFlag {
  position: absolute;
  left: 2px;
}
.playerElement.spec:hover {
  background: #888;
}
.playerElement.red:hover {
  background: #855;
}
.playerElement.blue:hover {
  background: #558;
}
.playerElement.selected {
  background: #595;
}
.playerElement.spec.selected:hover {
  background: #8cc;
}
.playerElement.red.selected:hover {
  background: #895;
}
.playerElement.blue.selected:hover {
  background: #598;
}

.canvasContainer {
  position: relative;
  flex-grow: 1;
  min-height: 0;
}

.canvasSubContainer {
  position: absolute;
  width: 100%;
  height: 100%;
}

.canvasSubContainer canvas {
  cursor: grab;
  touch-action: none;
}

.canvasSubContainer canvas.hv-canvas-panning {
  cursor: grabbing;
}

.hv-zoom-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 15;
  display: none;
  flex-direction: column;
  gap: 4px;
  pointer-events: auto;
}

body.hv-replay-embed .hv-zoom-overlay,
body.hv-pseudo-live-embed .hv-zoom-overlay {
  display: flex;
}

.hv-zoom-overlay button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hv-zoom-overlay button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
}

body.hv-replay-embed .hv-toolbar-controls #btZoomIn,
body.hv-replay-embed .hv-toolbar-controls #btZoomOut,
body.hv-replay-embed .hv-toolbar-controls #btZoomReset {
  display: none !important;
}

.gameStateContainer {
  position: absolute;
  top: 0px;
  left: calc(50% - 225px);
  width: 450px;
  height: 32px;
  display: flex;
  justify-content: space-between;
  background-color: #1A2125;
  padding: 5px;
  border-radius: 0 0 5px 5px;
  font: 900 20px Arial Black,Arial Bold,Gadget,sans-serif;
  z-index: 6;
}

.teamIcon {
  width: 23px;
  height: 23px;
  border-radius: 5px;
}

.teamIcon.red{
  background-color: #E56E56;
}

.teamIcon.blue{
  background-color: #5689E5;
}

.score{
  width: 35px;
  overflow: hidden;
  text-align: center;
}

.scoreBoard {
  display: flex;
  align-items: center;
}

.gameTime {
  display: flex;
  align-items: center;
}

.gameTime > .overtime {
  margin-right: 20px;
  visibility: hidden;
}

.gameTime > .overtime.on {
  visibility: visible;
  animation: 0.4s linear overtime-appear;
}

@keyframes overtime-appear {
  from {
    opacity: 0;
    transform: translateY(-25px);
  }
}

.gameTime.time-warn {
  animation: 0.3s infinite alternate linear time-warn;
}

@keyframes time-warn {
  from { 
    color: white 
  } 
  to { 
    color:#ff8080
  }
}

.gameTime > .digit {
  width: 15px;
  text-align: center;
}

/* Analytics overlay */
.hv-analytics-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hv-analytics-canvas.is-active {
  opacity: 1;
}

.hv-analytics-hud {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 5;
  pointer-events: none;
  max-width: min(420px, calc(100% - 16px));
}

.hv-analytics-hud-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(11, 20, 26, 0.92), rgba(8, 14, 20, 0.94));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
}

.hv-analytics-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.hv-analytics-badge-live {
  color: #86efac;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.35);
}

.hv-analytics-badge-final {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.35);
}

.hv-analytics-title {
  font-size: 12px;
  font-weight: 650;
  color: #f8fafc;
}

.hv-analytics-metrics {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #cbd5e1;
}

.hv-analytics-metrics .hv-m.red {
  color: #fca5a5;
  font-weight: 700;
}

.hv-analytics-metrics .hv-m.blue {
  color: #93c5fd;
  font-weight: 700;
}

.hv-analytics-legend {
  display: inline-flex;
  gap: 10px;
  width: 100%;
  font-size: 10px;
  color: #94a3b8;
}

.hv-analytics-legend i.lg {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hv-analytics-legend i.lg.goal {
  background: #facc15;
}

.hv-analytics-legend i.lg.on {
  background: #ef4444;
}

.hv-analytics-legend i.lg.off {
  background: rgba(148, 163, 184, 0.55);
}

body.hv-replay-embed .hv-analytics-hud-inner {
  padding: 6px 8px;
}

body.hv-replay-embed .hv-analytics-title {
  font-size: 11px;
}
