/**
 * 域名统一查询 - 前台样式 v2（前缀 uds-，自包含，不依赖主题样式）。
 *
 * 结构：渐变 Hero（搜索）→ 悬浮结果卡 → 详情抽屉；Toast / 骨架屏 / 空状态 / 登录提示。
 */

.uds-portal {
	--uds-ink: #17233d;
	--uds-muted: #6b7a99;
	--uds-line: #e3e9f4;
	--uds-bg: #f4f6fb;
	--uds-brand: #2f6bff;
	--uds-brand-dark: #1e4fd6;
	--uds-reg: #f59e0b;
	--uds-radius: 16px;

	max-width: 1440px;
	margin: 0 auto;
	color: var(--uds-ink);
	font-size: 15px;
	line-height: 1.6;
	font-variant-numeric: tabular-nums;
}

/* ==================== 独立全屏页（放弃主题头尾） ==================== */

body.uds-standalone {
	margin: 0;
	padding: 0 24px 44px;
	background: #eef1f6;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	-webkit-font-smoothing: antialiased;
}

.uds-topbar {
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 16px 4px 20px;
}

.uds-topbar-brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14.5px;
	font-weight: 800;
	color: #17233d;
	text-decoration: none;
}

.uds-topbar-dot {
	width: 12px;
	height: 12px;
	border-radius: 4px;
	background: linear-gradient(135deg, #2f6bff, #6a3df5);
	box-shadow: 0 3px 8px -2px rgba(47, 107, 255, 0.6);
}

.uds-topbar-tag {
	font-size: 12.5px;
	color: #6b7a99;
	background: #fff;
	border: 1px solid #e3e9f4;
	border-radius: 999px;
	padding: 3px 12px;
	font-weight: 600;
}

.uds-standalone-main {
	max-width: 1440px;
	margin: 0 auto;
}

.uds-footer {
	max-width: 1440px;
	margin: 26px auto 0;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 12.5px;
	color: #8592ab;
	text-align: center;
}

.uds-footer-sep {
	opacity: 0.6;
}

.uds-portal *,
.uds-portal *::before,
.uds-portal *::after {
	box-sizing: border-box;
}

/* hidden 属性优先级最高：防止类的 display 值覆盖隐藏语义 */
.uds-portal [hidden],
.uds-portal [hidden] * {
	display: none !important;
}

/* ==================== Hero ==================== */

.uds-hero {
	position: relative;
	overflow: hidden;
	border-radius: 22px;
	padding: 44px 40px 84px;
	background: linear-gradient(132deg, #1d3a8f 0%, #2f6bff 55%, #4f8cff 100%);
	color: #fff;
	box-shadow: 0 18px 44px -18px rgba(30, 79, 214, 0.55);
}

.uds-hero-glow {
	position: absolute;
	inset: auto -80px -140px auto;
	width: 420px;
	height: 420px;
	background: radial-gradient(circle at center, rgba(255, 255, 255, 0.18), transparent 65%);
	pointer-events: none;
}

.uds-hero-inner {
	position: relative;
	max-width: 980px;
	margin: 0 auto;
	text-align: center;
	z-index: 1;
}

.uds-hero-badge {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: #dbe7ff;
	background: rgba(255, 255, 255, 0.13);
	border: 1px solid rgba(255, 255, 255, 0.22);
}

.uds-hero-title {
	margin: 14px 0 6px;
	font-size: 30px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #fff;
}

.uds-hero-sub {
	margin: 0 auto 26px;
	max-width: 640px;
	font-size: 14.5px;
	color: #ccd9ff;
}

/* ---------- 搜索框 ---------- */

.uds-search-box {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 8px 8px 18px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 12px 34px -12px rgba(9, 30, 82, 0.5);
}

.uds-search-icon {
	display: inline-flex;
	color: #94a3c4;
	flex: none;
}

.uds-search-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 48px;
	border: 0;
	outline: none;
	font-size: 15.5px;
	color: var(--uds-ink);
	background: transparent;
}

.uds-search-input::placeholder {
	color: #9aa8c7;
}

.uds-btn {
	display: inline-block;
	border: 0;
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
	border-radius: 12px;
	text-decoration: none;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.uds-btn-primary {
	height: 48px;
	padding: 0 30px;
	background: var(--uds-brand);
	color: #fff;
	box-shadow: 0 8px 18px -8px rgba(47, 107, 255, 0.7);
}

.uds-btn-primary:hover {
	background: var(--uds-brand-dark);
	color: #fff;
}

.uds-btn-primary:active {
	background: #173fae;
}

.uds-btn-primary:disabled {
	opacity: 0.6;
	cursor: wait;
}

/* ---------- 来源分段 ---------- */

.uds-segments {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
	flex-wrap: wrap;
}

.uds-seg {
	padding: 7px 20px;
	font-size: 13.5px;
	font-weight: 600;
	color: #dbe7ff;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.uds-seg:hover {
	background: rgba(255, 255, 255, 0.22);
}

.uds-seg.is-active {
	background: #fff;
	color: var(--uds-brand-dark);
	border-color: #fff;
}

.uds-seg.is-disabled {
	opacity: 0.42;
	cursor: not-allowed;
}

/* ---------- 访问密码 ---------- */

.uds-password-row {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 460px;
	margin: 16px auto 0;
	padding: 4px 14px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.26);
	border-radius: 12px;
}

.uds-password-icon {
	font-size: 14px;
}

.uds-password-input {
	flex: 1;
	height: 40px;
	border: 0;
	outline: none;
	background: transparent;
	color: #fff;
	font-size: 14px;
}

.uds-password-input::placeholder {
	color: #c4d4ff;
}

/* ---------- 数据规模条 ---------- */

.uds-statline {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
	flex-wrap: wrap;
}

.uds-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 14px;
	font-size: 13px;
	color: #e7eeff;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 999px;
}

