/* StreamHub Player — stream page.
   Visual idea: a broadcast switcher. Servers are numbered channels; the one on air carries a red tally. */
:root {
	--shp-primary: #16263a;
	--shp-primary-ink: #ffffff;
	--shp-accent: #ffb627;
	--shp-accent-ink: #14100a;
	--shp-tally: #ff3b30;
	--shp-radius: 8px;
	--shp-bar: #05090f;
	--shp-ink: #f3f5f9;
	--shp-h: 44px;
	--shp-fs: 15px;
	--shp-refresh-bg: #16263a;
	--shp-share-bg: #16263a;
	--shp-logo-w: 12%;
	--shp-font: "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Sans", system-ui, -apple-system, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: #000; }
body.shp-body { font-family: var(--shp-font); color: var(--shp-ink); -webkit-text-size-adjust: 100%; overflow: hidden; }
button { font: inherit; color: inherit; }
svg { fill: currentColor; display: block; }

.shp-app { display: flex; flex-direction: column; height: 100%; height: 100dvh; background: #000; }
.shp-size-s { --shp-h: 36px; --shp-fs: 13px; }
.shp-size-l { --shp-h: 54px; --shp-fs: 17px; }

/* ---------- switcher ---------- */
.shp-switcher { background: var(--shp-bar); padding: 6px; flex: none; }
.shp-nav-b .shp-switcher { order: 2; }
.shp-tabs { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #33415a transparent; }
.shp-tabs li { flex: 1 1 0; min-width: 0; }
.shp-inline .shp-tabs li { flex: 0 0 auto; }
.shp-tab {
	display: flex; align-items: center; justify-content: center; gap: .6em;
	min-height: var(--shp-h); padding: 0 1em 0 .5em; width: 100%;
	background: var(--shp-primary); color: var(--shp-primary-ink);
	border: 2px solid transparent; border-radius: var(--shp-radius);
	font-size: var(--shp-fs); font-weight: 600; text-decoration: none; white-space: nowrap;
	transition: background-color .15s, color .15s, border-color .15s;
}
.shp-tab__no {
	display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; padding: 0 .3em;
	border-radius: calc(var(--shp-radius) * .6); background: rgba(255,255,255,.14);
	font-size: .8em; font-variant-numeric: tabular-nums; line-height: 1;
}
.shp-tab:hover { border-color: var(--shp-accent); }
.shp-tab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.shp-tab.is-active { background: var(--shp-accent); color: var(--shp-accent-ink); border-color: var(--shp-accent); }
.shp-tab.is-active .shp-tab__no { background: var(--shp-tally); color: #fff; }
.shp-style-outline .shp-tab:not(.is-active) { background: transparent; border-color: color-mix(in srgb, var(--shp-primary) 55%, #fff 45%); color: var(--shp-ink); }
.shp-style-outline .shp-tab:not(.is-active):hover { border-color: var(--shp-accent); }
.shp-rtl .shp-tab { padding: 0 .5em 0 1em; }

/* ---------- stage ---------- */
.shp-stage { position: relative; flex: 1 1 auto; min-height: 0; background: #000; overflow: hidden; }
.shp-mount, .shp-mount > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.shp-mount video { width: 100%; height: 100%; background: #000; object-fit: contain; }
.shp-mount .plyr, .shp-mount .video-js, .shp-mount .dplayer, .shp-mount .fluid_video_wrapper, .shp-mount [data-player] { width: 100% !important; height: 100% !important; }
.shp-mount .plyr__video-wrapper { height: 100%; }
.shp-mount .dplayer { direction: ltr; }
.shp-status { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1.5rem; font-size: 15px; line-height: 1.6; color: #c9d2e0; pointer-events: none; }
.shp-status[hidden] { display: none; }
.shp-status.is-error { color: #ffd7d4; }
.shp-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #c9d2e0; text-align: center; padding: 1.5rem; }

/* ---------- refresh / share ---------- */
.shp-act {
	position: absolute; z-index: 20; display: inline-flex; align-items: center; gap: .45em;
	height: 34px; min-width: 34px; padding: 0 9px; justify-content: center;
	background: var(--shp-refresh-bg); color: #fff; border: 1px solid rgba(255,255,255,.16);
	border-radius: calc(var(--shp-radius) * .75 + 2px); font-size: 13px; font-weight: 600; cursor: pointer;
	opacity: .86; transition: opacity .15s, background-color .15s;
}
.shp-act--share { background: var(--shp-share-bg); }
.shp-act:hover, .shp-act:focus-visible { opacity: 1; background: var(--shp-accent); color: var(--shp-accent-ink); }
.shp-act:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.shp-act svg { width: 17px; height: 17px; }
.shp-act--refresh:hover svg { transform: rotate(60deg); transition: transform .2s; }
.shp-pos-1 { top: 10px; right: 10px; }
.shp-pos-2 { top: 10px; left: 10px; }
.shp-pos-3 { bottom: 10px; right: 10px; }
.shp-pos-4 { bottom: 10px; left: 10px; }
.shp-act--refresh.shp-pos-1 + .shp-act--share.shp-pos-1 { top: 52px; }
.shp-act--refresh.shp-pos-2 + .shp-act--share.shp-pos-2 { top: 52px; }
.shp-act--refresh.shp-pos-3 + .shp-act--share.shp-pos-3 { bottom: 52px; }
.shp-act--refresh.shp-pos-4 + .shp-act--share.shp-pos-4 { bottom: 52px; }

/* ---------- logo / site text ---------- */
.shp-logo { position: absolute; z-index: 15; width: var(--shp-logo-w); min-width: 56px; max-width: 160px; height: auto; max-height: 80px; object-fit: contain; pointer-events: none; }
.shp-logo-top-right .shp-logo { top: 52px; right: 12px; }
.shp-logo-top-left .shp-logo { top: 52px; left: 12px; }
.shp-logo-bottom-right .shp-logo { bottom: 52px; right: 12px; }
.shp-logo-bottom-left .shp-logo { bottom: 52px; left: 12px; }
.shp-site-text { position: absolute; z-index: 5; left: 0; right: 0; bottom: 14%; text-align: center; font-size: clamp(14px, 3vw, 30px); font-weight: 700; color: rgba(255,255,255,.9); text-shadow: 0 1px 6px #000; pointer-events: none; }

/* ---------- notice ---------- */
.shp-notice { --n: #229ed9; position: absolute; z-index: 30; bottom: 56px; }
.shp-notice-right { right: 14px; }
.shp-notice-left { left: 14px; }
.shp-notice--telegram { --n: #229ed9; } .shp-notice--youtube { --n: #e62117; } .shp-notice--facebook { --n: #1877f2; }
.shp-notice--x { --n: #14171a; } .shp-notice--apk { --n: #2f9e5b; } .shp-notice--ios { --n: #2b8cf0; }
.shp-notice__bubble { display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--n); color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.shp-notice__bubble svg { width: 22px; height: 22px; }
.shp-notice__bubble:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.shp-notice__card { position: absolute; bottom: 58px; width: 250px; padding: 14px; border-radius: 10px; background: #fff; color: #1b2230; box-shadow: 0 8px 28px rgba(0,0,0,.5); text-align: start; }
.shp-notice-right .shp-notice__card { right: 0; } .shp-notice-left .shp-notice__card { left: 0; }
.shp-notice__card[hidden] { display: none; }
.shp-skin-dark .shp-notice__card { background: #1c2433; color: #eef1f7; }
.shp-notice__title { display: block; font-size: 15px; margin-bottom: 4px; }
.shp-notice__card p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; opacity: .8; }
.shp-notice__cta { display: inline-block; padding: 6px 12px; border-radius: 6px; background: var(--n); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }

/* ---------- share modal ---------- */
.shp-modal { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; padding: 14px; background: rgba(0,0,0,.72); }
.shp-modal[hidden] { display: none; }
.shp-modal__card { position: relative; width: min(620px, 100%); padding: 24px; border-radius: 12px; background: #172033; border: 1px solid #2a3750; }
.shp-modal__card h2 { margin: 0 0 14px; font-size: 17px; }
.shp-modal__close { position: absolute; top: 8px; inset-inline-end: 8px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.shp-modal__close:hover { background: rgba(255,255,255,.1); }
.shp-modal__close svg { width: 18px; height: 18px; fill: none; }
.shp-modal__row { display: flex; gap: 10px; align-items: stretch; }
.shp-modal__row textarea { flex: 1; min-width: 0; resize: none; direction: ltr; text-align: left; padding: 10px; border-radius: 8px; border: 1px solid #2a3750; background: #0c1220; color: #d6e2f5; font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; }
.shp-btn { padding: 0 18px; border: 0; border-radius: 8px; background: var(--shp-accent); color: var(--shp-accent-ink); font-weight: 700; cursor: pointer; }
.shp-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 520px) { .shp-modal__row { flex-direction: column; } .shp-btn { height: 40px; } }

/* ---------- banner ad ---------- */
.shp-banner { position: absolute; z-index: 40; bottom: 0; left: 50%; transform: translateX(-50%); max-width: 100%; }
.shp-banner[hidden] { display: none; }
.shp-banner__close { position: absolute; top: -26px; right: 0; display: grid; place-items: center; width: 26px; height: 26px; border: 0; background: #fff; color: #111; cursor: pointer; }
.shp-banner__close[hidden] { display: none; }
.shp-banner__close svg { width: 14px; height: 14px; fill: none; }
.shp-banner__body { max-width: 100%; overflow: hidden; }

@media (max-width: 640px) {
	.shp-tabs { gap: 4px; }
	.shp-app { --shp-fs: 14px; }
	.shp-size-l { --shp-fs: 15px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
