/* UKRCRAFT • Media page (аутентичний стиль) */
/* Працює поверх /style.css */

.heroMedia {
  padding-bottom: 110px;
}

/* Container */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Main card */
.heroCard{
  margin-top: 92px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.22);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 70px rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
}

.heroHead{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.heroTitle{
  margin: 0;
  font-size: 26px;
  letter-spacing: .2px;
}

.heroSub{
  margin: 6px 0 0;
  opacity: .9;
  line-height: 1.45;
}

.heroRight{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content:flex-end;
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  font-size: 13px;
}

/* API dot */
.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}
.dot.ok{ background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
.dot.bad{ background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.18); }

/* Tabs */
.tabsRow{
  display:flex;
  gap: 10px;
  padding: 12px 18px 0;
  flex-wrap: wrap;
}

.tabBtn{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.22);
  color: rgba(255,255,255,0.95);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.tabBtn:hover{ transform: translateY(-1px); border-color: rgba(255,212,0,0.32); }
.tabBtn.isActive{
  background: rgba(255,212,0,0.14);
  border-color: rgba(255,212,0,0.34);
}

/* Tab pane */
.tabPane{
  padding: 14px 18px 18px;
}
.hidden{ display:none !important; }

/* Filters */
.filters{
  margin-top: 8px;
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: end;
}
.filterBlock{ min-width: 0; }
.filterActions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content:flex-end;
}

.seg{
  display:flex;
  gap: 8px;
}
.segBtn{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.22);
  color: rgba(255,255,255,0.92);
  padding: 12px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.segBtn:hover{ transform: translateY(-1px); border-color: rgba(255,212,0,0.32); }
.segBtn.isOn{
  background: rgba(30,90,255,0.16);
  border-color: rgba(30,90,255,0.34);
}

.miniHint{
  margin: 10px 0 14px;
  opacity: .85;
  font-size: 13px;
}

/* Streams grid */
.streamGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .streamGrid { grid-template-columns: repeat(2, 1fr); }
  .filters{ grid-template-columns: 1fr 1fr; }
  .filterActions{ justify-content: flex-start; }
}
@media (max-width: 640px) {
  .streamGrid { grid-template-columns: 1fr; }
  .heroHead{ flex-direction: column; }
  .heroRight{ justify-content:flex-start; }
}

/* Card */
.streamCard {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.22);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}

.streamCard.live{
  border-color: rgba(34,197,94,0.25);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

.streamTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 10px;
}

.streamLeft {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.streamAvatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  flex: 0 0 auto;
  image-rendering: pixelated;
}

.streamName {
  font-weight: 950;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.streamMeta {
  font-size: 12px;
  opacity: .85;
  margin-top: 2px;
}

.liveBadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  font-size: 12px;
  flex: 0 0 auto;
}

.liveDot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
}
.liveBadge.on .liveDot { background: #22c55e; }

.streamBody {
  padding: 0 12px 12px;
}

/* 16:9 preview */
.streamPreview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.30);
}
.streamPreview iframe,
.streamPreview img {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.streamPreviewImg{ object-fit: cover; }

/* Title */
.streamTitle {
  margin-top: 10px;
  font-weight: 800;
  line-height: 1.35;
  opacity: .95;
  min-height: 2.7em;
}

/* Actions */
.streamActions{
  margin-top: 10px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Favorite star */
.favBtn{
  position:absolute;
  right: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.favBtn:hover{ transform: translateY(-1px); border-color: rgba(255,212,0,0.35); }
.favBtn.isOn{
  background: rgba(255,212,0,0.14);
  border-color: rgba(255,212,0,0.38);
}

/* Compact mode */
.compact .streamGrid{ grid-template-columns: 1fr; }
.compact .streamCard{ display:flex; gap: 10px; }
.compact .streamPreview{ width: 220px; flex: 0 0 220px; aspect-ratio: 16/10; }
.compact .streamTop{ padding: 10px; }
.compact .streamBody{ padding: 10px; flex: 1 1 auto; }
@media (max-width: 640px){
  .compact .streamCard{ flex-direction: column; }
  .compact .streamPreview{ width: 100%; flex: 0 0 auto; aspect-ratio: 16/9; }
}

/* Gallery */
.galleryHead{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.h2{ margin: 0; font-size: 18px; }
.gGrid{
  margin-top: 12px;
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 980px){ .gGrid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .gGrid{ grid-template-columns: 1fr; } }

.gItem{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.20);
  border-radius: 18px;
  overflow:hidden;
  cursor:pointer;
  text-align:left;
  padding: 0;
  color: #fff;
}
.gThumb{
  height: 140px;
  background: linear-gradient(135deg, rgba(30,90,255,0.35), rgba(255,212,0,0.18));
}
.gCap{
  padding: 12px;
  font-weight: 900;
  opacity: .95;
}
.gT1{ background: linear-gradient(135deg, rgba(30,90,255,0.35), rgba(0,0,0,0.18)); }
.gT2{ background: linear-gradient(135deg, rgba(255,212,0,0.22), rgba(0,0,0,0.22)); }
.gT3{ background: linear-gradient(135deg, rgba(34,197,94,0.22), rgba(0,0,0,0.22)); }
.gT4{ background: linear-gradient(135deg, rgba(239,68,68,0.22), rgba(0,0,0,0.22)); }

/* Clips */
.clipsHead{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.clipsGrid{
  margin-top: 12px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 980px){ .clipsGrid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .clipsGrid{ grid-template-columns: 1fr; } }

.clipCard{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.22);
  border-radius: 18px;
  overflow:hidden;
  padding: 12px;
}
.clipTop{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.clipTitle{ font-weight: 950; }
.clipMeta{ font-size: 12px; opacity: .85; margin-top: 4px; }
.clipActions{ margin-top: 10px; display:flex; gap: 10px; flex-wrap: wrap; }

/* Drawer */
.drawer{
  position: fixed;
  inset: 0;
  z-index: 50;
}
.drawerBackdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
}
.drawerPanel{
  position:absolute;
  right: 14px;
  top: 14px;
  bottom: 14px;
  width: min(420px, calc(100vw - 28px));
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  box-shadow: 0 22px 90px rgba(0,0,0,0.6);
  overflow:hidden;
  display:flex;
  flex-direction: column;
}
.drawerTop{
  padding: 14px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.drawerTitle b{ font-size: 16px; }
.drawerTitle small{ display:block; margin-top: 2px; opacity:.75; }

.drawerGrid{
  padding: 14px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
  overflow:auto;
}
.dCard{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.22);
  color: #fff;
  text-decoration:none;
}
.dCard:hover{ border-color: rgba(255,212,0,0.30); }
.dBtn{ cursor:pointer; width:100%; text-align:left; }
.dIco{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  flex: 0 0 auto;
}
.dTxt b{ display:block; font-weight: 950; }
.dTxt small{ display:block; opacity:.8; margin-top: 2px; }

.drawerBottom{
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
  opacity: .9;
}

/* Modal (gallery) */
.modal{
  position: fixed;
  inset:0;
  z-index: 60;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 16px;
}
.modalBackdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(8px);
}
.modalPanel{
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.40);
  overflow:hidden;
  box-shadow: 0 22px 90px rgba(0,0,0,0.65);
  display:flex;
  flex-direction: column;
}
.modalTop{
  padding: 14px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.modalTitle{ font-weight: 950; }
.modalBody{
  padding: 14px;
  overflow:auto;
}
.modalBody img{
  width:100%;
  height:auto;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  display:block;
}