/* ============================================================
   ZMIENNE I RESET
   ============================================================ */
:root {
  --main-color: #ffffff;
  --bg-dark: #5c5c5c1f;
  --bg-secondary: #22222299;
  --btn-bg: #44444499;
  --btn-hover: #d1d1d1b3;
  --btn-setup: #ffffff86;
  --btn-recording: #E53935;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #04051f no-repeat center center fixed;
  background-size: cover;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' version='1.1' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:svgjs='http://svgjs.dev/svgjs' width='1440' height='560' preserveAspectRatio='none' viewBox='0 0 1440 560'%3e%3cg mask='url(%26quot%3b%23SvgjsMask1024%26quot%3b)' fill='none'%3e%3crect width='1440' height='560' x='0' y='0' fill='url(%26quot%3b%23SvgjsRadialGradient1025%26quot%3b)'%3e%3c/rect%3e%3cpath d='M389.083092081578 312.2232098783767L348.2291889317657 375.1327039738469 463.0203816498772 404.9588116508303z' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float2'%3e%3c/path%3e%3cpath d='M866.4445391201349-8.504072964482958L736.0756433210827 93.15133629682707 869.10100616187 149.61725273988628z' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float2'%3e%3c/path%3e%3cpath d='M610.9925016913221 165.45153886236483L752.4029425366332 243.83662619284704 830.7880298671155 102.42618534753589 689.3775890218043 24.041098017053685z' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float1'%3e%3c/path%3e%3cpath d='M153.2427133478647 536.2732781197465L142.4181119500903 448.11397439153353 65.08340961965179 547.0978795175209z' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float1'%3e%3c/path%3e%3cpath d='M233.215%2c483.119C259.363%2c483.798%2c280.534%2c462.782%2c291.76%2c439.156C301.521%2c418.614%2c294.61%2c396.143%2c284.133%2c375.957C272.434%2c353.416%2c258.594%2c327.286%2c233.215%2c326.354C206.918%2c325.388%2c186.895%2c348.302%2c175.375%2c371.961C165.298%2c392.657%2c169.082%2c415.828%2c179.707%2c436.248C191.438%2c458.793%2c207.81%2c482.46%2c233.215%2c483.119' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float1'%3e%3c/path%3e%3cpath d='M942.9440836931283 447.10588912218975L799.6860924403346 516.8085528974766 913.7665204797115 596.6885285728387z' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float2'%3e%3c/path%3e%3cpath d='M1427.0235327793457 245.0902134136726L1353.4707656506605 326.7788370871077 1435.1593893240956 400.33160421579294 1508.7121564527808 318.6429805423578z' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float3'%3e%3c/path%3e%3cpath d='M172.35352707265963 606.7411990596544L220.58447198444975 549.2617971868151 110.24989671929578 505.65508075554953z' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float2'%3e%3c/path%3e%3cpath d='M67.489%2c655.059C118.457%2c658.201%2c178.651%2c654.973%2c203.199%2c610.196C227.303%2c566.229%2c193.865%2c516.681%2c166.321%2c474.783C142.436%2c438.45%2c110.947%2c405.167%2c67.489%2c403.758C21.82%2c402.277%2c-20.406%2c428.336%2c-43.107%2c467.991C-65.665%2c507.396%2c-65.142%2c555.992%2c-42.035%2c595.077C-19.331%2c633.481%2c22.961%2c652.314%2c67.489%2c655.059' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float1'%3e%3c/path%3e%3cpath d='M1199.2755028405193-42.67723942092315L1175.7884710937944 51.52409969419168 1269.9898102089094 75.01113144091647 1293.4768419556342-19.19020767419837z' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float3'%3e%3c/path%3e%3cpath d='M1198.3840107118488 264.60282879859477L1105.6136386971348 298.368482833753 1139.379292732293 391.138854848467 1232.149664747007 357.3732008133088z' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float3'%3e%3c/path%3e%3cpath d='M1398.984%2c220.441C1422.666%2c221.506%2c1447.319%2c212.528%2c1458.845%2c191.813C1470.131%2c171.53%2c1463.587%2c146.706%2c1450.785%2c127.344C1439.358%2c110.062%2c1419.695%2c101.808%2c1398.984%2c101.279C1377.125%2c100.721%2c1353.62%2c105.815%2c1342.389%2c124.576C1330.925%2c143.726%2c1336.43%2c167.596%2c1347.777%2c186.816C1358.904%2c205.663%2c1377.12%2c219.457%2c1398.984%2c220.441' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float3'%3e%3c/path%3e%3cpath d='M1334.408%2c221.86C1353.441%2c221.293%2c1372.149%2c214.2%2c1382.023%2c197.919C1392.252%2c181.054%2c1391.8%2c160.059%2c1382.411%2c142.713C1372.527%2c124.453%2c1355.166%2c110.428%2c1334.408%2c109.954C1312.894%2c109.463%2c1293.255%2c121.819%2c1282.452%2c140.431C1271.604%2c159.12%2c1269.989%2c182.693%2c1281.612%2c200.91C1292.527%2c218.017%2c1314.124%2c222.464%2c1334.408%2c221.86' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float1'%3e%3c/path%3e%3cpath d='M358.274%2c263.21C375.727%2c264.141%2c391.843%2c252.927%2c399.814%2c237.372C407.183%2c222.992%2c403.48%2c205.909%2c394.533%2c192.454C386.564%2c180.469%2c372.667%2c174.806%2c358.274%2c174.898C344.062%2c174.988%2c330.034%2c180.674%2c322.805%2c192.91C315.46%2c205.341%2c317.257%2c220.423%2c323.761%2c233.314C331.109%2c247.878%2c341.984%2c262.341%2c358.274%2c263.21' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float1'%3e%3c/path%3e%3cpath d='M279.4080347625872 373.5495083972189L412.3887038496555 335.41791514138316 374.25711059381973 202.43724605431487 241.27644150675144 240.56883931015062z' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float3'%3e%3c/path%3e%3cpath d='M1289.6151702529776 182.2533779107258L1414.1659104042199 211.00818199279314 1442.9207144862874 86.4574418415508 1318.3699743350448 57.70263775948345z' fill='rgba(5%2c 14%2c 25%2c 0.48)' class='triangle-float2'%3e%3c/path%3e%3c/g%3e%3cdefs%3e%3cmask id='SvgjsMask1024'%3e%3crect width='1440' height='560' fill='white'%3e%3c/rect%3e%3c/mask%3e%3cradialGradient cx='50%25' cy='50%25' r='772.53' gradientUnits='userSpaceOnUse' id='SvgjsRadialGradient1025'%3e%3cstop stop-color='rgba(103%2c 62%2c 62%2c 1)' offset='0'%3e%3c/stop%3e%3cstop stop-color='rgba(4%2c 5%2c 31%2c 1)' offset='1'%3e%3c/stop%3e%3c/radialGradient%3e%3cstyle%3e %40keyframes float1 %7b 0%25%7btransform: translate(0%2c 0)%7d 50%25%7btransform: translate(-10px%2c 0)%7d 100%25%7btransform: translate(0%2c 0)%7d %7d .triangle-float1 %7b animation: float1 5s infinite%3b %7d %40keyframes float2 %7b 0%25%7btransform: translate(0%2c 0)%7d 50%25%7btransform: translate(-5px%2c -5px)%7d 100%25%7btransform: translate(0%2c 0)%7d %7d .triangle-float2 %7b animation: float2 4s infinite%3b %7d %40keyframes float3 %7b 0%25%7btransform: translate(0%2c 0)%7d 50%25%7btransform: translate(0%2c -10px)%7d 100%25%7btransform: translate(0%2c 0)%7d %7d .triangle-float3 %7b animation: float3 6s infinite%3b %7d %3c/style%3e%3c/defs%3e%3c/svg%3e");
}


