* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}
body {
  background: #122112;
  background: linear-gradient(60deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,112,155,1) 100%);
  text-align: center;
  font-size: 2.2rem;
  color: #fff;
  font-family: calibri, Arial, sans-serif;
  text-shadow: #000 2px 2px 5px;
}
a { color: #fff; text-decoration: none; }
a:focus-visible, button:focus-visible, .cam-card:focus-visible {
  outline: 2px solid #6cf;
  outline-offset: 2px;
}
hr { border: 1px solid red; }
#status {
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  height: 50px;
  font-family: calibri, Arial, sans-serif;
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  transition: height .5s ease;
  cursor: pointer;
}
#status.expanded {
  height: 120px;
  white-space: normal !important;
  word-break: break-word;
}

.ost {
  display: inline-block;
  margin-right: 100px;
  font-size: 2.1rem;
}
.var-block {
  display: inline-block;
  min-width: 8%;
  text-align: left;
  color: #ff0;
  font-size: 2.1rem;
}

.tbl { font-size: 20px; text-align: left; border-radius: 8px; padding: 6px; }
td { background: #0000dd44; width: 200px; border-radius: 8px; padding: 4px; padding-left: 5px; }
.snsr { background: #0000dd44; }

#global-tooltip {
  position: fixed;
  display: none;
  pointer-events: none;
  background: rgba(0,0,51,.9);
  color: #fff;
  padding: 12px 11px 11px;
  border-radius: 19px;
  border: 1px solid #ff000033;
  box-shadow: 3px 3px 30px #00000088;
  backdrop-filter: blur(5px);
  z-index: 99999;
  white-space: nowrap;
  transition: opacity .12s;
  opacity: 0;
  font-size: 24px;
  font-family: calibri, Arial, sans-serif;
}
#global-tooltip.show { display: block; opacity: 1; }

@media (max-width: 460px) {
  .var-block { width: 50px; font-size: .8rem; }
  .ost { margin-right: 10px; font-size: 1.2rem; }
}
.page { padding: 10px 16px 30px; }
.cam-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 1900px;
  margin: 0 auto;
}
.cam-card {
  position: relative;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 2px 2px 12px #11116622;
}

.cam-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.cam-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.cam-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  backdrop-filter: blur(1px);
  backdrop-filter: saturate(0.8);
}
.cam-card .cam-viewport {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.cam-card video {
  will-change: transform;
  transform: scale(0.9999) translateZ(0);
  image-rendering: auto !important;
}

.cam-card video {
  width: calc(100% + 0.5px);
  height: calc(100% + 0.5px);
  transform: translate(-0.25px, -0.25px);
}

.cam-card[data-state="live"] .cam-overlay { display: none; }
.spinner { display: none; }
.cam-card[data-state="connecting"] .spinner,
.cam-card[data-state="buffering"] .spinner { display: flex; }
.play-btn { display: none; }
.cam-card[data-state="idle"] .play-btn,
.cam-card[data-state="paused"] .play-btn { display: flex; }

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.play-btn {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  backdrop-filter: blur(2px);
  background: rgba(0,0,0,.35);
  border: 2px solid rgba(5,5,255,.35);
  align-items: center;
  justify-content: center;
}
.play-btn svg { width: 44px; height: 44px; fill: #ffff00aa; margin-left: 2px; }

.retry-btn {
  font-family: Arial, sans-serif;
  font-size: 1rem;
  color: #ffffffff;
  background: #aa0000a4;
  border: 1px solid #f55;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
}

.cam-info {
  position: absolute;
  left: 8px;
  bottom: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(1px);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
  text-shadow: 1px 1px 2px #000;
}

.cam-controls {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.fullscreen-btn, .stop-btn {
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease, background .15s ease;
}

.fullscreen-btn svg, .stop-btn svg { width: 100%; height: 100%; fill: #fff; }
.cam-viewport:hover .fullscreen-btn,
.cam-viewport:focus-within .fullscreen-btn,
.fullscreen-btn:focus-visible,
.cam-viewport:hover .stop-btn,
.cam-viewport:focus-within .stop-btn,
.stop-btn:focus-visible,
.cam-viewport:hover .cam-info,
.cam-viewport:focus-within .cam-info {
  opacity: 1;
}

.fullscreen-btn:hover, .stop-btn:hover { background: rgba(0,0,0,.7); }
.stop-btn:hover svg { fill: #f55; }
.cam-card[data-state="idle"] .fullscreen-btn,
.cam-card[data-state="error"] .fullscreen-btn,
.cam-card[data-state="idle"] .stop-btn,
.cam-card[data-state="error"] .stop-btn,
.cam-card[data-state="idle"] .cam-info,
.cam-card[data-state="error"] .cam-info {
  display: none;
}

@media (hover: none) {
  .fullscreen-btn, .stop-btn, .cam-info { opacity: .85; }
}

@media (max-width: 900px) {
  .cam-grid { grid-template-columns: 1fr; }
  body { font-size: 1.3rem; }
}

.sponsor-strip { text-align: center; margin: 20px 0; }
.sponsor-strip img { width: 10%; height: 10%; }
.site-footer,
.site-footer a { font-size: 1rem; }
.presence-badge { display: inline-block; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none !important; }
}