/* ============================================================
   MEDIAMTX PAGE
   ============================================================ */

.mtx-container {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 20px 14px;
}

.mtx-box {
  width: 100%;
  max-width: 1100px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 20px;
  border-radius: 16px;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
}

.mtx-box h2 {
  margin: 0 0 14px 0;
  text-align: center;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.mtx-subtitle {
  margin: 0 0 18px 0;
  text-align: center;
  color: rgba(255,255,255,0.8);
  font-size: 0.92rem;
}

.mtx-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
}

.mtx-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}

.mtx-table thead th {
  padding: 14px 12px;
  text-align: left;
  font-size: 0.84rem;
  letter-spacing: 0.4px;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}

.mtx-table tbody td {
  padding: 14px 12px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mtx-table tbody tr:hover {
  background: rgba(255,255,255,0.05);
}

.mtx-camera-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #fff;
  word-break: break-word;
}

.mtx-camera-name i {
  color: rgba(255,255,255,0.85);
  flex: 0 0 auto;
}

.mtx-status {
  font-weight: 700;
  white-space: nowrap;
}

.mtx-status.online {
  color: #fff;
}

.mtx-status.online i {
  color: #51ff00;
  margin-right: 6px;
  animation: blink 1.2s infinite;
}

.mtx-status.offline {
  color: #ff8f8f;
}

.mtx-status.offline i {
  color: #ff5c5c;
  margin-right: 6px;
}

.mtx-copy-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mtx-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.mtx-copy-btn:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

.mtx-copy-btn i {
  font-size: 0.9rem;
}

.mtx-copy-btn.hd {
  background: rgba(255,255,255,0.08);
}

.mtx-copy-btn.sd {
  background: rgba(255,255,255,0.05);
}

.mtx-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  border: 1px solid rgba(255,255,255,0.1);
}

.mtx-badge.hd {
  background: rgba(255, 77, 77, 0.14);
  color: #fff;
}

.mtx-badge.sd {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.mtx-note {
  margin-top: 14px;
  text-align: center;
  color: rgba(255,255,255,0.72);
  font-size: 0.84rem;
}

/* header na stronie mediamtx */
.mtx-live-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--main-color);
  letter-spacing: 1px;
}

.mtx-live-badge i.fa-satellite-dish {
  color: var(--main-color);
  font-size: 1.15rem;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
  animation: pulse-signal 2s infinite;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 77, 77, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 77, 77, 0.3);
  box-shadow: 0 0 8px rgba(255, 77, 77, 0.3);
}

.live-indicator i {
  color: #73ff00;
  font-size: 0.6rem;
  animation: blink 1.2s infinite;
}

@keyframes pulse-signal {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* ============================================================
   BACK ICON BUTTON
   ============================================================ */

.nav-back-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
}

.nav-back-icon i {
  pointer-events: none;
}

/* ============================================================
   MOBILE CARD MODE
   ============================================================ */
@media (max-width: 860px) {
  .mtx-table,
  .mtx-table thead,
  .mtx-table tbody,
  .mtx-table tr,
  .mtx-table th,
  .mtx-table td {
    display: block;
    width: 100%;
  }

  .mtx-table {
    min-width: 100%;
    background: transparent;
  }

  .mtx-table thead {
    display: none;
  }

  .mtx-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mtx-table tbody tr {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 12px;
  }

  .mtx-table tbody td {
    border: none;
    padding: 8px 0;
  }

  .mtx-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    color: rgba(255,255,255,0.66);
    text-transform: uppercase;
    letter-spacing: 0.4px;
  }

  .mtx-copy-group {
    gap: 10px;
  }

  .mtx-copy-btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 120px;
    min-height: 42px;
  }

  .mtx-box {
    padding: 16px;
  }

  .mtx-box h2 {
    font-size: 1.05rem;
  }

  .mtx-subtitle {
    font-size: 0.86rem;
  }

  .header-nav,
  .nav-links,
  .nav-back-icon {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .nav-back-icon {
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .mtx-container {
    padding: 12px 10px;
  }

  .mtx-box {
    padding: 14px;
    border-radius: 14px;
  }

  .mtx-copy-group {
    flex-direction: column;
  }

  .mtx-copy-btn {
    width: 100%;
    min-width: 100%;
  }

  .mtx-camera-name {
    font-size: 0.96rem;
  }

  .mtx-status {
    font-size: 0.9rem;
  }

  .mtx-note {
    font-size: 0.78rem;
  }

  .header-nav,
  .nav-links,
  .nav-back-icon {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .nav-back-icon {
    min-width: 38px;
    min-height: 38px;
    width: 38px;
    height: 38px;
    font-size: 17px;
  }
}


/* ===== STREAM DESCRIPTION (DÓŁ STRONY) ===== */

.mtx-stream-description {
  margin-top: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.mtx-desc-box {
  flex: 1;
  min-width: 220px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255,255,255,0.05);
  padding: 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  line-height: 1.4;
  border: 1px solid rgba(255,255,255,0.08);
}

.mtx-desc-box b {
  font-size: 0.8rem;
  color: #fff;
}

/* MOBILE */
@media (max-width: 600px) {
  .mtx-stream-description {
    flex-direction: column;
  }

  .mtx-desc-box {
    flex-direction: column;
    align-items: flex-start;
  }
}