/* ─── Reset & Base ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
	background: #f8f6f0;
	color: #1A535C;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	overflow: hidden;
	-webkit-font-smoothing: antialiased;
}

/* ─── Wave Background ─── */
#waveCanvas {
	position: fixed; top: 0; left: 0;
	width: 100%; height: 100%;
	z-index: 0; pointer-events: none;
}

/* ─── Orbs ─── */
.orb {
	position: fixed; border-radius: 50%;
	filter: blur(120px); pointer-events: none;
	z-index: 0; animation: orbFloat 25s ease-in-out infinite;
}
.orb-1   { width: 600px; height: 600px; background: rgba(126,200,227,0.18); top: -20%; left: -15%; }
.orb-sand { width: 500px; height: 500px; background: rgba(245,230,202,0.25); bottom: -20%; right: -10%; animation-delay: -8s; }
.orb-sun  { width: 350px; height: 350px; background: rgba(255,217,61,0.10); top: 40%; left: 60%; animation-delay: -16s; }

@keyframes orbFloat {
	0%, 100% { transform: translate(0,0) scale(1); }
	25%  { transform: translate(50px,-30px) scale(1.05); }
	50%  { transform: translate(-20px,40px) scale(0.95); }
	75%  { transform: translate(30px,20px) scale(1.02); }
}

/* ─── Main Wrapper ─── */
.main-wrapper {
	position: relative; z-index: 1;
	display: flex; flex-direction: column; align-items: center;
	gap: 1rem; padding: 1rem;
	width: 100%; max-width: 560px;
}

