html,body{
	border:none; padding:0; margin:0;
	background: #181512;
	color:#202020;
	width: 100dvw;
	height: 100%;
	/* overflow: hidden; */
}
body{
	text-align:center;
	font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
}
html, html, div,span, p, ul,li,ol,dl,dt,dd,canvas,img, svg {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.items-end {
  align-items: flex-end;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-7 {
  gap: 1.75rem;
}

.rotate-180 {
  transform: rotate(180deg);
}
.text-center {
  text-align: center;
}
.w-full {
  width: 100%;
}
.flex-1 {
  flex: 1;
}
.not-italic {
	font-style: normal;
}
.bg-26273b {
	background: #26273b;
}
.color-9193a8 {
	color: #9193a8;
}
.radius-12 {
	border-radius: 12px;
}
.opacity-0 {
	opacity: 0;
}
.p-10 {
	padding: 10px;
}
.container {
  height: 100%;
  max-width: 450px;
  overflow: visible;
  border-radius: 24px 24px 0 0;
  margin: 0 auto;
  padding: 0 auto 40px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	box-sizing: border-box;
  position: relative;
}
.view1 {
  position: relative;
  min-height: 100vh;
	overflow: hidden;
  box-sizing: border-box;
  padding-bottom: 80px;
}
.view1 h1 {
  padding: 20px 0;
}
/* Form Container */
.form-container {
  max-width: 380px;
  margin: 0 auto;
  padding: 0 20px 20px 20px;
}
.info-tips {
  display: flex;
  align-items: center;
  gap: 8px;
	box-shadow: 0 0 5px 0 #fcd501;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.5;
  color: #fcd501;
	margin-bottom: 50px;
}
.info-tips svg {
  flex-shrink: 0;
}
.info-tips span {
  flex: 1;
  text-align: left;
}
.form-group {
  margin-bottom: 20px;
  text-align: left;
}
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  /* background: #fff; */
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  color: #fff;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
	background: transparent;
}
.form-input:focus {
  border-color: #3b82f6;
}
.form-input::placeholder {
  color: #999;
}
/* Star Rating */
.star-rating {
  display: flex;
  gap: 8px;
  font-size: 32px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.star {
  position: relative;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s;
  cursor: pointer;
  display: inline-block;
}
.star.filled {
  color: #fcd501;
	-webkit-text-stroke: 1px #fcd501;
	text-stroke: 1px #fcd501;
	-webkit-text-fill-color: #fcd501;
	text-fill-color: #fcd501;
}
.star.half-filled {
  color: transparent;
}
.star.half-filled::before {
  content: '★';
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: #fcd501;
}
.star:active {
  transform: scale(0.95);
}
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  color: #fff;
  box-sizing: border-box;
  outline: none;
  resize: vertical;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  transition: border-color 0.2s;
	resize: none;
}
.form-textarea:focus {
  border-color: #3b82f6;
}
.form-button {
  width: 100%;
  padding: 12px 16px;
  background: #3b82f6;
  background: #3b82f6;
  border-radius: 6px;
  font-size: 14px;
  color: #fff;
	border: none;
	outline: none;
}
/* #startStopBtn {
  position: static;
  transform: none;
  margin: 30px auto 20px;
} */
.data-tips {
	width: 80%;
	color: #fff;
	box-shadow: 0 0 5px 0 rgba(255, 255, 255, 0.8);
	padding: 10px 20px;
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.8);
	margin-top: 100px;
	position: absolute;
	left: 50%;
	font-size: 14px;
	line-height: 1.5;
	transform: translateX(-50%);
	bottom: 100px;
}
.cursor-pointer {
	cursor: pointer;
}
/* View2 测速结果页面样式 */
.view2 {
  height: 100dvh;
  box-sizing: border-box;
  overflow-y: hidden;
}

