@font-face {
  font-family: 'PS-EB';
  src: url('/media/inter.28pt-extrabold.ttf') format('truetype');
}
@font-face {
  font-family: 'PS-SB';
  src: url('/media/inter.28pt-semibold.ttf') format('truetype');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  font-family: 'PS-SB', system-ui, sans-serif;
  color: #fff;
}

/* ═══ ROOT ═══ */
#root {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

/* ═══ VIDEO — fixat direct pe viewport, independent de #root ═══ */
#vp {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: 100vw;
  max-height: 100dvh;
  object-fit: contain;
  background: #000;
  outline: none;
  border: none;
  pointer-events: none;
  z-index: 1;
}
#vp::-webkit-media-controls,
#vp::-webkit-media-controls-panel,
#vp::-webkit-media-controls-play-button,
#vp::-webkit-media-controls-overlay-play-button,
#vp::-webkit-media-controls-enclosure {
  display: none !important;
}

/* ═══ AUDIO ═══ */
#rp { display: none; }

/* ═══ VIGNETTE ═══ */
.vig {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 140px rgba(0, 0, 0, .35);
}

/* ═══ RADIO SCREENSAVER ═══ */
#rss {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity .65s ease;
  background: radial-gradient(ellipse at 50% 55%, rgba(55, 12, 95, .52) 0%, rgba(0, 0, 0, .86) 100%);
}
#rss.on { opacity: 1; }

.rfi {
  position: absolute;
  opacity: 0;
  animation: rfi 3.8s ease forwards;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(130, 76, 240, .85));
}

.rfi.rfi-logo {
  width: 60px;
  height: 60px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
}

@keyframes rfi {
  0%   { opacity: 0; transform: scale(.45) translateY(22px); }
  18%  { opacity: 1; transform: scale(1) translateY(0); }
  74%  { opacity: 1; transform: scale(1.06) translateY(-14px); }
  100% { opacity: 0; transform: scale(.85) translateY(-38px); }
}

/* ═══════════════════════════════════════════════════
   INFO BAR — floats above bottom with margin + radius
   Two rows: top (channel info) + bottom (EPG strip)
═══════════════════════════════════════════════════ */
#ib {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .85), 0 0 0 1px rgba(110, 64, 210, .3);
  transform: translateY(calc(100% + 24px));
  opacity: 0;
  transition: transform .38s cubic-bezier(.4, 0, .2, 1), opacity .38s ease;
  pointer-events: none;

  background: rgba(9, 7, 22, .65);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
#ib.on {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Row 1: channel info ── */
.r1 {
  display: flex;
  align-items: center;
  background: rgba(12, 10, 21, .35);
  border-bottom: 1px solid rgba(110, 64, 210, .2);
  padding: 0 28px;
  height: 80px;
  gap: 0;
}

/* numărul canalului — ExtraBold, impact maxim */
.r1-num {
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 50px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  min-width: 64px;
  flex-shrink: 0;
}

/* ── Logo widget ── */
.r1-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  margin: 0 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* spinning ring — visible only while loading */
.r1-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(123, 76, 227, .2);
  border-left-color: #7B4CE3;
  border-top-color: #7B4CE3;
  animation: spin 1.6s linear infinite;
  transition: opacity .4s ease;
  opacity: 1;
}
.r1-ring.hidden { opacity: 0; pointer-events: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* logo image — hidden while loading */
.r1-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity .4s ease;
  display: block;
}
.r1-img.vis { opacity: 1; }

/* text fallback when no logo */
.r1-logotext {
  position: relative;
  z-index: 1;
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #7B4CE3;
  letter-spacing: .5px;
  text-align: center;
  line-height: 1.2;
  max-width: 52px;
  word-break: break-word;
  opacity: 0;
  transition: opacity .3s ease;
  display: none;
}
.r1-logotext.vis { opacity: 1; display: block; }
.r1-logotext.emoji {
  font-size: 26px;
  max-width: none;
  word-break: normal;
}

