/* ============ 短视频插件样式 ============ */

/* ---- 视频流 ---- */
.xnv-sv-app {
	position: relative;
	overflow: hidden;
	border-radius: 0.75rem;
	background: #000;
	color: #fff;
	isolation: isolate;
}

.xnv-sv-viewport {
	position: relative;
	height: calc(100dvh - 64px);
	min-height: 380px;
	overflow: hidden;
	background: #0b0f1a;
}

#xnvSvItems {
	display: flex;
	flex-direction: column;
	height: 100%;
	will-change: transform;
	transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.xnv-sv-item {
	flex: 0 0 100%;
	position: relative;
	overflow: hidden;
	background: #0b0f1a;
}

.xnv-sv-media {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #0b0f1a;
}

.xnv-sv-video {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.xnv-sv-mute-hint {
	position: absolute;
	right: 0.9rem;
	bottom: 1.1rem;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.05rem;
	color: #fff;
	z-index: 5;
}

/* 信息区（左下） */
.xnv-sv-info {
	position: absolute;
	left: 0.9rem;
	bottom: 0.9rem;
	right: 5rem;
	z-index: 4;
	padding: 1rem 0.9rem;
	border-radius: 0.5rem;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.62) 100%);
}

.xnv-sv-author {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 0.45rem;
}