.view2-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
	position: sticky;
	top: 0;
	background: #181512;
	z-index: 10;
}
.view2-content {
  height: calc(100dvh - 60px);
	overflow-y: auto;
	padding: 0 20px 20px;
}
.back-button {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #cdcdcd;
  font-size: 16px;
  cursor: pointer;
  padding: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.back-button:hover {
  opacity: 0.7;
}
.menu-button {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.menu-button:hover {
  opacity: 0.7;
}
.view2 h1 {
  margin: 0;
}
.speed-summary {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  gap: 20px;
}
.speed-item {
  flex: 1;
  text-align: center;
}
.speed-icon {
  font-size: 18px;
  color: #9193a8;
	;
}
.speed-icon span {
  font-size: 14px;
  color: #fff;
}
.speed-label {
  font-size: 14px;
  color: #9193a8;
}
.speed-value {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin: 5px 0;
}
.speed-icon .speed-unit {
  font-size: 14px;
  color: #9193a8;
}
.ping-info {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}
.ping-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #9193a8;
}
.ping-icon {
  font-size: 16px;
}
.ping-label {
  font-size: 12px;
  color: #9193a8;
  margin-right: 3px;
}
.ping-value {
  font-size: 14px;
  color: #fff;
	font-style: normal;
}
.gauge-container {
  position: relative;
  width: 100%;
	max-width: 300px;
  height: 280px;
  margin: 30px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gauge-svg {
  width: 100%;
  height: 100%;
}
.gauge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.gauge-speed {
  font-size: 48px;
  font-weight: 300;
  color: #fff;
  line-height: 1;
  margin-bottom: 5px;
}
.gauge-unit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 16px;
  color: #9193a8;
}
.gauge-icon {
  font-size: 20px;
  color: #00bcd4;
}
.operator-info {
  text-align: center;
  margin: 30px 0;
  padding: 0 20px;
}
.operator-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
  font-size: 14px;
}
.operator-badge, .device-badge, .server-badge {
  padding: 4px 10px;
  background: #2a3548;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
  font-weight: 600;
}
.operator-name, .device-name, .server-name {
  color: #fff;
  font-weight: 500;
}
.server-location {
  color: #9193a8;
}
.test-progress {
  margin: 20px;
}
.progress-bar {
  width: 100%;
  height: 4px;
  background: #2a3548;
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00bcd4, #10b981);
  transition: width 0.3s ease;
  border-radius: 2px;
}
.feedback-section {
  text-align: center;
  padding: 20px;
  margin: 20px 0;
}
.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #2a3548;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 15px;
}
.feedback-icon {
  font-size: 20px;
}
.feedback-question {
  color: #9193a8;
  font-size: 14px;
  margin: 15px 0;
}
.rating-stars {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.star {
  font-size: 40px;
  cursor: pointer;
  color: transparent;
	-webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
	text-stroke: 1px rgba(255, 255, 255, 0.3);
	/* -webkit-text-fill-color: transparent;
	text-fill-color: transparent; */
}
/* .star:hover {
  opacity: 1;
} */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 450px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  background: #1a1f2e;
  padding: 12px 0 max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid #2a3548;
  z-index: 999;
}
.bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #9193a8;
  transition: color 0.2s;
}
.bottom-nav .nav-item.active {
  color: #3b82f6;
}
.bottom-nav .nav-icon {
  font-size: 24px;
}
.bottom-nav .nav-label {
  font-size: 12px;
}
.view-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px 24px 24px 24px;
  background: #26273c;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border: 1px solid #373a4f;
  will-change: transform;
  /* 默认收起状态，避免闪现 */
  transform: translateY(calc(100% - 68px));
	z-index: 10;
  /* JS 会控制 transition */
}

.drag-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.drag-indicator {
  width: 40px;
  height: 5px;
  background: #6b7280;
  border-radius: 3px;
  transition: all 0.2s;
  margin-top: 6px;
  pointer-events: none;
}
.drag-handle:active .drag-indicator {
  background: #9ca3af;
  width: 50px;
}
.expanded .test-service-container {
	display: block !important;
	opacity: 1;
}
.collapsed .test-service-container {
	display: none !important;
	opacity: 0;
}
/* 移动端优化 */
@media (max-width: 768px) {
  .view-footer {
    padding: 8px 20px 20px 20px;
  }
  .drag-indicator {
    background: #6b7280;
  }
  .drag-handle:active .drag-indicator {
    background: #9ca3af;
  }
  /* 移动端强制显示详细信息（通过 transform 控制可见性） */
}
/* PC端保持点击效果 */
@media (min-width: 769px) {
  .drag-handle {
    display: none;
  }
  .view-footer {
    padding-top: 24px;
    /* PC端默认展开 */
    transform: translateY(0) !important;
  }
  /* PC端默认隐藏详细信息 */
  .test-service-container {
    display: none;
  }

	.plan-info-title::before {
		content: '';
		display: block;
		position: absolute;
		top: -6px;
		left: 50%;
		transform: translateX(-50%);
		width: 40px;
		height: 6px;
		border-radius: 3px;
		background: rgba(255, 255, 255, 0.3);
	}
	.data-tips {
		bottom: 180px;
	}
	.gauge-container {
		max-width: 350px;
	}
  /* .test-service-container:not(.hidden) {
    display: block;
  }  */
}
.view2-footer {
	position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
	padding: 0 20px;
}
.view-footer-inner {
	background: #26273c;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border: 1px solid #373a4f;
	padding: 20px;
}
.px-20 {
	padding: 0 20px;
}
.plan-info-title {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 12px;
  text-align: left;
  position: relative;
  padding-top: 20px;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 768px) {
  .plan-info-title {
    padding-top: 16px;
    margin-bottom: 8px;
  }
}
.plan-info-title:hover {
  color: #a0a0ff;
}
.test-service-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border: 1px solid #cdcdcd;
	border-radius: 50%;
}

