/* media-parse · 抖音风格结果预览 */

:root {
	--mp-pink: #FE2C55;
	--mp-pink-2: #FF0050;
	--mp-ink: #161823;
	--mp-muted: #8a8b91;
	--mp-line: #ececec;
	--mp-soft: #f8f8f8;
}

.gradient-text {
	background: linear-gradient(45deg, var(--mp-pink), var(--mp-pink-2));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/*
 * 首屏只显示标题+输入框：
 * 扣除顶栏/面包屑后占满剩余视口，内容垂直居中；下方平台等需滚动才见。
 */
.mp-home {
	min-height: calc(100vh - 140px);
	min-height: calc(100dvh - 140px);
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

.mp-home > .container {
	width: 100%;
}

.mp-box {
	background: #fff;
	border: 1px solid var(--mp-line);
	border-radius: 12px;
	box-shadow: 0 8px 28px rgba(22, 24, 35, 0.06);
}

.mp-input {
	height: 48px;
	padding: 0 16px;
	border: 1px solid #dfe0e4;
	border-radius: 8px;
	background: var(--mp-soft);
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mp-input:focus {
	border-color: var(--mp-pink);
	box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.12);
	background: #fff;
}

/* 统一操作按钮：button / a 共用同一套尺寸，只换颜色 */
.mp-act,
a.mp-act,
button.mp-act {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	height: 36px !important;
	min-height: 36px !important;
	max-height: 36px !important;
	padding: 0 14px !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 8px !important;
	box-sizing: border-box !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 36px !important;
	letter-spacing: 0 !important;
	text-decoration: none !important;
	white-space: nowrap;
	vertical-align: middle;
	cursor: pointer;
	outline: none;
}

.mp-act-ghost {
	color: #161823 !important;
	background: #f2f2f4 !important;
}

.mp-act-ghost:hover {
	background: #e8e8ec !important;
}

.mp-act-pink {
	color: #fff !important;
	background: linear-gradient(90deg, var(--mp-pink), var(--mp-pink-2)) !important;
}

.mp-act-pink:hover {
	opacity: 0.92;
}

.mp-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.mp-btn-primary {
	min-width: 120px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 22px;
	border-radius: 8px;
	color: #fff;
	font-weight: 600;
	line-height: 1;
	box-sizing: border-box;
	border: none;
	cursor: pointer;
	background: linear-gradient(90deg, var(--mp-pink), var(--mp-pink-2));
}

.mp-btn-primary:hover {
	opacity: 0.92;
}

.mp-demo-banner {
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(90deg, #161823, #2b2d36 55%, var(--mp-pink));
}

.mp-badge {
	display: inline-flex;
	align-items: center;
	height: 28px;
	padding: 0 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(90deg, var(--mp-pink), var(--mp-pink-2));
}

.mp-tag {
	display: inline-flex;
	align-items: center;
	height: 28px;
	padding: 0 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	color: var(--mp-pink);
	background: rgba(254, 44, 85, 0.08);
	border: 1px solid rgba(254, 44, 85, 0.18);
}

.mp-section {
	text-align: left;
	padding-top: 4px;
}

.mp-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--mp-muted);
	text-transform: none;
}

.mp-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	font-size: 12px;
	color: #fff;
	background: var(--mp-ink);
}

.mp-author {
	display: flex;
	align-items: center;
	gap: 12px;
}

.mp-author img {
	width: 52px;
	height: 52px;
	border-radius: 999px;
	object-fit: cover;
	border: 2px solid #fff;
	box-shadow: 0 0 0 2px rgba(254, 44, 85, 0.35);
}

.mp-author-name {
	font-size: 16px;
	font-weight: 700;
	color: var(--mp-ink);
}

.mp-author-id {
	margin-top: 2px;
	font-size: 12px;
	color: var(--mp-muted);
}

.mp-title {
	font-size: 22px;
	line-height: 1.35;
	font-weight: 800;
	color: var(--mp-ink);
}

.mp-desc {
	font-size: 15px;
	line-height: 1.7;
	color: #4a4b52;
	white-space: pre-wrap;
}

.mp-media-row {
	display: grid;
	grid-template-columns: minmax(140px, 220px) 1fr;
	gap: 14px;
	align-items: stretch;
	height: 360px;
}

@media (max-width: 768px) {
	.mp-media-row {
		grid-template-columns: 120px 1fr;
		height: 240px;
	}
}

.mp-cover-wrap,
.mp-video-wrap {
	position: relative;
	height: 100%;
	min-height: 0;
	border-radius: 12px;
	overflow: hidden;
	background: #111;
}

.mp-cover-wrap {
	cursor: zoom-in;
}

.mp-cover-wrap:hover .mp-cover {
	transform: scale(1.03);
}