/* channel name block */
.r1-chblock {
  flex-shrink: 0;
  width: 190px;
  margin-right: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

/* nume canal — SemiBold, lizibilitate */
.r1-chname {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.r1-chtag { display: none !important; }

/* rândul cu badge-ul tehnic (rezoluție + codec) — sub numele canalului */
.r1-techrow {
  display: flex;
  align-items: center;
  min-height: 18px;
}

.r1-tech {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #a855f7;
  background: rgba(123, 76, 227, .16);
  border: 1px solid rgba(123, 76, 227, .32);
  padding: 2px 9px;
  border-radius: 6px;
  letter-spacing: .4px;
  white-space: nowrap;
}
.r1-tech:empty { display: none; }

/* program + progress bar */
.r1-parea { flex: 1; min-width: 0; }

/* titlu program — SemiBold */
.r1-ptitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #EDEDEE;
  margin-bottom: 9px;
  min-width: 0;
}
.r1-ptitle-txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ═══ MARCAJ EPG — cutie colorată cu categoria de vârstă ═══ */
.mk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .3px;
  line-height: 1.5;
}
.mk-ag  { background: rgba(34, 197, 94, .22);  color: #4ade80; border: 1px solid rgba(34, 197, 94, .55); }
.mk-12  { background: rgba(163, 204, 55, .22); color: #c8e05a; border: 1px solid rgba(163, 204, 55, .55); }
.mk-15  { background: rgba(234, 179, 8, .22);  color: #fbbf24; border: 1px solid rgba(234, 179, 8, .55); }
.mk-18  { background: rgba(239, 68, 68, .24);  color: #f87171; border: 1px solid rgba(239, 68, 68, .55); }
.mk-def { background: rgba(255, 255, 255, .12); color: #cfcfcf; border: 1px solid rgba(255, 255, 255, .28); }

.r1-prow {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* timpi EPG — SemiBold */
.r1-t {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 12px;
  color: #A0A6B5;
  flex-shrink: 0;
}

.r1-bar {
  flex: 1;
  height: 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .1);
  position: relative;
  overflow: visible;
}
.r1-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #7B4CE3, #a855f7);
  transition: width 1s linear;
  position: relative;
}
.r1-fill::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c084fc;
  box-shadow: 0 0 7px #a855f7;
}

/* clock / date */
.r1-clk {
  flex-shrink: 0;
  text-align: right;
  margin-left: 28px;
}

/* data — SemiBold */
.r1-date {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 12px;
  color: #A0A6B5;
  margin-bottom: 3px;
}

/* ora — ExtraBold, element vizual dominant */
.r1-time {
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 38px;
  font-weight: 700;
  color: #7B4CE3;
  line-height: 1;
}

/* ── Row 2: EPG strip ── */
.r2 {
  display: flex;
  align-items: stretch;
  background: rgba(9, 7, 26, .25);
  height: 72px;
  overflow: hidden;
  max-height: 0;
  transition: max-height .35s cubic-bezier(.4, 0, .2, 1);
}
.r2.show { max-height: 72px; }

.r2-epg {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-right: 1px solid rgba(255, 255, 255, .07);
  cursor: pointer;
  transition: background .2s;
}
.r2-epg:hover { background: rgba(123, 76, 227, .14); }

.r2-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #7B4CE3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.r2-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7B4CE3;
}

/* eticheta EPG — ExtraBold, scurtă și boldă */
.r2-lbl {
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.r2-strip {
  flex: 1;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.r2-strip::-webkit-scrollbar { display: none; }

.epc {
  flex-shrink: 0;
  padding: 0 18px;
  min-width: 158px;
  max-width: 240px;
  height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, .05);
}
.epc.now {
  background: rgba(123, 76, 227, .28);
  border: 1px solid rgba(123, 76, 227, .5);
  border-radius: 8px;
  margin: 8px 6px;
  height: 56px;
}

/* ora din EPG — SemiBold */
.epc-t {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 11px;
  color: #A0A6B5;
  margin-bottom: 4px;
}
.epc.now .epc-t {
  color: #a855f7;
  font-weight: 600;
}

/* titlu program EPG — SemiBold */
.epc-n {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.epc-n-txt {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #EDEDEE;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.epc.now .epc-n-txt {
  color: #fff;
  font-size: 14px;
}

.r2-arr {
  flex-shrink: 0;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #7B4CE3;
  background: linear-gradient(90deg, transparent, rgba(9, 7, 26, .9) 55%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}

/* ═══════════════════════════════════════════════════
   SHARED PURPLE BACKGROUND — folosit de #chlist și #epglist
   (aceeași paletă ca ecranul de startup)
═══════════════════════════════════════════════════ */
.sky-bg {
  background:
    radial-gradient(ellipse at 18% 12%, rgba(124, 58, 237, .38) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(109, 40, 217, .32) 0%, transparent 55%),
    conic-gradient(from 0deg at 50% 50%, rgba(13,0,16,.55) 0deg, rgba(46,10,82,.45) 90deg, rgba(30,27,75,.45) 180deg, rgba(59,7,100,.5) 270deg, rgba(13,0,16,.55) 360deg);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

/* ═══════════════════════════════════════════════════
   CHANNEL LIST — Sky-style rows, full screen overlay
═══════════════════════════════════════════════════ */
#chlist {
  position: fixed;
  inset: 0;
  z-index: 30;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(124, 58, 237, .38) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(109, 40, 217, .32) 0%, transparent 55%),
    conic-gradient(from 0deg at 50% 50%, rgba(13,0,16,.55) 0deg, rgba(46,10,82,.45) 90deg, rgba(30,27,75,.45) 180deg, rgba(59,7,100,.5) 270deg, rgba(13,0,16,.55) 360deg);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
#chlist.on {
  opacity: 1;
  pointer-events: auto;
}

.cl-hdr {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 32px;
  border-bottom: 1px solid rgba(168, 85, 247, .28);
  background: rgba(0, 0, 0, .35);
}

/* titlu listă canale — ExtraBold */
.cl-title {
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: #a855f7;
}

/* contor canale — SemiBold */
.cl-cnt {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 12px;
  color: #cbb8f0;
  background: rgba(255, 255, 255, .08);
  padding: 3px 12px;
  border-radius: 20px;
}

/* buton ghid EPG complet — SemiBold */
.cl-epg {
  font-family: 'PS-SB', system-ui, sans-serif;
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #7B4CE3, #a855f7);
  padding: 8px 16px;
  border-radius: 8px;
  letter-spacing: .5px;
  transition: filter .2s, transform .15s;
}
.cl-epg:hover { filter: brightness(1.12); }
.cl-epg:active { transform: scale(.96); }

/* buton închide — SemiBold */
.cl-close {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 12px;
  color: #cbb8f0;
  cursor: pointer;
  background: rgba(255, 255, 255, .08);
  padding: 8px 16px;
  border-radius: 8px;
  transition: background .2s;
  letter-spacing: .5px;
}
#chlist .cl-close { margin-left: 0; }
.cl-close:hover { background: rgba(255, 255, 255, .16); }

/* ── Listă de canale în stil rânduri (asemănător ghidului Sky) ── */
.cl-grid {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 8px 22px 24px;
  scrollbar-width: thin;
  scrollbar-color: #7B4CE3 transparent;
}
.cl-grid::-webkit-scrollbar { width: 5px; }
.cl-grid::-webkit-scrollbar-thumb { background: #7B4CE3; border-radius: 4px; }

.cl-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  transition: background .15s ease;
}
.cl-row:nth-child(even) { background: rgba(255, 255, 255, .025); }
.cl-row:hover { background: rgba(123, 76, 227, .22); }
.cl-row.act {
  background: linear-gradient(90deg, rgba(168, 85, 247, .4), rgba(123, 76, 227, .18));
  border-left: 4px solid #f5c518;
  padding-left: 12px;
}

/* număr canal — ExtraBold, stil Sky */
.cl-num {
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #cbb8f0;
  width: 34px;
  text-align: right;
  flex-shrink: 0;
}
.cl-row.act .cl-num { color: #fff; }

.cl-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: rgba(255, 255, 255, .06);
  border-radius: 8px;
  padding: 4px;
  flex-shrink: 0;
}
.cl-logo-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}
.cl-info { width: 200px; min-width: 0; flex-shrink: 0; }

/* nume canal — SemiBold */
.cl-name {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* program curent — precum coloana de programe din ghidul Sky */
.cl-prog {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 13px;
  color: #d8cef2;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cl-row.act .cl-prog { color: #fff; }

/* mini indicator „semnal” — decorativ, gen bare Sky din dreapta */
.cl-sig {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
  height: 16px;
}
.cl-sig span {
  width: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .18);
}
.cl-sig span:nth-child(1) { height: 5px; }
.cl-sig span:nth-child(2) { height: 8px; }
.cl-sig span:nth-child(3) { height: 12px; }
.cl-sig span:nth-child(4) { height: 16px; }
.cl-row.act .cl-sig span { background: #a855f7; }

/* ═══════════════════════════════════════════════════
   GHID EPG COMPLET — toate canalele + programele
═══════════════════════════════════════════════════ */
#epglist {
  position: fixed;
  inset: 0;
  z-index: 31;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(124, 58, 237, .38) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(109, 40, 217, .32) 0%, transparent 55%),
    conic-gradient(from 0deg at 50% 50%, rgba(13,0,16,.55) 0deg, rgba(46,10,82,.45) 90deg, rgba(30,27,75,.45) 180deg, rgba(59,7,100,.5) 270deg, rgba(13,0,16,.55) 360deg);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
#epglist.on {
  opacity: 1;
  pointer-events: auto;
}

.epg-grid {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 8px 22px 24px;
  scrollbar-width: thin;
  scrollbar-color: #7B4CE3 transparent;
}
.epg-grid::-webkit-scrollbar { width: 5px; }
.epg-grid::-webkit-scrollbar-thumb { background: #7B4CE3; border-radius: 4px; }

.epg-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s ease;
}
.epg-row:nth-child(even) { background: rgba(255, 255, 255, .02); }
.epg-row:hover { background: rgba(123, 76, 227, .16); }
.epg-row.act { background: rgba(168, 85, 247, .22); border-left: 4px solid #f5c518; }

.epg-chinfo {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 230px;
  flex-shrink: 0;
  padding: 10px 14px;
}

.epg-num {
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #cbb8f0;
  width: 26px;
  text-align: right;
  flex-shrink: 0;
}
.epg-row.act .epg-num { color: #fff; }

.epg-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  background: rgba(255, 255, 255, .06);
  border-radius: 7px;
  padding: 3px;
  flex-shrink: 0;
}
.epg-logo-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}

.epg-name {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epg-progs {
  flex: 1;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.epg-progs::-webkit-scrollbar { display: none; }

.epg-cell {
  flex-shrink: 0;
  min-width: 170px;
  max-width: 240px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, .05);
}
.epg-cell.now {
  background: rgba(123, 76, 227, .3);
  border: 1px solid rgba(168, 85, 247, .5);
  border-radius: 8px;
  margin: 6px;
}
.epg-cell.empty {
  color: #9d8fc2;
  font-size: 12px;
  font-family: 'PS-SB', system-ui, sans-serif;
  justify-content: center;
}

.epg-cell-t {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 10px;
  color: #b6a6dd;
  margin-bottom: 3px;
}
.epg-cell.now .epg-cell-t { color: #d9c6ff; }

.epg-cell-n {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.epg-cell-n-txt {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #EDEDEE;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.epg-cell.now .epg-cell-n-txt { color: #fff; }

/* ═══ NUMBER DIAL (top-right) ═══ */
#dial {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 42;
  background: rgba(9, 7, 22, .94);
  border: 1px solid rgba(110, 64, 210, .42);
  border-radius: 14px;
  padding: 14px 22px;
  text-align: right;
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
  transition: opacity .22s ease, transform .22s ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .75);
  min-width: 120px;
}
#dial.on {
  opacity: 1;
  transform: translateX(0);
}

/* cifre dial — ExtraBold, element principal */
#d-digits {
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: 3px;
}
#d-name {
  display: none;
}

/* ═══ COMMANDS OVERLAY ═══ */
#cmd {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.91);
  z-index: 50;
  background: rgba(9, 7, 22, .97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(110, 64, 210, .3);
  border-radius: 18px;
  padding: 30px 36px;
  min-width: 380px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .85);
  opacity: 0;
  pointer-events: none;
  transition: all .26s cubic-bezier(.4, 0, .2, 1);
}
#cmd.on {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* titlu overlay comenzi — ExtraBold */
.cmd-h {
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: #a855f7;
  font-weight: 700;
  margin-bottom: 18px;
}

.cmd-rs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cmd-r {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* taste scurtătură — ExtraBold */
.cmd-k {
  font-family: 'PS-EB', system-ui, sans-serif;
  background: rgba(123, 76, 227, .2);
  border: 1px solid rgba(110, 64, 210, .36);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  min-width: 58px;
  text-align: center;
  color: #fff;
  flex-shrink: 0;
}

/* descriere comandă — SemiBold */
.cmd-d {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 13px;
  color: #A0A6B5;
}

/* footer overlay — SemiBold */
.cmd-ft {
  font-family: 'PS-SB', system-ui, sans-serif;
  margin-top: 20px;
  text-align: center;
  font-size: 11px;
  color: #A0A6B5;
}

/* ═══ MUTE BADGE — doar emoji, badge rotund ═══ */
#mb {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 46;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 7, 22, .93);
  border: 1px solid rgba(110, 64, 210, .38);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
  transition: opacity .22s ease, transform .22s ease;
}
#mb.on {
  opacity: 1;
  transform: translateX(0);
}