.test-service {
	display: flex;
	justify-content: flex-start;
	gap: 10px;
	border-bottom: 1px solid #373a4f;
	padding-bottom: 12px;
	margin-bottom: 12px;
	margin-top: 12px;
}
.test-service p {
	font-size: 14px;
	color: #fff;
	text-align: left;
}
.color-3b82f6,
.test-service .color-3b82f6 {
	color: #3b82f6;
}
.mt-4 {
	margin-top: 4px;
}

.plan-info {
  max-height: 500px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, margin 0.3s ease-in-out;
}
.plan-info.hidden {
  max-height: 0 !important;
  opacity: 0;
  margin-top: 0 !important;
}
.plan-info li{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  gap: 10px;
}
.infoLabel{
	color:#fff;
	font-weight:500;
	font-size:14px;
}
.infoValue{
	color:#fff;
	font-weight:500;
	font-size:14px;
}
.loading{
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	min-height:100vh;
	gap:1.5em;
}
.loading.hidden{
	display:none !important;
}
.loading::before{
	content:"";
	display:block;
	width:80px;
	height:80px;
	border:5px solid rgba(255, 255, 255, 0.3);
	border-top-color:#ffffff;
	border-radius:50%;
	animation:spinLoader 0.8s linear infinite;
}
.loading::after{
	content:"Loading...";
	font-size:1.3em;
	color:#ffffff;
	font-weight:600;
	letter-spacing:1px;
}
@keyframes spinLoader{
	0%{transform:rotate(0deg);}
	100%{transform:rotate(360deg);}
}
.error{
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	min-height:100dvh;
	color:#ffffff;
	font-size:1.6em;
	font-weight:600;
}
.error.hidden{
	display:none !important;
}
.error::before{
	content:"⚠";
	font-size:4em;
	margin-bottom:0.5em;
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}
h1{
	color:#ffffff;
	margin:0 0 20px 0;
	font-weight:400;
	font-size: 16px;
	letter-spacing:-0.5px;
}
#loading{
	background-color:#FFFFFF;
	color:#404040;
	text-align:center;
}
span.loadCircle{
	display:inline-block;
	width:2em;
	height:2em;
	vertical-align:middle;
	background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAP1BMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZyFzwnAAAAFHRSTlMAEvRFvX406baecwbf0casimhSHyiwmqgAAADpSURBVHja7dbJbQMxAENRahnN5lkc//5rDRAkDeRgHszXgACJoKiIiIiIiIiIiIiIiIiIiIj4HHspsrpAVhdVVguzrA4OWc10WcEqpwKbnBo0OU1Q5NSpsoJFTgOecrrdEag85DRgktNqfoEdTjnd7hrEHMEJvmRUYJbTYk5Agy6nau6Abp5Cm7mDBtRdPi9gyKdU7w4p1fsLvyqs8hl4z9/w3n/Hmr9WoQ65lAU4d7lMYOz//QboRR5jBZibLMZdAR6O/Vfa1PlxNr3XdS3HzK/HVPRu/KnLs8iAOh993VpRRERERMT/fAN60wwWaVyWwAAAAABJRU5ErkJggg==');
	background-size:2em 2em;
	margin-right:0.5em;
	animation: spin 0.6s linear infinite;
}
@keyframes spin{
	0%{transform:rotate(0deg);}
	100%{transform:rotate(359deg);}
}
/* #startStopBtn{
	display:flex;
	align-items:center;
	justify-content:center;
	margin:40px auto;
	color:#fff;
	background: transparent;
	border:1px solid #3371d6;
	border-radius:50%;
	transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-sizing:border-box;
	width:200px;
	height:200px;
	cursor:pointer;
	font-weight:700;
	font-size:3em;
	letter-spacing:2px;
	z-index: 10;
}
#startStopBtn::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 1px solid #3b82f6;
	opacity: 0;
	z-index: -1;
	animation: wave 6.5s ease-out infinite;
} */
/* @keyframes wave {
	0% {
		width: 100%;
		height: 100%;
		opacity: 0.8;
	}
	54% {
		width: 140%;
		height: 140%;
		opacity: 0;
	}
	54.1%, 100% {
		width: 100%;
		height: 100%;
		opacity: 0;
	}
} */
/* #startStopBtn:hover{
	color: #059669;
	border-color: #059669;
	transform: scale(1.05);
}
#startStopBtn:hover::before {
	border-color: #059669;
} */
/* #startStopBtn.running{
	color: #f5576c;
	border-color: #f5576c;
	font-size:1.8em;
	animation: pulse 1.5s ease-in-out infinite;
}
#startStopBtn.running::before {
	border-color: #f5576c;
	animation: none;
} */
@keyframes pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
}
#serverArea{
	margin:1.5em auto 0;
	text-align:left;
	max-width:25em;
}
#serverArea label{
	display:inline-block;
	margin-right:0.5em;
	margin-bottom:0.5em;
	font-weight:600;
	color:#4a5568;
}
#server{
	font-size:1em;
	padding:0.7em 1em;
	border:2px solid #e2e8f0;
	border-radius:12px;
	background:#FFFFFF;
	width: 100%;
	min-width:16em;
	transition: all 0.3s;
	font-weight:500;
	color:#2d3748;
}
#server:focus{
	outline:none;
	border-color:#10b981;
	box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
