:root {
  --bg: #05040a;
  --panel: rgba(18, 20, 34, 0.82);
  --panel-strong: rgba(25, 28, 47, 0.96);
  --line: rgba(255, 255, 255, 0.18);
  --text: #fffafc;
  --muted: #c9c3d8;
  --hot: #ff3ea5;
  --cyan: #25f4d0;
  --amber: #ffb020;
  --blue: #2f7cff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(115deg, rgba(255, 62, 165, 0.18), transparent 28%),
    linear-gradient(245deg, rgba(37, 244, 208, 0.16), transparent 30%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 84px),
    #05040a;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    Arial,
    sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 18%),
    linear-gradient(90deg, transparent 0 18%, rgba(255, 176, 32, 0.08) 18% 19%, transparent 19% 48%, rgba(47, 124, 255, 0.08) 48% 49%, transparent 49% 100%);
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

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

button,
input {
  font: inherit;
}

.site-shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px max(20px, env(safe-area-inset-right)) 34px max(20px, env(safe-area-inset-left));
  overflow-x: hidden;
}

.masthead {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0 0 20px;
  text-align: center;
}

.browser-note {
  margin: 0;
  color: #e2d8ff;
  font-size: 30px;
  font-weight: 700;
  text-shadow: 0 0 24px rgba(142, 97, 255, 0.72);
}

.masthead h1 {
  margin: 0;
  color: #fff;
  font-size: 46px;
  line-height: 1.05;
  text-shadow:
    0 0 18px rgba(255, 62, 165, 0.66),
    0 0 28px rgba(37, 244, 208, 0.38);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.admin-link,
.back-link {
  position: absolute;
  top: 6px;
  right: 0;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #f8ecff;
  background: rgba(255, 255, 255, 0.07);
}

.admin-link:hover,
.back-link:hover {
  border-color: rgba(37, 244, 208, 0.65);
  box-shadow: 0 0 22px rgba(37, 244, 208, 0.22);
}

.announcement {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 112px;
  margin: 4px 0 28px;
  padding: 20px 36px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.09), transparent 42%),
    rgba(20, 23, 38, 0.88);
  box-shadow: var(--shadow), inset 0 0 44px rgba(255, 255, 255, 0.04);
}

.announcement::before {
  position: absolute;
  top: 0;
  right: 9%;
  left: 9%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, #ff72c2 32%, #77ffe6 68%, transparent);
  box-shadow: 0 0 18px rgba(99, 255, 226, 0.8);
}

.announcement strong {
  font-size: 38px;
}

.announcement span:last-child {
  min-width: 0;
  justify-self: center;
  color: #fff;
  font-size: 30px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.announce-icon {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 18%, rgba(255, 255, 255, 0.82) 18% 26%, transparent 26%),
    linear-gradient(150deg, transparent 0 38%, rgba(255, 255, 255, 0.82) 38% 48%, transparent 48%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 62, 165, 0.4));
  box-shadow:
    0 0 24px rgba(255, 62, 165, 0.55),
    inset 0 0 18px rgba(255, 255, 255, 0.18);
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  width: 100%;
  min-width: 0;
}

.route-card {
  --accent: var(--cyan);
  --image: none;
  position: relative;
  display: block;
  min-width: 0;
  min-height: 330px;
  aspect-ratio: 1.74 / 1;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 74%, white 8%);
  border-radius: 8px;
  isolation: isolate;
  background-color: #10111c;
  background-image: var(--image);
  background-position: center 34%;
  background-size: cover;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 22px 68px rgba(0, 0, 0, 0.56),
    0 0 38px color-mix(in srgb, var(--accent) 34%, transparent);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.route-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 88%, white 12%);
  box-shadow:
    0 28px 74px rgba(0, 0, 0, 0.6),
    0 0 56px color-mix(in srgb, var(--accent) 46%, transparent);
}

.route-card:nth-child(3) {
  background-position: center 30%;
}

.route-card:nth-child(4) {
  background-position: center center;
}

.route-card img {
  display: none;
}

.route-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, rgba(5, 4, 10, 0.04), rgba(5, 4, 10, 0.22) 45%, rgba(0, 0, 0, 0.9) 100%),
    linear-gradient(115deg, color-mix(in srgb, var(--accent) 34%, transparent), transparent 44%);
}

.route-card::after {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58)),
    linear-gradient(0deg, color-mix(in srgb, var(--accent) 15%, transparent), transparent);
  backdrop-filter: blur(2px);
}

.badge,
.live-pill {
  position: absolute;
  top: 20px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 8px;
  color: white;
  font-size: 26px;
  font-weight: 800;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
  white-space: nowrap;
}

.badge {
  left: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 92%, #fff 8%), rgba(255, 62, 165, 0.84));
}

.live-pill {
  right: 18px;
  gap: 8px;
  background: linear-gradient(90deg, #ff3a3a, #ff4c7b);
}

.live-pill::before {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  content: "";
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.82);
  animation: live-pulse 1.8s ease-in-out infinite;
}