/* ============================================================
   STRUKTURA GŁÓWNA
   ============================================================ */
main {
  flex: 1;
  width: 100%;
}

.glass {
  background: var(--bg-dark);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 1rem;
}

/* ============================================================
   NOWOCZESNY HEADER - CYBER SLANT DESIGN
   ============================================================ */
header.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 60px;
  background: var(--bg-secondary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  border-bottom: 20px;
}

/* Ukośny podział w tle */
header.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.521) 0%, transparent 100%);
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
  z-index: -1;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.header-left .logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 2px;
  line-height: 1;
}

.header-left .logo-wrapper i,
.header-left .logo-wrapper .header-title,
.header-left .logo-wrapper .live-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pulse-icon {
  color: #ff4d4d;
  font-size: 1.1rem;
  filter: drop-shadow(0 0 5px rgba(255, 77, 77, 0.5));
  position: relative;
  top: 1px;
}

.header-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--main-color);
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.header-title .thin {
  font-weight: 200;
  opacity: 0.8;
  margin-left: 4px;
}

/* Import nowoczesnej czcionki technicznej */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

/* ============================================================
   ZEGAR SYSTEMOWY
   ============================================================ */
.header-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  color: var(--main-color);
  line-height: 1.1;
  padding: 6px 12px;
  border-radius: 8px;
  min-width: 120px;
  position: relative;
  margin: 0 25px;
}