#warningBox{
	background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
	border:2px solid #fed7d7;
	border-radius:16px;
	padding:1.2em 1.8em;
	margin:2em auto;
	max-width:30em;
	text-align:left;
	display:flex;
	align-items:center;
	gap:1em;
	box-shadow: 0 4px 12px rgba(254, 87, 108, 0.1);
}
.hidden:not(.plan-info) {
  display: none !important;
}
/* #warningBox.hidden{
	display:none !important;
} */
.warningIcon{
	font-size:2em;
	flex-shrink:0;
	color: #f5576c;
	filter: drop-shadow(0 2px 4px rgba(245, 87, 108, 0.2));
}
.warningText{
	color:#c53030;
	line-height:1.6;
	font-weight:500;
}
#test{
	margin-top:2em;
  position: relative;
  margin-bottom: 100px;
}
.text-inner {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
div.testArea{
  flex: 1;
  width: 100%;
  height: 100%;
	position:relative;
	padding: 0 10px;
}
.view2 div.testArea {
  width: 100%;
  max-width: 350px;
  height: 280px;
}
div.testArea2{
	flex: 1;
	position:relative;
	text-align:center;
}
div.testArea div.testName{
	position:absolute;
	top: -8px; 
	left:0;
	width:100%;
	font-size:1.4em;
	z-index:9;
	font-weight:600;
	color:#4a5568;
}
div.testArea2 div.testName{
	display:block;
	text-align:center;
	font-size: 18px;
	font-weight:600;
	color:#4a5568;
}
div.testArea div.meterText{
	position:absolute;
	bottom: 66px; 
	left:0;
	width:100%;
	font-size: 26px;
	z-index:9;
	font-weight:700;
	color:#2d3748;
}
.view2 div.testArea div.meterText {
  bottom: 50px;
  font-size: 48px;
  color: #fff;
  font-weight: 300;
}
div.testArea2 div.meterText{
	display:inline-block;
	font-size: 26px;
	font-weight:700;
	color:#2d3748;
}
div.meterText:empty:before{
	content:"0.00";
}
div.testArea div.unit{
	position:absolute;
	bottom: 32px;
  left:0;
	width:100%;
	z-index:9;
}
.view2 div.testArea div.unit {
  bottom: 25px;
  font-size: 16px;
  color: #9193a8;
}
.meter-label {
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #9193a8;
  z-index: 10;
  letter-spacing: 1px;
}
.retest-go-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
  color: #10b981;
  background: transparent;
  border: 2px solid #10b981;
  border-radius: 50%;
  font-weight: 700;
  font-size: 3em;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
}
.retest-go-btn:hover {
  color: #059669;
  border-color: #059669;
  transform: translate(-50%, -50%) scale(1.05);
}
.retest-go-btn.hidden {
  display: none !important;
}
div.testArea2 div.unit{
	display:inline-block;
}
div.testArea canvas{
	position:absolute;
	top:0; left:0; width:100%; height:100%;
	z-index:1;
}
div.testGroup{
	display:flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
  margin: 20px auto 0;
}
div.testGroup:first-child {
  margin-top: 0;
}
.share-area{
	margin-top:10px;
	width:100%;
}
.share-area p {
	color: #1cbfff;
	font-size: 14px;
	cursor: pointer;
}

/* View3 详细结果页面样式 */
.view3 {
	/* max-height: 100dvh; */
	padding: 0 20px 40px;
	/* box-sizing: border-box; */
	/* overflow-y: auto; */
}
.view3-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 0;
	position: sticky;
	top: 0;
	background: #26273b;
	z-index: 10;
}
.view3-header h1 {
	margin: 0;
}
.results-container {
	max-width: 600px;
	margin: 0 auto;
}
.result-section {
	margin: 30px 0;
	border-bottom: 1px solid #2a3548;
}
.result-section:last-of-type {
	border-bottom: none;
}
.section-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	margin-bottom: 20px;
	letter-spacing: 1px;
}
.info-icon {
	opacity: 0.5;
}
.section-icon {
	opacity: 0.7;
}