.mp-cover {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.mp-cover-label {
	position: absolute;
	left: 8px;
	bottom: 8px;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: rgba(0, 0, 0, 0.55);
	z-index: 2;
	pointer-events: none;
}

.mp-view-mask {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	color: #fff;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.mp-view-mask i {
	font-size: 22px;
	line-height: 1;
}

.mp-view-mask em {
	font-style: normal;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
}

.mp-cover-wrap:hover .mp-view-mask,
.mp-cover-wrap:focus-visible .mp-view-mask,
.mp-cover-wrap:active .mp-view-mask,
.mp-gallery-item:hover .mp-view-mask,
.mp-gallery-item:active .mp-view-mask {
	opacity: 1;
}

/* 手机无悬停：常显提示，方便点按预览 */
@media (hover: none) {
	.mp-view-mask {
		opacity: 1;
		background: rgba(0, 0, 0, 0.28);
	}
}

.mp-video {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
	background: #0f0f12;
}

.mp-video-wrap.is-fail .mp-video {
	display: none;
}

.mp-video-fail {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px 20px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	color: #fff;
	background: #161823;
}

.mp-video-fail.hidden {
	display: none !important;
}

.mp-video-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

@media (max-width: 900px) {
	.mp-video-list {
		grid-template-columns: 1fr;
	}
}

.mp-video-item {
	border: 1px solid var(--mp-line);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}

.mp-video-thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #111;
}

.mp-video-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mp-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 22px;
	background: rgba(0, 0, 0, 0.22);
}

.mp-video-meta {
	padding: 12px;
}

.mp-video-name {
	margin-bottom: 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--mp-ink);
}

.mp-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

@media (max-width: 640px) {
	.mp-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.mp-gallery-item {
	position: relative;
	aspect-ratio: 1;
	border-radius: 10px;
	overflow: hidden;
	background: #f3f3f5;
	cursor: pointer;
}

.mp-gallery-item.is-fail {
	cursor: default;
	background: #fffbeb;
}

.mp-gallery-item.is-fail img {
	opacity: 0.2;
	filter: grayscale(1);
}

.mp-gallery-fail-text {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	box-sizing: border-box;
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	color: #b45309;
	background: rgba(255, 251, 235, 0.92);
	pointer-events: none;
}

.mp-gallery-tip {
	margin: 0 0 12px;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.5;
	color: #b45309;
	background: #fffbeb;
	border: 1px solid #fde68a;
}

.mp-gallery-tip.hidden {
	display: none !important;
}

.mp-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}

.mp-gallery-item:hover img {
	transform: scale(1.04);
}

.mp-gallery-idx {
	position: absolute;
	top: 8px;
	left: 8px;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	background: rgba(22, 24, 35, 0.7);
}

.mp-live-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

@media (max-width: 640px) {
	.mp-live-list {
		grid-template-columns: 1fr;
	}
}

.mp-live-item {
	position: relative;
	aspect-ratio: 1;
	border-radius: 12px;
	overflow: hidden;
	background: #111;
}

.mp-live-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mp-live-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.06em;
	color: #fff;
	background: linear-gradient(90deg, var(--mp-pink), var(--mp-pink-2));
}

.mp-live-actions {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 10px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.mp-audio-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px;
	border-radius: 12px;
	background: var(--mp-soft);
	border: 1px solid var(--mp-line);
}

.mp-audio-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	color: #fff;
	background: linear-gradient(135deg, var(--mp-pink), #161823);
	flex-shrink: 0;
}

.mp-audio-body {
	flex: 1;
	min-width: 0;
}

.mp-audio-name {
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--mp-ink);
}

.mp-audio {
	width: 100%;
	height: 36px;
}

.mp-subtitle {
	border: 1px solid var(--mp-line);
	border-radius: 12px;
	background: #fafafa;
	overflow: hidden;
}

.mp-subtitle-line {
	display: flex;
	gap: 12px;
	padding: 12px 14px;
	font-size: 14px;
	line-height: 1.5;
	color: #333;
	border-bottom: 1px solid var(--mp-line);
}

.mp-subtitle-line:last-child {
	border-bottom: 0;
}

.mp-sub-t {
	flex-shrink: 0;
	width: 48px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	color: var(--mp-pink);
}

.mp-step {
	width: 32px;
	height: 32px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: #fff;
	font-weight: 700;
	background: linear-gradient(90deg, var(--mp-pink), var(--mp-pink-2));
}

/* 支持的平台：整段不铺白底，避免首屏露出白条；白底只在表格卡片上 */
.mp-platforms {
	background: transparent;
}

.mp-matrix-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	background: #fff;
	border: 1px solid var(--mp-line);
	border-radius: 12px;
	box-shadow: 0 8px 28px rgba(22, 24, 35, 0.06);
	padding: 8px 4px 4px;
}