/* DATA */
.clock-date {
  font-size: 0.65rem;
  letter-spacing: 1px;
  opacity: 0.6;
  text-transform: uppercase;
  font-weight: 400;
}

/* GODZINA */
.clock-time {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.2);
}

/* MILISEKUNDY */
.clock-ms {
  font-size: 0.75rem;
  color: #ff4d4d;
  font-weight: 400;
  margin-left: 2px;
  opacity: 1;
}

/* ============================================================
   ELEMENTY STATUSU I NAWIGACJA
   ============================================================ */
.live-dot {
  width: 8px;
  height: 8px;
  background: #ff4d4d;
  border-radius: 50%;
  box-shadow: 0 0 12px #ff4d4d;
  animation: blink 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-item {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--main-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-item:hover {
  color: var(--main-color);
}

.nav-item:hover::after {
  width: 100%;
}

/* GRID + HEADER PILLS */
.grid-control,
.mediamtx-btn {
  height: 36px;
  min-height: 36px;
  color: var(--main-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  padding: 0 12px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  box-sizing: border-box;
}

.grid-control:hover,
.mediamtx-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.grid-control {
  min-width: 40px;
  max-width: 300px;
}

.mediamtx-btn {
  min-width: 40px;
}

.mediamtx-btn i,
.grid-control i {
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.mediamtx-btn i {
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.25));
}

.mediamtx-btn span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

#grid-select {
  height: 100%;

  background: transparent;
  border: none;
  color: var(--main-color);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  appearance: none;
  line-height: 1;
  padding: 0;
  margin: 0;
}

#grid-select option {
  background: #111;
  color: var(--main-color);
}

footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
  background: var(--bg-dark);
  color: var(--main-color);
  font-size: 14px;
  flex-wrap: wrap;
}

footer img {
  height: 24px;
  filter: brightness(0) invert(1);
}

/* ============================================================
   ANIMACJE I RESPONSYWNOŚĆ MOBILE
   ============================================================ */
@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.9); }
}

@media (max-width: 1024px) {
  .header-clock { min-width: 150px; padding: 4px 10px; }
  .clock-time { font-size: 1rem; }
}

@media (max-width: 850px) {
  .header-clock {
    display: flex;
    min-width: 100px;
    padding: 4px 8px;
    font-size: 0.8rem;
  }

  .clock-time {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .header-inner { padding: 0 10px; }

  .header-nav {
    gap: 10px;
  }

  .mediamtx-btn,
  .grid-control {
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.75rem;
  }

  .mediamtx-btn {
    min-width: 108px;
  }

  .grid-control {
    min-width: 84px;
  }
}

@media (max-width: 480px) {
  footer {
    font-size: 12px;
    gap: 5px;
    padding: 5px 5px;
  }

  footer img {
    height: 20px;
  }
}

/* ============================================================
   CONTROLS WRAPPER + SNAPSHOT ALL
   ============================================================ */
#controls-wrapper {
  width: 100%;
  margin: 10px auto;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Snapshot All nad tabami */
.snapshot-all-btn {
  display: block;
  width: 100%;
  font-size: 1.1em;
  padding: 12px 15px;
  font-weight: bold;
  border-radius: 12px;
  background: var(--btn-bg);
  color: var(--main-color);
  cursor: pointer;
  transition: var(--transition);
}

.snapshot-all-btn:hover {
  background: var(--btn-hover);
  transform: translateY(-1px);
}

/* ============================================================
   NAWIGACJA (TABS) - PEŁNA SZEROKOŚĆ
   ============================================================ */
.tabs-group {
  display: flex;
  width: 100%;
  gap: 0;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  padding: 5px;
}

.tab-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  padding: 14px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--main-color);
  border-radius: 10px;
  transition: var(--transition);
}

.tab-link i {
  font-size: 1.3em;
}

.tab-link:hover {
  background: var(--btn-hover);
}

.tab-link.active {
  background: var(--main-color);
  color: #222;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.tab-pane {
  display: none;
  width: 100%;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  animation: fadeIn 0.4s ease;
}

/* ============================================================
   CONTROLS & INPUTS
   ============================================================ */
section#controls {
  padding: 10px;
}

.input-group, .btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

input, select, button {
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 1em;
  font-family: inherit;
}

input, select {
  background: var(--bg-secondary);
  color: var(--main-color);
  min-width: 200px;
}

/* ============================================================
   PRZYCISKI (OGÓLNE I IKONY)
   ============================================================ */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--btn-bg);
  color: var(--main-color);
  cursor: pointer;
  transition: var(--transition);
}