/* Speed Detail */
.speed-detail-item {
	margin: 30px 0;
}
.speed-detail-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 15px;
}
.speed-label {
	font-size: 14px;
	color: #9ca3af;
	font-weight: 500;
}
.speed-unit-label {
	font-size: 14px;
	color: #6b7280;
}
.speed-detail-value {
	font-size: 48px;
	font-weight: 300;
	color: #fff;
}
.speed-chart {
	width: 100%;
	height: 80px;
	min-height: 80px;
	position: relative;
	margin: 20px 0;
	background: rgba(26, 32, 44, 0.5);
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid rgba(74, 85, 104, 0.3);
}
.speed-chart-canvas {
	width: 100%;
	height: 80px;
	min-height: 80px;
	display: block;
}
.data-used {
	font-size: 14px;
	color: #6b7280;
	text-align: right;
	transform: translateY(-4px);
}
.data-used span {
	color: #9ca3af;
	font-weight: 500;
}

/* Responsiveness */
.ping-title {
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	margin: 20px 0;
	letter-spacing: 1px;
}
.ping-unit {
	font-size: 12px;
	color: #6b7280;
}
.ping-details {
	display: flex;
	gap: 30px;
	margin-top: 20px;
}
.ping-detail-item {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
}
.ping-icon {
	flex-shrink: 0;
}
.ping-detail-content {
	flex: 1;
}
.ping-detail-label {
	font-size: 14px;
	color: #9ca3af;
	font-weight: 500;
}
.ping-detail-main {
	font-size: 28px;
	font-weight: 300;
	color: #fff;
	margin: 5px 0;
}
.ping-detail-stats {
	gap: 20px;
	font-size: 13px;
	color: #6b7280;
}
.ping-detail-stats b {
	color: #9ca3af;
	font-weight: 600;
}
.ping-jitter {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #6b7280;
	margin-top: 8px;
}
.jitter-icon {
	flex-shrink: 0;
}
.ping-jitter b {
	color: #9ca3af;
	font-weight: 600;
}

/* Packet Loss */
.packet-unit {
	font-size: 14px;
	color: #6b7280;
	margin-left: 4px;
}
.packet-loss-value {
	font-size: 56px;
	font-weight: 300;
	color: #fff;
	text-align: center;
	margin: 30px 0;
}

/* Connections */
.connection-info {
	display: flex;
	align-items: center;
	gap: 15px;
	margin: 20px 0;
}
.connection-badge {
	background: #2a3548;
	color: #fff;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 1px;
}
.connection-detail {
	flex: 1;
}
.connection-label {
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 4px;
}
.connection-provider {
	font-size: 16px;
	color: #fff;
	font-weight: 500;
}

/* Actions */
.detail-actions {
	margin: 40px 0 20px;
	display: flex;
	gap: 15px;
}
.action-btn {
	flex: 1;
	padding: 14px 24px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
	border: none;
}
.action-btn.primary {
	background: #10b981;
	color: #fff;
}
.action-btn.primary:hover {
	background: #059669;
}

/* View3 响应式 */
@media all and (max-width:40em){
	.view3 {
		padding: 0 15px 40px;
	}
	.speed-detail-value {
		font-size: 36px;
	}
	.ping-detail-main {
		font-size: 32px;
	}
	.packet-loss-value {
		font-size: 42px;
	}
	.connection-badge {
		font-size: 16px;
		padding: 6px 12px;
	}
	.ping-details {
		gap: 20px;
	}
}