/* ═══ RADIO BADGE ═══ */
#rb {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-14px);
  z-index: 36;
  background: rgba(9, 7, 22, .91);
  border: 1px solid rgba(168, 85, 247, .44);
  border-radius: 40px;
  padding: 10px 24px;
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #a855f7;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .32s ease, transform .32s ease;
}
#rb.on {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ═══ MESSAGE ICON — stil Telekom STB, plic galben, sus-stânga ═══ */
#msgIcon {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 46;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 7, 22, .93);
  border: 1px solid rgba(245, 197, 24, .5);
  border-radius: 50%;
  color: #f5c518;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-16px);
  transition: opacity .22s ease, transform .22s ease;
}
#msgIcon.on {
  opacity: 1;
  pointer-events: auto;
  animation: msgPulse 1.8s ease-in-out infinite;
}
#msgIcon:hover { filter: brightness(1.15); }
#msgIconDot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4d4d;
  border: 2px solid rgba(9, 7, 22, .93);
}
@keyframes msgPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 197, 24, .45); }
  50%      { box-shadow: 0 0 0 8px rgba(245, 197, 24, 0); }
}

/* ═══ MESAJ — fullscreen overlay ═══ */
#msgview {
  position: fixed;
  inset: 0;
  z-index: 32;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(124, 58, 237, .38) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(109, 40, 217, .32) 0%, transparent 55%),
    conic-gradient(from 0deg at 50% 50%, rgba(13,0,16,.55) 0deg, rgba(46,10,82,.45) 90deg, rgba(30,27,75,.45) 180deg, rgba(59,7,100,.5) 270deg, rgba(13,0,16,.55) 360deg);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