.xnv-sv-author:hover { color: #fff; opacity: 0.9; }

.xnv-sv-avatar img { border-radius: 50%; }

.xnv-sv-username { font-size: 0.9rem; }

.xnv-sv-title {
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.4;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.xnv-sv-desc {
	font-size: 0.85rem;
	line-height: 1.45;
	margin-top: 0.3rem;
	color: rgba(255, 255, 255, 0.92);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.xnv-sv-meta {
	font-size: 0.75rem;
	margin-top: 0.45rem;
	color: rgba(255, 255, 255, 0.75);
}

/* 右侧操作栏 */
.xnv-sv-rail {
	position: absolute;
	right: 0.7rem;
	bottom: 5.2rem;
	z-index: 5;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	align-items: center;
}

.xnv-sv-act {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	color: #fff;
	text-align: center;
	font-size: 1.5rem;
	line-height: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.xnv-sv-act .xnv-sv-count {
	font-size: 0.7rem;
	font-weight: 600;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.xnv-sv-act.active { color: #ff4d6d; }

.xnv-sv-act:hover { opacity: 0.85; }

/* 顶栏 */
.xnv-sv-topbar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 0.8rem;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
	color: #fff;
}

.xnv-sv-icon-btn {
	background: rgba(255, 255, 255, 0.14);
	border: 0;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 50%;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	cursor: pointer;
	flex-shrink: 0;
}

.xnv-sv-icon-btn:hover { background: rgba(255, 255, 255, 0.26); }

.xnv-sv-logo {
	font-weight: 800;
	font-size: 1.05rem;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	white-space: nowrap;
}

.xnv-sv-logo i { color: #00e5ff; }

.xnv-sv-search {
	flex: 1;
	display: flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.16);
	border-radius: 2rem;
	padding: 0.2rem 0.2rem 0.2rem 0.9rem;
	min-width: 0;
}

.xnv-sv-search input {
	flex: 1;
	border: 0;
	background: none;
	color: #fff;
	font-size: 0.88rem;
	min-width: 0;
	outline: none;
}

.xnv-sv-search input::placeholder { color: rgba(255, 255, 255, 0.65); }

.xnv-sv-search button {
	border: 0;
	background: #00e5ff;
	color: #06222b;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
}

.xnv-sv-upload-btn {
	border: 0;
	background: linear-gradient(135deg, #ff2d95, #a855f7);
	color: #fff;
	font-weight: 700;
	font-size: 0.85rem;
	border-radius: 2rem;
	padding: 0.5rem 0.9rem;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	cursor: pointer;
	flex-shrink: 0;
	white-space: nowrap;
}

.xnv-sv-upload-btn:hover { opacity: 0.9; }

/* 加载更多 / 空状态 */
#xnvSvLoadMore { height: 2px; }

.xnv-sv-empty {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.95rem;
	background: #0b0f1a;
	z-index: 2;
}

.xnv-sv-empty i { font-size: 2.6rem; opacity: 0.6; }

/* ---- 面板（评论 / 分享） ---- */
.xnv-sv-panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 20;
	background: #fff;
	color: #212529;
	border-radius: 1rem 1rem 0 0;
	display: flex;
	flex-direction: column;
	max-height: 72%;
	box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
}

.xnv-sv-panel[hidden] { display: none; }

.xnv-sv-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.7rem 0.9rem;
	border-bottom: 1px solid var(--bs-border-color, #e5e7eb);
	font-weight: 700;
}

.xnv-sv-panel-head .xnv-sv-icon-btn { color: #495057; background: var(--bs-secondary-bg, #f1f3f5); }

.xnv-sv-comments-list {
	flex: 1;
	overflow-y: auto;
	padding: 0.8rem 0.9rem;
	min-height: 120px;
}

.xnv-sv-comment {
	display: flex;
	gap: 0.6rem;
	padding: 0.55rem 0;
}

.xnv-sv-comment img { border-radius: 50%; }

.xnv-sv-comment-body { flex: 1; min-width: 0; }

.xnv-sv-comment-name {
	font-size: 0.78rem;
	color: #6c757d;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.xnv-sv-comment-content {
	font-size: 0.9rem;
	line-height: 1.45;
	word-break: break-word;
	margin: 0.15rem 0 0.1rem;
}

.xnv-sv-comment-actions {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.72rem;
	color: #adb5bd;
}

.xnv-sv-comment-reply-btn {
	border: 0;
	background: none;
	color: #6c757d;
	font-size: 0.75rem;
	cursor: pointer;
	padding: 0;
}

.xnv-sv-comment-del-btn {
	border: 0;
	background: none;
	color: #dc3545;
	font-size: 0.75rem;
	cursor: pointer;
	padding: 0;
}

.xnv-sv-comment-children {
	margin-top: 0.5rem;
	padding-left: 0.4rem;
	border-left: 2px solid var(--bs-border-color, #e5e7eb);
}

.xnv-sv-comments-empty {
	text-align: center;
	color: #adb5bd;
	padding: 1.6rem 0;
	font-size: 0.88rem;
}

.xnv-sv-comments-form {
	display: flex;
	gap: 0.5rem;
	padding: 0.7rem 0.9rem;
	border-top: 1px solid var(--bs-border-color, #e5e7eb);
}

.xnv-sv-comments-form input {
	flex: 1;
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: 2rem;
	padding: 0.45rem 0.9rem;
	font-size: 0.9rem;
	min-width: 0;
	outline: none;
}

.xnv-sv-comments-form input:focus { border-color: #00e5ff; }

/* 分享 */
.xnv-sv-share-actions {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.6rem;
	padding: 1rem 0.9rem;
}

.xnv-sv-share-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	border: 0;
	background: none;
	color: #212529;
	font-size: 0.78rem;
	cursor: pointer;
	padding: 0.5rem 0.2rem;
	border-radius: 0.5rem;
}

.xnv-sv-share-item i {
	font-size: 1.5rem;
	width: 2.6rem;
	height: 2.6rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--bs-secondary-bg, #f1f3f5);
}

.xnv-sv-share-item[data-share="copy"] i { background: #e3f2fd; color: #1565c0; }
.xnv-sv-share-item[data-share="qq"] i { background: #e3f6ff; color: #12b7f5; }
.xnv-sv-share-item[data-share="weibo"] i { background: #ffe9e9; color: #e6162d; }
.xnv-sv-share-item[data-share="native"] i { background: #e8f5e9; color: #2e7d32; }

.xnv-sv-share-item:hover { background: var(--bs-secondary-bg, #f1f3f5); }

.xnv-sv-share-link {
	padding: 0 0.9rem 1rem;
}

.xnv-sv-share-link input {
	width: 100%;
	border: 1px dashed var(--bs-border-color, #dee2e6);
	border-radius: 0.5rem;
	padding: 0.5rem 0.7rem;
	font-size: 0.8rem;
	color: #6c757d;
	background: var(--bs-secondary-bg, #f8f9fa);
}

/* ---- 发布弹窗 ---- */
.xnv-sv-modal {
	position: absolute;
	inset: 0;
	z-index: 30;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.xnv-sv-modal[hidden] { display: none; }

.xnv-sv-modal-box {
	width: 100%;
	max-width: 420px;
	background: #fff;
	color: #212529;
	border-radius: 0.9rem;
	padding: 1rem 1.1rem;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
	max-height: 90%;
	overflow-y: auto;
}

.xnv-sv-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 700;
	margin-bottom: 0.8rem;
}

.xnv-sv-modal-head .xnv-sv-icon-btn { color: #495057; background: var(--bs-secondary-bg, #f1f3f5); }

.xnv-sv-form-row { margin-bottom: 0.85rem; }

.xnv-sv-form-row label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 0.3rem;
	color: #495057;
}

.xnv-sv-form-row input[type="text"],
.xnv-sv-form-row textarea {
	width: 100%;
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: 0.5rem;
	padding: 0.5rem 0.7rem;
	font-size: 0.9rem;
	outline: none;
}

.xnv-sv-form-row input[type="text"]:focus,
.xnv-sv-form-row textarea:focus { border-color: #00e5ff; }

.xnv-sv-form-row input[type="file"] { font-size: 0.85rem; }

.xnv-sv-form-hint { font-size: 0.75rem; color: #adb5bd; margin-top: 0.25rem; }

/* ---- 用户页 ---- */
.xnv-sv-userpage { max-width: 980px; }

.xnv-sv-usertabs {
	display: flex;
	gap: 0.4rem;
	border-bottom: 1px solid var(--bs-border-color, #e5e7eb);
}

.xnv-sv-utab {
	display: inline-flex;
	align-items: center;
	padding: 0.55rem 1rem;
	color: #6c757d;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.xnv-sv-utab:hover { color: #212529; text-decoration: none; }

.xnv-sv-utab.active {
	color: #00a3c4;
	border-bottom-color: #00a3c4;
}

.xnv-sv-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 0.7rem;
	overflow: hidden;
	background: var(--bs-secondary-bg, #f8f9fa);
	border: 1px solid var(--bs-border-color, #e5e7eb);
	height: 100%;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.xnv-sv-card:hover {
	text-decoration: none;
	color: inherit;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.xnv-sv-card-media {
	position: relative;
	aspect-ratio: 9 / 16;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}

.xnv-sv-card-media i {
	font-size: 2rem;
	opacity: 0.85;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.xnv-sv-card-duration {
	position: absolute;
	right: 0.4rem;
	bottom: 0.4rem;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 0.7rem;
	padding: 0.1rem 0.4rem;
	border-radius: 0.35rem;
}

.xnv-sv-card-status {
	position: absolute;
	top: 0.4rem;
	left: 0.4rem;
	color: #fff;
	font-size: 0.68rem;
	padding: 0.12rem 0.45rem;
	border-radius: 0.35rem;
}

.xnv-sv-card-body { padding: 0.5rem 0.65rem 0.6rem; }

.xnv-sv-card-title {
	font-size: 0.88rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.xnv-sv-card-meta {
	font-size: 0.72rem;
	color: #6c757d;
	margin-top: 0.25rem;
}

/* ---- 响应式 ---- */
@media (max-width: 767.98px) {
	.xnv-sv-viewport { height: calc(100dvh - 118px); }
	.xnv-sv-logo { display: none; }
	.xnv-sv-upload-btn span { display: none; }
	.xnv-sv-upload-btn { padding: 0.5rem 0.65rem; }
	.xnv-sv-rail { bottom: 4.6rem; }
	.xnv-sv-info { right: 4.4rem; }
}

@media (prefers-reduced-motion: reduce) {
	#xnvSvItems { transition: none; }
}