.card-content {
  position: absolute;
  inset: auto 26px 24px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title title"
    "subtitle button";
  align-items: end;
  gap: 9px 18px;
  min-width: 0;
}

.card-content strong {
  grid-area: title;
  min-width: 0;
  font-size: 42px;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.68);
}

.card-subtitle {
  grid-area: subtitle;
  color: #f6efff;
  font-size: 24px;
  overflow-wrap: anywhere;
}

.enter-button {
  grid-area: button;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  min-width: 164px;
  max-width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 86%, #fff 8%), color-mix(in srgb, var(--hot) 60%, var(--accent) 40%));
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.18),
    0 0 28px color-mix(in srgb, var(--accent) 42%, transparent);
}

.enter-button::before {
  position: absolute;
  inset: 1px 22% auto;
  height: 1px;
  content: "";
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.76);
  opacity: 0.72;
}

.enter-button::after {
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
  content: "";
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.72));
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.62;
    transform: scale(0.82);
  }
}

.load-error {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(20, 23, 38, 0.82);
  text-align: center;
}

.site-footer {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

textarea {
  min-height: 72px;
  padding-top: 10px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(37, 244, 208, 0.76);
  box-shadow: 0 0 0 3px rgba(37, 244, 208, 0.13);
}

input[type="color"] {
  min-height: 44px;
  padding: 4px;
}

input[type="file"] {
  display: flex;
  align-items: center;
  padding: 10px;
}

button {
  font: inherit;
}

.primary-button,
.ghost-button,
.tp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: linear-gradient(90deg, #ff3ea5, #25f4d0);
  box-shadow: 0 0 28px rgba(255, 62, 165, 0.3);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.admin-body {
  min-height: 100vh;
  color: #333;
  background: #f2f2f2;
}

.admin-body::before {
  display: none;
}

.tp-login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(32, 34, 42, 0.96), rgba(57, 61, 73, 0.92)),
    #20222a;
}

.tp-login-box {
  width: min(390px, 100%);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.28);
}

.tp-login-brand {
  padding: 28px 30px 18px;
  border-bottom: 1px solid #f0f0f0;
}

.tp-login-brand strong {
  display: block;
  color: #20222a;
  font-size: 24px;
}

.tp-login-brand span {
  color: #999;
  font-size: 13px;
}

.tp-login-form {
  display: grid;
  gap: 18px;
  padding: 24px 30px 30px;
}

.tp-login-form label,
.tp-layout label {
  color: #333;
  font-size: 13px;
}

.tp-login-form input,
.tp-layout input,
.tp-layout textarea {
  border-color: #e6e6e6;
  border-radius: 2px;
  color: #333;
  background: #fff;
}

.tp-login-form input:focus,
.tp-layout input:focus,
.tp-layout textarea:focus {
  border-color: #16baaa;
  box-shadow: 0 0 0 3px rgba(22, 186, 170, 0.12);
}

.tp-btn {
  min-height: 38px;
  border: 1px solid #d2d2d2;
  border-radius: 2px;
  color: #333;
  background: #fff;
  font-size: 14px;
  font-weight: 400;
}

.tp-btn:hover {
  border-color: #16baaa;
  color: #16baaa;
}

.tp-btn-primary {
  border-color: #16baaa;
  color: #fff;
  background: #16baaa;
}

.tp-btn-primary:hover {
  color: #fff;
  background: #12a89a;
}

.tp-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 100vh;
}

.tp-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #20222a;
}

.tp-logo {
  height: 58px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 58px;
}

.tp-menu {
  display: grid;
  padding-top: 10px;
}

.tp-menu a {
  display: block;
  height: 44px;
  padding: 0 20px;
  border-left: 4px solid transparent;
  color: rgba(255, 255, 255, 0.78);
  line-height: 44px;
}

.tp-menu a.active,
.tp-menu a:hover {
  border-left-color: #16baaa;
  color: #fff;
  background: #16181d;
}

.tp-main {
  min-width: 0;
  padding: 18px;
}

.tp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  margin-bottom: 18px;
  padding: 0 18px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tp-header h1 {
  margin: 0;
  color: #20222a;
  font-size: 20px;
}

.tp-header span {
  color: #999;
  font-size: 13px;
}

.tp-actions {
  display: flex;
  gap: 10px;
}

.tp-form {
  display: grid;
  gap: 18px;
}

.tp-card {
  padding: 18px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tp-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -18px -18px 18px;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
}

.tp-card-title h2 {
  margin: 0;
  color: #20222a;
  font-size: 16px;
  font-weight: 700;
}

.tp-card-title span {
  color: #999;
  font-size: 13px;
}

.tp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.account-grid {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.tp-table-wrap {
  overflow-x: auto;
}

.tp-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  table-layout: fixed;
}

