/*
  直播播放器样式
  ==========================================================================
  配色沿用站点主色：深底 rgba(19,21,25,.5) + F1 红 #e10600 + 白色文字。
  播放区固定 16:9（用 aspect-ratio，老浏览器用 padding-top 兜底），
  因为直播源基本都是 16:9，比例不对会出现上下黑边或拉伸。
*/

.tv-wrap {
	position: relative;
	width: 100%;
	/* 兜底：不支持 aspect-ratio 的浏览器靠 padding-top 撑出 16:9 */
	padding-top: 56.25%;
	background: #000;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 4px;
	overflow: hidden;
	margin: 0 0 1em 0;
}

@supports (aspect-ratio: 16 / 9) {
	.tv-wrap {
		padding-top: 0;
		aspect-ratio: 16 / 9;
	}
}

.tv-wrap video,
.tv-wrap iframe.tv-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background: #000;
	border: 0;
	display: block;
}

/* 覆盖层：连接中 / 离线 / 出错时的说明 + 播放按钮 */
.tv-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.9em;
	padding: 1.5em;
	text-align: center;
	background:
		radial-gradient(120% 100% at 50% 0%, rgba(225, 6, 0, 0.18) 0%, rgba(9, 12, 15, 0) 70%),
		rgba(9, 12, 15, 0.92);
}

.tv-state {
	font-size: 0.95em;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.85);
	max-width: 30em;
}

.tv-state.is-warn { color: #ffd12e; }
.tv-state.is-err  { color: #ff6b5e; }

.tv-btn {
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid rgba(225, 6, 0, 0.9);
	background: linear-gradient(180deg, rgba(225, 6, 0, 0.22) 0%, rgba(225, 6, 0, 0.08) 100%);
	color: #fff;
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.05em;
	padding: 0.65em 1.9em;
	border-radius: 3px;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.tv-btn:hover { background-color: rgba(225, 6, 0, 0.3); }
.tv-btn:active { transform: scale(0.97); }
.tv-btn:disabled { opacity: 0.55; cursor: default; }

/* 状态提示行（播放器下方一行小字，出错时变红） */
.tv-hint {
	font-size: 0.8em;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.45);
	margin: -0.4em 0 1.2em 0;
	word-break: break-all;
}

.tv-hint-err { color: #ff8b80; }

/* 移动端：播放器满宽，说明文字缩小一点 */
@media screen and (max-width: 736px) {
	.tv-state { font-size: 0.85em; }
	.tv-btn { padding: 0.6em 1.5em; }
	.tv-hint { font-size: 0.75em; }
}
