@charset "utf-8";

@font-face {
  font-family: "MiSans";
  src: url("../fonts/MiSans-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "MiSans";
  src: url("../fonts/MiSans-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li,
button {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: #f1f2f5;
  color: #1a1a1a;
  font-family: "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

.app {
  min-height: 100vh;
  padding: 32px;
}

.container {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.header {
  height: 74px;
  padding: 0 16px;
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header img{
  width: 111px;
}

.logo,
.header-right,
.section-title,
.retry-btn,
.use-line-btn {
  display: flex;
  align-items: center;
}

.logo {
  min-width: 0;
  gap: 12px;
}

.logo .iconfont {
  color: #004EEB;
  font-size: 42px;
}

.logo-text {
  color: #333;
  font-size: 21px;
  font-weight: 500;
  white-space: nowrap;
}

.header-right {
  gap: 12px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f5f7fb;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.18s ease, background 0.18s ease;
}

.icon-button:hover,
.retry-btn:hover,
.use-line-btn:hover,
.card-use-btn:hover {
  /* transform: translateY(-1px); */
}

.icon-button img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.recommended-section,
.tip-section,
.speed-card {
  background: #fff;
}

.recommended-section {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
}

.recommended-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.recommended-badge {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, #060642 0%, #0014a9 35%, #2779fe 78%, #00a1ff 100%);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.recommended-badge .iconfont {
  font-size: 20px;
  color: #fff;
}

.recommended-title {
  font-size: 21px;
  font-weight: 600;
}

.status-tag,
.latency-tag,
.card-rating {
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.status-tag,
.latency-tag {
  padding: 4px 12px;
}

.recommended-content {
  display: flex;
  align-items: center;
  gap: 40px;
  justify-content: space-between;
}

.recommended-line,
.card-line {
  display: flex;
  align-items: center;
  gap: 16px;
}

.line-number {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: #528bff;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 600;
  flex: 0 0 auto;
}

.line-info,
.card-name-speed {
  display: flex;
  flex-direction: column;
}

.feature {
  display: flex;
  flex-direction: row;
}

.line-info {
  gap: 4px;
}

.line-name {
  color: #718096;
  font-size: 14px;
  font-weight: 500;
}

.line-speed,
.card-speed {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.speed-value {
  color: #22c55e;
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
}

.speed-unit {
  color: #22c55e;
  font-size: 16px;
  font-weight: 600;
}

.features {
  padding: 0 40px;
  border-right: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  /* gap: 20px; */
  flex:1;
  justify-content: space-between;
}

.feature {
  /* width: 100px; */
  align-items: center;
  gap: 8px;
  text-align: center;
}

.feature .right{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.feature-icon.blue {
  background: #e6f7ff;
}
.feature-icon.blue .iconfont{
  color: #1890FF;
  font-size: 24px;
}

.feature-icon.green {
  background: #f6ffed;
}
.feature-icon.green .iconfont{
  color: #52C41A;
  font-size: 24px;
}

.feature-icon.orange {
  background: #fff7e6;
}
.feature-icon.orange .iconfont{
  color: #FAAD14;
  font-size: 24px;
}

.feature-icon img {
  width: 24px;
  height: 24px;
}

.feature-title {
  color: #2d3748;
  font-size: 14px;
  font-weight: 600;
}

.feature-desc {
  color: #718096;
  font-size: 12px;
}

.use-line-btn {
  min-height: 50px;
  /* margin-left: auto; */
  padding: 14px 32px;
  border-radius: 999px;
  background: linear-gradient(90deg, #113fcd 0%, #1e62ea 100%);
  color: #fff;
  cursor: pointer;
  gap: 8px;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 12px 24px rgba(17, 63, 205, 0.18);
}

.use-line-btn img {
  width: 20px;
  height: 20px;
}

.speed-test-section {
  margin-top: 16px;
}

.section-header {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title {
  gap: 8px;
}

.section-title .bar {
  height: 17px;
  width: 3px;
  background: #155EEF;
  border-radius: 999px;
}

.section-title span {
  font-size: 18px;
  font-weight: 600;
}

.retry-btn {
  min-height: 42px;
  padding: 10px 20px;
  border: 1px solid #004eeb;
  border-radius: 999px;
  background: transparent;
  color: #004eeb;
  cursor: pointer;
  gap: 8px;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.18s ease, background 0.18s ease;
  line-height: 1;
}

.retry-btn:hover {
  background: #eef3ff;
}

.retry-btn img {
  width: 18px;
  height: 18px;
}

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

.speed-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
}

.card-header {
  padding: 20px 20px 0;
}

.card-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-line {
  min-width: 0;
  gap: 12px;
}

.card-number {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 600;
}

.card-number.blue {
  background: #528bff;
}

.card-number.purple {
  background: #d3adf7;
}

.card-number.light-blue {
  background: #91caff;
}

.card-number.cyan {
  background: #5cdbd3;
}

.card-number.red {
  background: #ff7875;
}

.card-number.violet {
  background: #b37feb;
}

.card-number.indigo {
  background: #597ef7;
}

.card-number.teal {
  background: #36cfc9;
}

.card-name-speed {
  min-width: 0;
  gap: 8px;
}

.card-name {
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 500;
}

.card-speed {
  gap: 4px;
}

.card-speed-value {
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
}

.card-speed-unit {
  font-size: 14px;
  font-weight: 500;
}

.card-rating {
  padding: 4px 12px;
}

.progress-bar {
  width: 100%;
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 4px;
}

.progress-bar span {
  height: 6px;
  border-radius: 999px;
  background: #edf1f7;
}

.progress-bar span.active.green {
  background: #22c55e;
}

.progress-bar span.active.orange {
  background: #faad14;
}

.progress-bar span.active.red {
  background: #ff4d4f;
}

.card-footer {
  margin-top: 12px;
  padding: 0 20px 20px;
}

.card-use-btn {
  width: 100%;
  min-height: 44px;
  padding: 12px;
  border-radius: 14px;
  background: #eef3ff;
  color: #004eeb;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.18s ease, background 0.18s ease;
}

.card-use-btn:hover {
  background: #e2ebff;
}

.card-use-btn .iconfont {
  font-size: 18px;
}

.tip-section {
  margin-top: 16px;
  padding: 20px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.tip-section .iconfont {
  font-size: 24px;
  color: #1570EF;
}

.tip-text {
  color: #4a5568;
  font-size: 16px;
  line-height: 1.6;
}

.tip-title {
  color: #2d3748;
  font-weight: 500;
}

.speed-value.green,
.speed-unit.green,
.card-speed-value.green,
.card-speed-unit.green,
.status-tag.excellent,
.latency-tag.excellent,
.card-rating.excellent {
  color: #22c55e;
}

.speed-value.orange,
.speed-unit.orange,
.card-speed-value.orange,
.card-speed-unit.orange,
.status-tag.good,
.status-tag.normal,
.latency-tag.good,
.latency-tag.normal,
.card-rating.good,
.card-rating.normal {
  color: #ff8904;
}

.speed-value.red,
.speed-unit.red,
.card-speed-value.red,
.card-speed-unit.red,
.status-tag.poor,
.latency-tag.poor,
.card-rating.poor {
  color: #fb2c36;
}

.status-tag.excellent,
.latency-tag.excellent,
.card-rating.excellent {
  background: rgba(34, 197, 94, 0.1);
}

.status-tag.good,
.latency-tag.good,
.card-rating.good {
  background: rgba(255, 137, 4, 0.1);
}

.status-tag.normal,
.latency-tag.normal,
.card-rating.normal {
  background: rgba(240, 177, 0, 0.1);
}

.status-tag.poor,
.latency-tag.poor,
.card-rating.poor {
  background: rgba(251, 44, 54, 0.1);
}

.loader {
  display: none;
  width: 100%;
  height: 100vh;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.32);
}

.loader-panel {
  min-width: 168px;
  padding: 18px 22px;
  border-radius: 16px;
  background: #fff;
  color: #1a1a1a;
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transform: translate(-50%, -50%);
  font-size: 16px;
  font-weight: 500;
}

.loader-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #dbe5ff;
  border-top-color: #004eeb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@media (max-width: 1200px) {
  .recommended-content {
    flex-wrap: wrap;
  }

  .features {
    order: 3;
    width: 100%;
    border: 0;
    padding: 0;
  }

  .use-line-btn {
    margin-left: auto;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .app {
    padding: 16px;
  }

  .header {
    height: auto;
    min-height: 74px;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .header-right,
  .use-line-btn {
    width: 100%;
  }

  .header-right .retry-btn {
    width: auto;
    flex: 1;
  }

  .section-header .retry-btn {
    width: 100%;
  }

  .icon-button {
    flex: 0 0 42px;
  }

  .logo-text {
    font-size: 18px;
  }

  .recommended-content {
    align-items: stretch;
    flex-direction: column;
  }

  .recommended-line {
    align-items: flex-start;
  }

  .features {
    order: 0;
    flex-wrap: wrap;
  }

  .feature {
    width: calc(33.333% - 14px);
    min-width: 84px;
  }

  .section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header-right {
    flex-wrap: wrap;
  }

  .line-speed {
    flex-wrap: wrap;
  }

  .feature {
    width: 100%;
    align-items: flex-start;
    text-align: left;
  }

  .card-info {
    flex-direction: column;
  }
}