.uds-pill b {
	color: #fff;
	font-weight: 800;
}

.uds-pill.is-plain {
	color: #b7c8f2;
	background: transparent;
	border-color: rgba(255, 255, 255, 0.16);
	font-size: 12px;
}

.uds-pill.is-muted {
	color: #cdd8f2;
}

/* ---------- 来源圆点 ---------- */

.uds-dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	flex: none;
}

.uds-dot-xinnet {
	background: #6ea1ff;
	box-shadow: 0 0 0 3px rgba(110, 161, 255, 0.25);
}

.uds-dot-reg {
	background: #ffc35c;
	box-shadow: 0 0 0 3px rgba(255, 195, 92, 0.25);
}

.uds-dot-tip {
	background: transparent;
	box-shadow: none;
	font-size: 13px;
	line-height: 1;
}

/* ==================== Toast ==================== */

.uds-toast {
	position: fixed;
	left: 50%;
	bottom: 34px;
	transform: translate(-50%, 16px);
	z-index: 99999;
	max-width: min(520px, calc(100vw - 32px));
	padding: 12px 20px;
	font-size: 14px;
	color: #fff;
	background: #23304d;
	border-radius: 12px;
	box-shadow: 0 14px 34px -10px rgba(9, 30, 82, 0.55);
	opacity: 0;
	transition: opacity 0.24s ease, transform 0.24s ease;
}

.uds-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.uds-toast.is-error {
	background: #d64545;
}

/* ==================== 卡片 ==================== */

.uds-card {
	background: #fff;
	border: 1px solid var(--uds-line);
	border-radius: var(--uds-radius);
	box-shadow: 0 6px 24px -14px rgba(23, 35, 61, 0.18);
}

/* 结果卡：上叠 Hero，形成悬浮效果 */
.uds-results-card {
	margin-top: -48px;
	position: relative;
	z-index: 2;
	padding: 20px 22px 16px;
}

/* WHOIS 卡与结果卡同时出现时，WHOIS 卡上叠 Hero，结果卡改为普通间距 */
.uds-whois-card {
	margin-top: -48px;
	position: relative;
	z-index: 2;
	padding: 20px 22px 16px;
}

.uds-whois-card + .uds-results-card {
	margin-top: 16px;
}

.uds-whois-card .uds-kv {
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.uds-results-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.uds-results-title {
	margin: 0;
	font-size: 17px;
	font-weight: 800;
}

.uds-kw {
	color: var(--uds-brand-dark);
}

.uds-count {
	margin-left: 10px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--uds-brand);
	background: #eef4ff;
	padding: 2px 10px;
	border-radius: 999px;
	vertical-align: 2px;
}

.uds-results-hint {
	font-size: 12.5px;
	color: var(--uds-muted);
}

/* ---------- 数据来源卡 ---------- */

.uds-sources-card {
	margin-top: 16px;
	padding: 14px 18px;
}

.uds-sources-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.uds-source-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 12px;
	background: #f8fafd;
	border: 1px solid #eef2f9;
}

.uds-source-item.is-off {
	opacity: 0.55;
}

.uds-source-name {
	font-size: 13.5px;
	font-weight: 700;
}

.uds-source-desc {
	font-size: 12px;
	color: var(--uds-muted);
}

/* ==================== 结果表 ==================== */