button i {
  transition: var(--transition);
}

button:hover {
  background: var(--btn-hover);
  transform: translateY(-1px);
}

/* ============================================================
   CAMERA GRID
   ============================================================ */
main#cameras, #cameras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  justify-items: center;
  align-items: start;
  padding: 10px;
  width: 100%;
}

/* ============================================================
   KARTA KAMERY
   ============================================================ */
.camera {
  margin: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 720px;
  height: auto;
  align-self: start;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.05);
}

.camera h3 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  color: var(--main-color);
  text-align: center;
}

.camera canvas,
.camera video,
.camera img {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  object-fit: cover;
}

.btn-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
}

.btn-container button {
  flex: 1;
  font-size: 0.8em;
  padding: 12px 5px;
}

/* ============================================================
   STATUSY NAGRYWANIA
   ============================================================ */
.record-btn.recording {
  background: var(--btn-recording) !important;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(229, 57, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); }
}

/* ============================================================
   POWIADOMIENIA I MODAL
   ============================================================ */
#notify-container {
  position: fixed;
  left: 20px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.notify {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  color: var(--main-color);
  padding: 12px 20px;
  border-radius: 12px;
  border-left: 4px solid var(--btn-setup);
  font-weight: 600;
  animation: slideIn 0.3s forwards;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 16px;
}

.modal-content {
  width: 380px;
}

.modal-content.glass {
  background: var(--bg-dark);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 15px;
  padding: 1.15rem;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 8px 24px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.modal-content h2 {
  margin: 0 0 10px 0;
  text-align: center;
  color: var(--main-color);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.modal-content p {
  margin: 0 0 12px 0;
  text-align: center;
  color: rgba(255,255,255,0.96);
  font-weight: 500;
}

.modal-content label {
  display: block;
  margin: 15px 0 5px;
  text-align: left;
  font-size: 0.92em;
  font-weight: 600;
  color: var(--main-color);
}

.modal-content select,
.modal-content input {
  width: 100%;
  min-width: 100%;
  margin-top: 6px;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-buttons button {
  flex: 1;
}

#startRecordingBtn.record-btn {
  background: var(--btn-bg);
  color: var(--main-color);
}

#startRecordingBtn.record-btn:hover {
  background: var(--btn-hover);
}

#cancelRecordingBtn.stop-stream-btn {
  background: var(--btn-bg);
  color: var(--main-color);
}

#cancelRecordingBtn.stop-stream-btn:hover {
  background: var(--btn-hover);
}

.settings-link i {
  color: var(--main-color);
  margin-left: 5px;
  transition: transform 0.4s ease, color 0.3s ease;
}

.settings-link:hover i {
  transform: rotate(180deg);
  color: #ff0000;
}

/* ============================================================
   ANIMACJE I MOBILE
   ============================================================ */
@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }
@keyframes slideIn { from {transform: translateX(-100%);} to {transform: translateX(0);} }

.hidden { display: none !important; }

@media (max-width: 768px) {
  .tabs-group { flex-direction: column; border-radius: 12px; }
  .tab-link { width: 100%; }
  #cameras { grid-template-columns: 1fr !important; }
  .btn-container { flex-direction: column; }
}

@media (max-width: 480px) {
  .modal-content {
    width: 100%;
    max-width: 380px;
  }

  .modal-buttons {
    flex-direction: column;
  }
}

/* =========================
   MEDIA MTX STYL SPECYFIC
   ========================= */

.mtx-container {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.mtx-box {
  width: 100%;
  max-width: 900px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 12px;
  color: #fff;
}

h2 i {
  margin-right: 8px;
  color: #ff0000;
}

.mtx-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  cursor: pointer;
}

.mtx-table th, .mtx-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mtx-table th {
  background: rgba(255,255,255,0.05);
}

.mtx-table tr:hover {
  background: rgba(255,255,255,0.08);
}

/* ONLINE / OFFLINE */
.online {
  color: #fff;
  font-weight: bold;
}

.online i {
  color: #51ff00;
  animation: blink 1.2s infinite;
  margin-right: 5px;
}

.offline {
  color: #ff5c5c;
  font-weight: bold;
}

.offline i {
  color: #ff5c5c;
  margin-right: 5px;
}

/* BUTTONS */
.actions button {
  background: rgba(0,0,0,0.3);
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.actions button:hover {
  background: var(--main-color);
  color: #000;
}

/* MTX LIVE HEADER */
.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.2rem;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
  animation: pulse-signal 2s infinite;
}

@keyframes pulse-signal {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.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;
}