#initialView{
	display:block;
}
#initialView.hidden{
	display:none;
}
#retestBtn{
	display:inline-block;
	margin:20px auto 20px;
	padding:0.9em 3.2em;
	color:#ffffff;
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	border:none;
	border-radius:50px;
	transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-sizing:border-box;
	cursor:pointer;
	box-shadow:0 6px 20px rgba(16, 185, 129, 0.3);
	font-weight:600;
	font-size: 1.1em;
	text-align: center;
	position: absolute;
	left: 50%;
	bottom: -100px;
	transform: translateX(-50%);
	letter-spacing: 0.5px;
}
#retestBtn:hover{
	background: linear-gradient(135deg, #059669 0%, #047857 100%);
	box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
	transform: translate(-50%, -3px);
}
#retestBtn[style*="pointer-events: none"]{
	cursor: not-allowed;
	background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
	box-shadow:0 4px 12px rgba(0, 0, 0, 0.1);
}
.ip-area {
	color: #9193a8;
	font-size: 14px;
	text-align: center;
	padding-bottom: 10px;
}
.ip-area span {
	color: #fff;
}
/* #ipArea{
	margin:1.5em auto;
	padding:1em 1.5em;
	background: linear-gradient(135deg, #e6f7ff 0%, #d6f0ff 100%);
	border-radius: 16px;
	color:#2d3748;
	border: 1px solid #bee3f8;
} */
.ipLabel{
	font-weight:600;
	color:#4a5568;
}
.privacyLink{
	display:block;
	text-align:center;
	margin:2em auto;
	color:#a0aec0;
	text-decoration:none;
	font-size:0.9em;
	transition: color 0.3s;
	font-weight:500;
}
.privacyLink:hover{
	color:#10b981;
}
#privacyPolicy{
    position:fixed;
    top:2em;
    bottom:2em;
    left:2em;
    right:2em;
    overflow-y:auto;
    width:auto;
    height:auto;
    box-shadow:0 0 3em 1em #000000;
    z-index:999999;
    text-align:left;
    background-color:#FFFFFF;
    padding:1em;
}
div.closePrivacyPolicy {
    width: 100%;
    text-align: center;
}
div.closePrivacyPolicy a {
    display:inline-block;
    padding: 1em 3em;
    color:#6060AA;
    text-decoration:underline;
    cursor:pointer;
}
@media all and (max-width:40em){
	.form-container {
		max-width: 90%;
		padding: 15px;
	}
	.info-tips {
		font-size: 12px;
		padding: 10px 14px;
	}
	.star-rating {
		font-size: 28px;
		gap: 6px;
	}
	.form-label {
		font-size: 13px;
	}
	.form-input,
	.form-textarea {
		font-size: 13px;
		padding: 10px 14px;
	}
	/* #startStopBtn{
		width:150px;
		height:150px;
		font-size:2em;
		margin: 25px auto 20px;
	} */
	#retestBtn{
		padding:0.7em 2em;
		font-size:1em;
	}
	#serverArea{
		text-align:center;
	}
	#serverArea label{
		display:block;
		margin-bottom:0.5em;
	}
	#server{
		width:90%;
	}
	#warningBox{
		margin:1em;
	}
	body{
		font-size:0.8em;
	}
	div.testArea{
		flex: 1;
		width: 130px;
		height: 138px;
		position:relative;
		padding: 0 10px;
	}
	#test{ 
		margin-bottom: 80px;
	}
	#retestBtn {
		bottom: -80px;
	}
	/* 手机端仪表盘响应式调整 */
	.gauge-container {
		max-width: 280px;
		height: 240px;
		margin: 20px auto;
		padding: 0 10px;
		box-sizing: border-box;
	}
	.view2 div.testArea {
		max-width: 100%;
		height: 240px;
	}
	.gauge-svg {
		max-width: 100%;
		max-height: 100%;
	}
	.gauge-speed {
		font-size: 36px;
	}
	.gauge-unit {
		font-size: 14px;
	}
	.view2 div.testArea div.meterText {
		font-size: 36px;
	}
	.view2 div.testArea div.unit {
		font-size: 14px;
	}
}

/* 针对更小的手机屏幕（宽度小于375px）进一步优化 */
@media all and (max-width:375px){
	.gauge-container {
		max-width: 90vw;
		height: 200px;
		margin: 15px auto;
		padding: 0 5px;
	}
	.view2 div.testArea {
		height: 200px;
	}
	.gauge-speed {
		font-size: 32px !important;
	}
	.gauge-unit {
		font-size: 12px !important;
	}
	.view2 div.testArea div.meterText {
		font-size: 32px !important;
	}
	.view2 div.testArea div.unit {
		font-size: 12px !important;
	}
	.meter-label {
		font-size: 14px;
	}
}