.uds-table-wrap {
	overflow-x: auto;
	margin: 0 -6px;
	padding: 0 6px;
}

.uds-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 14px;
	min-width: 720px;
}

.uds-table th,
.uds-table td {
	text-align: left;
	padding: 12px 14px;
	border-bottom: 1px solid #edf1f8;
	white-space: nowrap;
}

.uds-table tbody tr:last-child td {
	border-bottom: 0;
}

.uds-table thead th {
	color: var(--uds-muted);
	font-weight: 700;
	font-size: 11.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	background: transparent;
	border-bottom: 1px solid var(--uds-line);
	padding-top: 4px;
}

.u-th-right,
.u-td-right {
	text-align: right !important;
}

.uds-col-date {
	color: var(--uds-muted);
	font-size: 13.5px;
}

.uds-row {
	cursor: pointer;
	transition: background 0.12s ease;
}

.uds-row:hover td,
.uds-row:focus td {
	background: #f6f9ff;
}

.uds-row:focus {
	outline: none;
}

.uds-domain-cell {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.uds-domain-name {
	font-weight: 700;
	color: var(--uds-ink);
	word-break: break-all;
	white-space: normal;
}

.uds-row:hover .uds-domain-name {
	color: var(--uds-brand-dark);
}

.uds-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 800;
	color: #fff;
	flex: none;
}