/* ─── Top Nav ─── */
.top-nav {
	width: 100%;
	display: flex; align-items: center; justify-content: space-between;
	padding: 0.6rem 1.2rem;
	background: rgba(255,255,255,0.5);
	backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(126,200,227,0.12);
	border-radius: 16px;
	animation: fadeDown 0.7s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes fadeDown {
	from { opacity: 0; transform: translateY(-16px); }
	to   { opacity: 1; transform: translateY(0); }
}

.nav-brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-text {
	font-size: 0.95rem; font-weight: 600;
	color: #1A535C; letter-spacing: -0.02em;
}

.nav-status { display: flex; align-items: center; gap: 0.4rem; }
.status-dot {
	width: 7px; height: 7px; border-radius: 50%;
	background: #34d399;
	box-shadow: 0 0 8px rgba(52,211,153,0.5);
	animation: dotPulse 2.5s ease-in-out infinite;
}
.status-text { font-size: 0.78rem; color: rgba(26,83,92,0.45); font-weight: 500; }

/* ─── Glass Card ─── */
.glass-card {
	width: 100%;
	background: rgba(255,253,247,0.72);
	backdrop-filter: blur(28px) saturate(1.3); -webkit-backdrop-filter: blur(28px) saturate(1.3);
	border: 1px solid rgba(126,200,227,0.12);
	border-radius: 28px;
	padding: 2.2rem 2rem 1.8rem;
	box-shadow: 0 12px 48px rgba(126,200,227,0.08), 0 4px 16px rgba(0,0,0,0.02);
	animation: cardEnter 0.9s 0.1s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes cardEnter {
	from { opacity: 0; transform: translateY(28px) scale(0.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Logo / Title ─── */
.logo-area { text-align: center; margin-bottom: 1.8rem; }

.title {
	font-size: 1.85rem; font-weight: 600;
	letter-spacing: -0.03em;
	margin-bottom: 0.5rem;
	background: linear-gradient(135deg, #1A535C 0%, #7EC8E3 50%, #5BC0BE 100%);
	-webkit-background-clip: text; -webkit-text-fill-color: transparent;
	background-clip: text;
}

.subtitle {
	font-size: 0.92rem; color: rgba(26,83,92,0.4);
	font-weight: 400; letter-spacing: 0.01em;
}

/* ─── Input ─── */
.input-group {
	display: flex; align-items: center;
	background: rgba(255,255,255,0.78);
	border: 1.5px solid rgba(126,200,227,0.18);
	border-radius: 16px;
	transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
	position: relative; overflow: hidden;
}
.input-group::before {
	content: ''; position: absolute; inset: -2px;
	border-radius: 18px;
	background: linear-gradient(135deg, #7EC8E3, #5BC0BE, #FFD93D);
	opacity: 0; transition: opacity 0.45s ease; z-index: -1;
}
.input-group:focus-within {
	border-color: transparent;
	box-shadow: 0 0 0 1.5px rgba(91,192,190,0.2), 0 6px 24px rgba(126,200,227,0.1);
}
.input-group:focus-within::before { opacity: 1; }

#uv-address {
	flex: 1; padding: 0.9rem 1.2rem;
	background: transparent; border: none; outline: none;
	color: #1A535C; font-size: 1rem;
	font-family: inherit; font-weight: 400;
	letter-spacing: 0.01em;
}
#uv-address::placeholder { color: rgba(26,83,92,0.22); font-weight: 350; }

#uv-submit {
	display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; margin-right: 6px;
	background: linear-gradient(135deg, #7EC8E3, #5BC0BE);
	border: none; border-radius: 12px; color: white;
	cursor: pointer; transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
	flex-shrink: 0; position: relative; overflow: hidden;
}
#uv-submit::after {
	content: ''; position: absolute; inset: 0;
	background: linear-gradient(135deg, #5BC0BE, #7EC8E3);
	opacity: 0; transition: opacity 0.35s ease; border-radius: 12px;
}
#uv-submit:hover {
	transform: scale(1.06);
	box-shadow: 0 6px 20px rgba(91,192,190,0.35);
}
#uv-submit:hover::after { opacity: 1; }
#uv-submit:active { transform: scale(0.94); }
.arrow-icon { position: relative; z-index: 1; transition: transform 0.25s ease; }
#uv-submit:hover .arrow-icon { transform: translateX(3px); }

/* ─── 输入反馈波纹 ─── */
.input-feedback {
	position: absolute;
	border-radius: 50%;
	background: rgba(126,200,227,0.2);
	transform: scale(0);
	pointer-events: none;
	z-index: 0;
	transition: none;
}

.input-feedback.active {
	animation: inputRipple 0.5s ease-out forwards;
}

@keyframes inputRipple {
	0%   { transform: scale(0); opacity: 0.6; }
	100% { transform: scale(4); opacity: 0; }
}

/* ─── 跳转过渡叠加层 ─── */
#transition-overlay {
	position: fixed; inset: 0;
	z-index: 9999;
	pointer-events: none;
	opacity: 0;
	display: flex; align-items: center; justify-content: center;
	transition: opacity 0.15s ease;
}
#transition-overlay.active {
	opacity: 1;
	pointer-events: auto;
}

#transition-ripple {
	position: absolute;
	border-radius: 50%;
	background: linear-gradient(135deg, #7EC8E3, #5BC0BE);
	transform: translate(-50%, -50%) scale(0);
	will-change: transform;
	transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
}

#transition-overlay.active #transition-ripple {
	transform: translate(-50%, -50%) scale(var(--ripple-scale, 10));
}

.transition-content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.2rem;
	opacity: 0;
	transform: translateY(12px);
	transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}

#transition-overlay.active .transition-content {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 0.25s;
}

.transition-text {
	color: white;
	font-size: 1.15rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#transition-url {
	font-weight: 600;
	opacity: 0.9;
}

.transition-spinner {
	animation: spin 1.2s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

.spinner-arc {
	animation: arcSpin 1.2s ease-in-out infinite;
	transform-origin: center;
}

@keyframes arcSpin {
	0%, 100% { stroke-dasharray: 75; stroke-dashoffset: 0; }
	50% { stroke-dasharray: 75; stroke-dashoffset: -50; }
}

/* ─── Loading (按钮态) ─── */
.input-group.loading #uv-address { opacity: 0.5; }
.input-group.loading #uv-submit { pointer-events: none; opacity: 0.7; }
.input-group.loading #uv-submit .arrow-icon {
	animation: arrowFly 0.5s ease-in-out infinite alternate;
}
@keyframes arrowFly { from { transform: translateX(-3px); } to { transform: translateX(4px); } }