#msgview.on {
  opacity: 1;
  pointer-events: auto;
}
.msg-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px 60px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: #EDEDEE;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ═══════════════════════════════════════════════════
   CANAL CRIPTAT — overlay blocare (z-index peste tot,
   nu permite vizionarea până la introducerea codului)
═══════════════════════════════════════════════════ */
#cryptview {
  position: fixed;
  inset: 0;         /* full screen garantat */
  z-index: 15;       /* sub #ib (20) — bara rămâne deasupra și accesibilă */
  background: #08060d;   /* negru solid, opac — fără blur, fără gradient, nimic din spate nu se vede */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
#cryptview.on {
  opacity: 1;
  pointer-events: auto;
}
.crypt-box {
  width: min(92vw, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 40px 32px;
  border-radius: 20px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(168, 85, 247, .28);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.crypt-lock {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 14px rgba(168, 85, 247, .55));
}
.crypt-title {
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
}
.crypt-sub {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 13px;
  color: #cbb8f0;
  margin-bottom: 8px;
}
.crypt-input {
  width: 100%;
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  text-align: center;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(168, 85, 247, .35);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.crypt-input:focus {
  border-color: #a855f7;
  background: rgba(255, 255, 255, .12);
}
.crypt-msg {
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 13px;
  min-height: 18px;
  color: #ff6b6b;
  letter-spacing: .3px;
}
.crypt-msg.ok { color: #4ade80; }
.crypt-msg.busy { color: #cbb8f0; }

/* ═══ TOUCH HINT ═══ */
#hint {
  position: fixed;
  bottom: 180px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 40px;
  font-family: 'PS-SB', system-ui, sans-serif;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, .1);
  transition: opacity .55s ease;
  white-space: nowrap;
}

/* ═══ SERVICE DOWN SCREEN ═══ */
#service-down {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}
#service-down .sd-msg {
  font-family: 'PS-EB', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 800px) {
  #ib { left: 10px; right: 10px; bottom: 10px; border-radius: 12px; }
  .r1 { padding: 0 16px; height: 70px; }
  .r1-num { font-size: 38px; min-width: 50px; }
  .r1-time { font-size: 30px; }
  .r1-chblock { width: 130px; margin-right: 14px; }
  .r1-ptitle { font-size: 15px; margin-bottom: 7px; }
  .r1-tech { font-size: 9px; padding: 1px 7px; }
  .r2 { height: 62px; }
  .r2.show { max-height: 62px; }
  .epc { min-width: 130px; height: 62px; }
  .epc.now { height: 48px; }
  .cl-hdr { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
  .cl-row { gap: 10px; padding: 8px 10px; }
  .cl-info { width: 120px; }
  .cl-prog { display: none; }
  .cl-sig { display: none; }
  .epg-chinfo { width: 150px; padding: 8px 10px; }
  .epg-name { font-size: 12px; }
  #cmd { min-width: 290px; padding: 22px; }
}

@media (max-width: 500px) {
  .r1-clk { display: none; }
  .cl-epg { padding: 6px 10px; font-size: 11px; }
}