.visible{
	animation: fadeIn 0.4s;
	display:block !important;
}
div.hidden{
	animation: fadeOut 0.4s;
	display:none;
}
@keyframes fadeIn{
	0%{
		opacity:0;
	}
	100%{
		opacity:1;
	}
}
@keyframes fadeOut{
	0%{
		display:block;
		opacity:1;
	}
	100%{
		display:block;
		opacity:0;
	}
}
/* 服务器选择弹窗 */
.server-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
	animation: fadeIn 0.3s ease;
}
.modal-content {
	position: relative;
	width: 100%;
	max-width: 450px;
	max-height: 80vh;
	background: #26273c;
	border-radius: 20px 20px 0 0;
	box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
	animation: slideUp 0.3s ease;
	display: flex;
	flex-direction: column;
}
.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px;
	border-bottom: 1px solid #2a3548;
	flex-shrink: 0;
}
.modal-header h2 {
	font-size: 18px;
	font-weight: 600;
	color: #fff;
	margin: 0;
}
.modal-close {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: #2a3548;
	color: #9ca3af;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}
.modal-close:hover {
	background: #374151;
	color: #fff;
}
.modal-body {
	overflow-y: auto;
	flex: 1;
}
.server-search {
	position: relative;
	padding: 10px 20px;
}
.search-icon {
	position: absolute;
	left: 30px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}
.search-input {
	width: 100%;
	padding: 12px 12px 12px 40px;
	background: #2a3548;
	border: 1px solid #374151;
	border-radius: 10px;
	color: #fff;
	font-size: 14px;
	outline: none;
	transition: all 0.2s;
	box-sizing: border-box;
}
.search-input:focus {
	border-color: #3b82f6;
	background: #374151;
}
.search-input::placeholder {
	color: #6b7280;
}
.auto-select-option {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 15px;
	cursor: pointer;
	transition: all 0.2s;
	border-radius: 8px;
}
/*.auto-select-option:hover .option-title{
	/* transform: translateY(-2px); */
	/* color: #3b82f6; */
/* } */
/* .auto-select-option:hover .option-icon {
 stroke: #3b82f6;
} */
.auto-select-option.selected {
	background: #1e293b;
	/* border: 1px solid #3b82f6; */
}
/* .auto-select-option.selected .option-title {
	color: #3b82f6;
	font-weight: 600;
} */
/* .auto-select-option.selected .option-icon {
	stroke: #3b82f6;
} */

.option-icon {
	flex-shrink: 0;
}
.option-content {
	flex: 1;
}
.option-title {
	font-size: 15px;
	font-weight: 600;
	color: #68d0ff;
	margin-bottom: 4px;
}
.option-desc {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
}
.server-list {
	display: flex;
	flex-direction: column;
}
.server-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px 20px;
	cursor: pointer;
	transition: all 0.2s;
	border-radius: 8px;
	border: 1px solid transparent;
}
.server-item:hover {
	background: #1e293b;
	color: #3b82f6;
}
.server-item.selected {
	background: #1e293b;
}
.server-icon {
	transform: translateY(-2px);
}
.server-info {
	flex: 1;
}
.server-name {
	font-size: 15px;
	color: #fff;
	margin-bottom: 4px;
	text-align: left;
}
.server-item.selected .server-name {
	color: #3b82f6;
}
.server-item.selected .server-icon {
	stroke: #3b82f6 !important;
}
.server-location {
	font-size: 13px;
	color: #9ca3af;
	text-align: left;
}
.server-ping {
	text-align: right;
	margin-left: 15px;
}
.ping-value-modal {
	font-size: 16px;
	color: #68d0ff;
	margin-bottom: 2px;
}
.ping-label-modal {
	font-size: 11px;
	color: #6b7280;
	text-transform: uppercase;
}