/* ─── Error ─── */
.error-msg { color: #FF6B6B; font-size: 0.85rem; text-align: center; margin-top: 0.8rem; min-height: 1.2em; animation: fadeSlideIn 0.3s ease both; }
.error-code { color: rgba(26,83,92,0.3); font-size: 0.7rem; text-align: center; white-space: pre-wrap; word-break: break-all; max-height: 60px; overflow-y: auto; margin-top: 0.2rem; }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Quick Access ─── */
.quick-access {
	margin-top: 1.5rem; padding-top: 1.2rem;
	border-top: 1px solid rgba(126,200,227,0.1);
}
.quick-label {
	font-size: 0.72rem; font-weight: 500; color: rgba(26,83,92,0.3);
	text-transform: uppercase; letter-spacing: 0.06em;
	margin-bottom: 0.7rem;
}
.quick-chips {
	display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.chip {
	display: inline-flex; align-items: center; gap: 0.4rem;
	padding: 0.45rem 0.85rem;
	background: rgba(126,200,227,0.08);
	border: 0.5px solid rgba(126,200,227,0.15);
	border-radius: 100px;
	font-size: 0.82rem; font-weight: 500;
	color: rgba(26,83,92,0.55);
	text-decoration: none;
	transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
	cursor: pointer;
}
.chip:hover {
	background: rgba(91,192,190,0.15);
	border-color: rgba(91,192,190,0.3);
	color: #1A535C;
	transform: translateY(-1px);
	box-shadow: 0 3px 10px rgba(126,200,227,0.12);
}
.chip:active { transform: scale(0.96); }
.chip svg { opacity: 0.4; transition: opacity 0.2s; }
.chip:hover svg { opacity: 0.7; }

/* ─── Bottom Bar ─── */
.bottom-bar {
	width: 100%;
	display: flex; align-items: center; justify-content: space-between;
	padding: 0.7rem 1.2rem;
	background: rgba(255,255,255,0.35);
	backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(126,200,227,0.08);
	border-radius: 14px;
	animation: fadeUp 0.9s 0.2s cubic-bezier(0.16,1,0.3,1) both;
	flex-wrap: wrap; gap: 0.5rem;
}
@keyframes fadeUp {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

.bar-section { display: flex; gap: 1rem; }
.bar-label {
	font-size: 0.72rem; font-weight: 500;
	color: rgba(26,83,92,0.3); letter-spacing: 0.02em;
	white-space: nowrap;
}
.bar-tip {
	font-size: 0.72rem; color: rgba(26,83,92,0.3);
	display: flex; align-items: center; gap: 0.3rem;
}
.bar-tip kbd {
	padding: 0.1rem 0.3rem; border-radius: 4px;
	background: rgba(255,255,255,0.5);
	border: 0.5px solid rgba(126,200,227,0.12);
	font-family: inherit; font-size: 0.7rem;
	color: rgba(26,83,92,0.35);
}

/* ─── Dot Pulse ─── */
@keyframes dotPulse {
	0%, 100% { opacity: 0.5; transform: scale(1); }
	50% { opacity: 1; transform: scale(1.4); }
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
	.glass-card { padding: 1.8rem 1.25rem 1.4rem; border-radius: 22px; }
	.title { font-size: 1.5rem; }
	#uv-address { padding: 0.8rem 1rem; font-size: 0.95rem; }
	.bottom-bar { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
	.bar-section { flex-wrap: wrap; gap: 0.6rem; }
	.quick-chips { gap: 0.4rem; }
	.chip { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
}