.mp-features {
	position: relative;
	margin-top: 48px;
	padding: 80px 0;
	overflow: hidden;
	background:
		radial-gradient(ellipse 80% 60% at 10% 0%, rgba(254, 44, 85, 0.08), transparent 55%),
		radial-gradient(ellipse 70% 50% at 90% 100%, rgba(255, 0, 80, 0.06), transparent 50%),
		linear-gradient(180deg, #f7f7f8 0%, #ffffff 100%);
	border-top: 0;
}

.mp-tutorial {
	margin-top: 48px;
	padding: 80px 0 88px;
	background: #fff;
	border-top: 0;
}

.mp-features-head {
	text-align: center;
	margin-bottom: 40px;
}

.mp-features-title {
	margin: 0 0 10px;
	font-size: 1.875rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.mp-features-desc {
	margin: 0 auto;
	max-width: 28rem;
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--mp-muted);
}

.mp-features-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}

@media (min-width: 768px) {
	.mp-features-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 18px;
	}
}

.mp-feature {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 32px 28px 30px;
	min-height: 220px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid rgba(254, 44, 85, 0.1);
	box-shadow: 0 10px 30px rgba(22, 24, 35, 0.04);
	transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.mp-feature::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--mp-pink), var(--mp-pink-2)) top / 100% 3px no-repeat;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.28s ease;
}

.mp-feature:hover {
	transform: translateY(-4px);
	border-color: rgba(254, 44, 85, 0.28);
	box-shadow: 0 16px 40px rgba(254, 44, 85, 0.12);
}

.mp-feature:hover::before {
	opacity: 1;
}

.mp-feature-icon {
	width: 48px;
	height: 48px;
	border-radius: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.15rem;
	color: #fff;
	background: linear-gradient(135deg, var(--mp-pink), var(--mp-pink-2));
	box-shadow: 0 8px 18px rgba(254, 44, 85, 0.28);
}

.mp-feature-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mp-feature-index {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: rgba(254, 44, 85, 0.75);
}

.mp-feature-name {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--mp-ink);
	letter-spacing: -0.01em;
}

.mp-feature-text {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.65;
	color: #6b7280;
}

@media (prefers-reduced-motion: reduce) {
	.mp-feature,
	.mp-feature::before {
		transition: none;
	}

	.mp-feature:hover {
		transform: none;
	}
}

.result-appear {
	animation: mpSlideUp 0.45s ease forwards;
}

@keyframes mpSlideUp {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 能力矩阵：窄屏横向滑动查看；白底做在卡片上 */
.mp-matrix {
	width: 100%;
	min-width: 760px;
	border-collapse: collapse;
	font-size: 13px;
	table-layout: fixed;
}

.mp-matrix thead th {
	background: #fafbfc;
	color: #6b7280;
	font-weight: 600;
	text-align: center;
	padding: 12px 6px;
	border-bottom: 1px solid #eef0f3;
	white-space: nowrap;
}

.mp-matrix thead th.mp-matrix-name,
.mp-matrix tbody td.mp-matrix-name {
	text-align: left;
	padding-left: 16px;
	padding-right: 12px;
	font-weight: 600;
	color: #111827;
	white-space: nowrap;
	width: 14%;
}

.mp-matrix tbody td.mp-matrix-name a.mp-matrix-link {
	color: #111827;
	text-decoration: none;
}

.mp-matrix tbody td.mp-matrix-name a.mp-matrix-link:hover {
	color: var(--mp-pink);
	text-decoration: underline;
}

.mp-matrix tbody td {
	text-align: center;
	padding: 10px 6px;
	border-bottom: 1px solid #f3f4f6;
	color: #9ca3af;
	word-break: break-all;
}

.mp-matrix tbody tr:hover td {
	background: #fff8fb;
}

.mp-yes {
	color: var(--mp-pink);
	font-weight: 700;
}

.mp-no {
	color: #d1d5db;
}

@media (max-width: 768px) {
	.mp-matrix {
		font-size: 12px;
		table-layout: auto;
	}

	.mp-matrix thead th,
	.mp-matrix tbody td {
		padding: 8px 4px;
	}

	.mp-matrix thead th.mp-matrix-name,
	.mp-matrix tbody td.mp-matrix-name {
		padding-left: 10px;
		padding-right: 8px;
	}
}

/* 触屏端结果区只保留复制，隐藏下载 */
body[data-is-mobile="1"] .mp-download-act,
body[data-is-mobile="1"] #download-progress {
	display: none !important;
}

/* 本页 .mp-actions 等设置了 display:flex/grid，会盖过 Tailwind .hidden */
#home .hidden,
.mp-home .hidden {
	display: none !important;
}