/* 弹窗动画 */
@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes slideUp {
	from {
		transform: translateY(100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* 关闭动画 */
.server-modal.closing .modal-overlay {
	animation: fadeOut 0.3s ease;
}
.server-modal.closing .modal-content {
	animation: slideDown 0.3s ease;
}
@keyframes fadeOut {
	from { opacity: 1; }
	to { opacity: 0; }
}
@keyframes slideDown {
	from {
		transform: translateY(0);
		opacity: 1;
	}
	to {
		transform: translateY(100%);
		opacity: 0;
	}
}

/* 响应式 - 服务器选择弹窗 */
@media (max-width: 768px) {
	.modal-content {
		max-width: 100%;
		max-height: 85vh;
	}
	.server-item {
		padding: 12px 20px;
	}
	.server-name {
		font-size: 14px;
	}
	.server-location {
		font-size: 12px;
	}
	.ping-value-modal {
		font-size: 14px;
	}
}

/* 连接状态视图 */
.view-connecting {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #0f1419;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}
.connecting-container {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}
.connecting-circle {
	position: relative;
	width: 220px;
	height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.connecting-progress {
	position: absolute;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}
.connecting-track {
	fill: none;
	stroke: #1a2332;
	stroke-width: 3;
}
.connecting-fill {
	fill: none;
	stroke: #4dd0e1;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 565;
	stroke-dashoffset: 565;
	animation: connectingProgress 2s ease-in-out infinite;
}
.connecting-text {
	position: relative;
	font-size: 24px;
	color: #fff;
	font-weight: 300;
	letter-spacing: 1px;
}
.test-progress-text{
	color: #9193a8;
	padding-bottom: 20px;
}

@keyframes connectingProgress {
	0% {
		stroke-dashoffset: 565;
	}
	50% {
		stroke-dashoffset: 141;
	}
	100% {
		stroke-dashoffset: 565;
	}
}

/* 错误对话框 */
.error-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	animation: fadeIn 0.3s ease;
}
.error-dialog {
	background: #2a3140;
	border-radius: 16px;
	padding: 30px;
	width: 90%;
	max-width: 400px;
	text-align: center;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	animation: errorSlideIn 0.3s ease;
}
.error-title {
	font-size: 20px;
	font-weight: 600;
	color: #fff;
	margin-bottom: 20px;
	letter-spacing: 2px;
}
.error-message {
	font-size: 15px;
	color: #9ca3af;
	line-height: 1.6;
	margin-bottom: 25px;
}
.error-btn {
	width: 100%;
	padding: 14px;
	background: transparent;
	border: none;
	border-top: 1px solid #3a4150;
	color: #3b82f6;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	margin: 0 -30px -30px;
	border-radius: 16px;
}
.error-btn:hover {
	background: #3a4150;
	color: #60a5fa;
}
.error-btn:active {
	background: #4a5160;
}

@keyframes errorSlideIn {
	from {
		transform: scale(0.9);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

@media (max-width: 768px) {
	.connecting-circle {
		width: 200px;
		height: 200px;
	}
	.connecting-text {
		font-size: 20px;
	}
	.error-dialog {
		padding: 25px;
		max-width: 340px;
	}
	.error-title {
		font-size: 18px;
	}
	.error-message {
		font-size: 14px;
	}
}

/* .full-screen, html, body,.view1, .loading {
  height: calc(var(--vh, 1vh) * 100);
} */

@supports (height: 100dvh) {
  .html, body, .container {
    height: 100dvh;
  }
	.view1, .loading {
		min-height: 100dvh;
	}
}

/* 站外站点加载时间 — #speed-test（与 test.html 一致） */
#speed-test {
	margin-top: 12px;
}
.site-latency-inner {
	text-align: left;
}
.site-latency-heading {
	font-size: 13px;
	font-weight: 600;
	color: #9ca3af;
	margin-bottom: 12px;
	letter-spacing: 0.02em;
}
.site-latency-row {
	padding: 10px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	font-size: 15px;
}
.site-latency-row:last-child {
	border-bottom: none;
}
.site-latency-row-left {
	width: 100%;
	min-width: 0;
}
.site-latency-head {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
.site-latency-meter-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 8px;
	padding-left: 30px;
	width: 100%;
	box-sizing: border-box;
}
.site-latency-dots {
	display: flex;
	align-items: center;
	gap: 5px;
	flex-shrink: 0;
}
.site-latency-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.site-latency-dot--idle {
	background: rgba(255, 255, 255, 0.14);
}
.site-latency-dot--dark {
	background: #15803d;
	box-shadow: none;
}
/* 失败态：与 Error Connect 文案同系灰色，并取消 loading 动画残留 */
.site-latency-dot.site-latency-dot--failed {
	background: #6b7280;
	box-shadow: none;
	animation: none !important;
	transform: none !important;
}
.site-latency-dot--light {
	background: #4ade80;
	box-shadow: 0 0 4px rgba(74, 222, 128, 0.35);
}
/* 测量中：圆点依次高亮 */
.site-latency-dots--loading .site-latency-dot {
	animation: site-latency-dot-chase 0.9s ease-in-out infinite;
}
.site-latency-dots--loading .site-latency-dot:nth-child(1) {
	animation-delay: 0s;
}
.site-latency-dots--loading .site-latency-dot:nth-child(2) {
	animation-delay: 0.1s;
}
.site-latency-dots--loading .site-latency-dot:nth-child(3) {
	animation-delay: 0.2s;
}
.site-latency-dots--loading .site-latency-dot:nth-child(4) {
	animation-delay: 0.3s;
}
.site-latency-dots--loading .site-latency-dot:nth-child(5) {
	animation-delay: 0.4s;
}
.site-latency-dots--loading .site-latency-dot:nth-child(6) {
	animation-delay: 0.5s;
}
.site-latency-dots--loading .site-latency-dot:nth-child(7) {
	animation-delay: 0.6s;
}
.site-latency-dots--loading .site-latency-dot:nth-child(8) {
	animation-delay: 0.7s;
}
@keyframes site-latency-dot-chase {
	0%,
	100% {
		background: rgba(255, 255, 255, 0.14);
		box-shadow: none;
		transform: scale(1);
	}
	35% {
		background: #22c55e;
		box-shadow: 0 0 6px rgba(34, 197, 94, 0.45);
		transform: scale(1.15);
	}
}
.site-latency-icon {
	flex-shrink: 0;
	border-radius: 4px;
	object-fit: contain;
}
.site-latency-name {
	color: #e5e7eb;
	font-weight: 500;
}
.site-latency-ms {
	font-weight: 600;
	color: #4ade80;
	font-variant-numeric: tabular-nums;
	min-width: 4.5em;
	text-align: right;
	flex-shrink: 0;
}
.site-latency-ms.site-latency-ms--error {
	color: #9ca3af;
	font-weight: 500;
	font-size: 12px;
	min-width: 6.5em;
}