.uds-avatar-1 { background: #2f6bff; }
.uds-avatar-2 { background: #7c3aed; }
.uds-avatar-3 { background: #0ea5a4; }
.uds-avatar-4 { background: #f59e0b; }
.uds-avatar-5 { background: #e04f5f; }
.uds-avatar-6 { background: #334155; }

/* ---------- WHOIS / 可注册卡片 ---------- */

.uds-w-banner {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	border-radius: 14px;
	margin-bottom: 14px;
}

.uds-w-free {
	background: linear-gradient(135deg, #e8f9ef, #f2fcf6);
	border: 1px solid #bfe8cf;
}

.uds-w-taken {
	background: linear-gradient(135deg, #eef4ff, #f5f9ff);
	border: 1px solid #cdddfc;
}

.uds-w-icon {
	font-size: 26px;
	line-height: 1;
	flex: none;
}

.uds-w-main {
	min-width: 0;
}

.uds-w-title {
	font-size: 16.5px;
	font-weight: 800;
}

.uds-w-free .uds-w-title {
	color: #0f8a43;
}

.uds-w-taken .uds-w-title {
	color: #1e4fd6;
}

.uds-w-sub {
	font-size: 13px;
	color: var(--uds-muted);
	margin-top: 3px;
	word-break: break-all;
}

/* ---------- 徽章与状态 ---------- */

.uds-badge,
.uds-chip {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.7;
	vertical-align: middle;
}

.uds-badge-xinnet {
	background: #eef4ff;
	color: #1e4fd6;
	border: 1px solid #cdddfc;
}

.uds-badge-reg {
	background: #fff7e8;
	color: #b26205;
	border: 1px solid #f5d9b8;
}

.uds-chip-muted {
	background: #f0f2f5;
	color: #75808f;
}

.uds-chip-safe {
	background: #e6f7ec;
	color: #0f8a43;
}

.uds-chip-warn {
	background: #fff6e5;
	color: #b26205;
}

.uds-chip-danger {
	background: #fdeaea;
	color: #c62828;
}

.uds-chip-expired {
	background: #c62828;
	color: #fff;
}

.uds-chip-live {
	background: #eef4ff;
	color: #1e4fd6;
	margin-left: 6px;
}

/* ---------- 备注 / 空状态 / 骨架 ---------- */

.uds-note {
	margin-top: 12px;
	font-size: 13px;
	color: var(--uds-muted);
}

.uds-note b {
	color: var(--uds-ink);
}

.uds-note-live {
	color: #1e4fd6;
	background: #eef4ff;
	border: 1px solid #cdddfc;
	border-radius: 10px;
	padding: 8px 14px;
	margin: 0 0 10px;
}

.uds-empty {
	text-align: center;
	padding: 46px 20px;
	color: var(--uds-muted);
}

.uds-empty-icon {
	font-size: 42px;
	margin-bottom: 10px;
}

.uds-empty-title {
	font-size: 16px;
	font-weight: 800;
	color: var(--uds-ink);
	margin-bottom: 6px;
}

.uds-empty-text {
	font-size: 13.5px;
}

.uds-skel {
	display: inline-block;
	height: 13px;
	border-radius: 7px;
	background: linear-gradient(90deg, #edf1f7 25%, #f7f9fd 40%, #edf1f7 55%);
	background-size: 240% 100%;
	animation: uds-shimmer 1.15s infinite linear;
	vertical-align: middle;
}

@keyframes uds-shimmer {
	0% { background-position: 120% 0; }
	100% { background-position: -120% 0; }
}

/* ==================== 登录提示 ==================== */

.uds-gate {
	text-align: center;
	padding: 52px 28px;
	background: #fff;
	border: 1px solid var(--uds-line);
	border-radius: 20px;
	box-shadow: 0 6px 24px -14px rgba(23, 35, 61, 0.18);
}

.uds-gate-icon {
	font-size: 42px;
	margin-bottom: 10px;
}

.uds-gate-title {
	font-size: 18px;
	font-weight: 800;
	margin-bottom: 6px;
}

.uds-gate-text {
	color: var(--uds-muted);
	margin-bottom: 16px;
}

/* ==================== 详情抽屉 ==================== */

.uds-drawer-overlay {
	position: fixed;
	inset: 0;
	z-index: 99990;
	background: rgba(15, 23, 42, 0.45);
	opacity: 0;
	transition: opacity 0.24s ease;
	backdrop-filter: blur(2px);
}

.uds-drawer-overlay.is-visible {
	opacity: 1;
}

.uds-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 99995;
	width: min(680px, 100vw);
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: -24px 0 60px -24px rgba(9, 30, 82, 0.45);
	transform: translateX(102%);
	transition: transform 0.26s cubic-bezier(0.32, 0.72, 0.28, 1);
	border-radius: 18px 0 0 18px;
}

.uds-drawer.is-open {
	transform: translateX(0);
}

.uds-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 22px;
	border-bottom: 1px solid var(--uds-line);
	background: #fbfcff;
	border-radius: 18px 0 0 0;
}

.uds-drawer-title {
	font-size: 16.5px;
	font-weight: 800;
	word-break: break-all;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.uds-drawer-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--uds-line);
	background: #fff;
	color: var(--uds-muted);
	border-radius: 10px;
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease;
	flex: none;
}

.uds-drawer-close:hover {
	color: var(--uds-brand);
	border-color: var(--uds-brand);
}

.uds-drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 18px 22px 30px;
	background: #f7f9fc;
}

.uds-group {
	background: #fff;
	border: 1px solid var(--uds-line);
	border-radius: 14px;
	padding: 14px 16px;
	margin-bottom: 14px;
}

.uds-group-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 800;
	margin-bottom: 12px;
	font-size: 14.5px;
}

.uds-group-icon {
	font-size: 15px;
	line-height: 1;
}

.uds-kv {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 22px;
}

.uds-kv-item {
	border-bottom: 1px dashed #e8ecf3;
	padding-bottom: 8px;
	min-width: 0;
}

.uds-kv-label {
	font-size: 11.5px;
	color: var(--uds-muted);
	letter-spacing: 0.02em;
}

.uds-kv-value {
	font-size: 13.5px;
	font-weight: 650;
	word-break: break-all;
}

.uds-raw {
	margin-top: 4px;
}

.uds-raw summary {
	cursor: pointer;
	color: var(--uds-muted);
	font-size: 13px;
}

.uds-raw pre {
	margin-top: 8px;
	max-height: 300px;
	overflow: auto;
	background: #1b2437;
	color: #d5e2ff;
	border-radius: 10px;
	padding: 14px;
	font-size: 12px;
	line-height: 1.55;
	white-space: pre-wrap;
	word-break: break-all;
}

/* ==================== 响应式 ==================== */

@media (max-width: 720px) {
	body.uds-standalone {
		padding: 0 14px 30px;
	}

	.uds-topbar {
		padding: 12px 2px 14px;
	}

	.uds-hero {
		padding: 32px 18px 72px;
		border-radius: 18px;
	}

	.uds-hero-title {
		font-size: 24px;
	}

	.uds-hero-sub {
		font-size: 13.5px;
	}

	.uds-search-box {
		flex-direction: column;
		align-items: stretch;
		padding: 12px;
		gap: 10px;
	}

	.uds-search-icon {
		display: none;
	}

	.uds-search-input {
		height: 46px;
		text-align: center;
	}

	.uds-btn-primary {
		width: 100%;
	}

	.uds-seg {
		padding: 6px 15px;
	}

	.uds-results-card {
		margin-top: -40px;
		padding: 16px 14px 12px;
	}

	.uds-sources-grid {
		grid-template-columns: 1fr;
	}

	.uds-kv {
		grid-template-columns: 1fr;
	}

	.uds-drawer {
		border-radius: 0;
	}

	.uds-drawer-head {
		border-radius: 0;
	}
}