.tp-table th,
.tp-table td {
  padding: 12px;
  border: 1px solid #eee;
  vertical-align: top;
}

.tp-table th {
  color: #555;
  background: #fafafa;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.tp-table th:nth-child(1) {
  width: 58px;
}

.tp-table th:nth-child(2) {
  width: 220px;
}

.tp-table th:nth-child(3) {
  width: 300px;
}

.tp-table th:nth-child(4) {
  width: 190px;
}

.tp-table th:nth-child(5) {
  width: 230px;
}

.tp-table th:nth-child(6) {
  width: 110px;
}

.tp-line-row label {
  margin-bottom: 10px;
}

.tp-line-row label span {
  color: #777;
  font-weight: 400;
}

.tp-line-row input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: #16baaa;
}

.tp-line-row input[type="color"] {
  width: 68px;
}

.tp-thumb {
  --accent: var(--cyan);
  position: relative;
  width: 180px;
  height: 108px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 2px solid var(--accent);
  border-radius: 3px;
  background: #f6f6f6;
}

.tp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
}

.tp-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #16baaa;
  border-radius: 2px;
  color: #16baaa;
  cursor: pointer;
}

.tp-upload input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tp-savebar {
  position: sticky;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.08);
}

.tp-form-message,
.form-message {
  min-height: 20px;
  margin: 0;
  color: #ff5722;
}

@media (max-width: 860px) {
  .site-shell {
    width: 100%;
    max-width: 720px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .browser-note {
    font-size: 22px;
  }

  .masthead h1 {
    font-size: 34px;
    padding-right: 76px;
  }

  .subtitle {
    font-size: 16px;
  }

  .admin-link {
    top: 0;
  }

  .announcement {
    grid-template-columns: auto 1fr;
    min-height: auto;
    padding: 18px;
  }

  .announcement strong {
    font-size: 26px;
  }

  .announcement span:last-child {
    grid-column: 1 / -1;
    justify-self: start;
    max-width: 100%;
    font-size: clamp(15px, 4.5vw, 20px);
  }

  .route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .route-card {
    min-height: 0;
    aspect-ratio: 1 / 1.05;
    width: 100%;
  }

  .card-content {
    inset: auto 12px 12px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "subtitle"
      "button";
    gap: 5px;
  }

  .card-content strong {
    font-size: clamp(17px, 5vw, 22px);
  }

  .card-subtitle {
    font-size: clamp(11px, 3.4vw, 14px);
  }

  .enter-button {
    width: 100%;
    min-width: 0;
    min-height: clamp(30px, 8.4vw, 38px);
    padding: 0 clamp(6px, 2vw, 10px);
    font-size: clamp(12px, 3.3vw, 14px);
    gap: 7px;
  }

  .enter-button::after {
    border-top-width: 5px;
    border-bottom-width: 5px;
    border-left-width: 8px;
  }

  .badge,
  .live-pill {
    min-height: clamp(28px, 7.8vw, 34px);
    padding: 0 clamp(6px, 1.8vw, 8px);
    font-size: clamp(12px, 3.2vw, 14px);
  }

  .live-pill::before {
    width: 8px;
    height: 8px;
  }

  .tp-layout,
  .tp-form-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .tp-sidebar {
    position: static;
    height: auto;
  }

  .tp-menu {
    grid-template-columns: repeat(3, 1fr);
    padding-top: 0;
  }

  .tp-menu a {
    height: 40px;
    padding: 0 10px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    text-align: center;
    line-height: 40px;
  }

  .tp-menu a.active,
  .tp-menu a:hover {
    border-bottom-color: #16baaa;
  }

  .tp-header,
  .tp-card-title,
  .tp-savebar {
    align-items: stretch;
    flex-direction: column;
  }

  .tp-savebar {
    position: static;
  }
}

@media (max-width: 500px) {
  .site-shell {
    width: 100%;
    max-width: 440px;
    padding: 12px max(9px, env(safe-area-inset-right)) 28px max(9px, env(safe-area-inset-left));
  }

  .route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .masthead {
    justify-items: start;
    text-align: left;
  }

  .browser-note {
    font-size: 18px;
  }

  .masthead h1 {
    max-width: 100%;
    padding-right: 72px;
    font-size: 28px;
    overflow-wrap: anywhere;
  }

  .subtitle {
    max-width: 100%;
  }

  .announcement {
    gap: 12px;
  }

  .announce-icon {
    width: 38px;
    height: 38px;
  }

  .route-card {
    min-height: 0;
    aspect-ratio: 1 / 1.08;
  }

  .card-content {
    inset: auto 9px 9px;
  }

  .live-pill {
    right: 8px;
  }
}

@media (hover: none) {
  .route-card:hover {
    transform: none;
  }

  .route-card:active {
    transform: scale(0.985);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-pill::before {
    animation: none;
  }

  .route-card {
    transition: none;
  }
}
