:root {
  color: #ffffff;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    Arial,
    sans-serif;
  background: #0c1317;
  text-rendering: geometricPrecision;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

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

body {
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

.portal-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.portal-bg,
.portal-shade {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.portal-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.portal-shade {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(4, 9, 13, 0.54), rgba(4, 9, 13, 0.34) 42%, rgba(4, 9, 13, 0.72)),
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 36%),
    rgba(7, 14, 18, 0.16);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1560px, calc(100% - 56px));
  margin: 24px auto 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(10, 18, 22, 0.32);
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  cursor: default;
}

.auth-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
  backdrop-filter: blur(10px);
}

.auth-button:hover,
.auth-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.64);
  background: rgba(255, 255, 255, 0.24);
  outline: none;
}

.auth-button.is-danger {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(160, 24, 32, 0.5);
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
  backdrop-filter: blur(10px);
}

.icon-button:hover,
.icon-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.24);
  outline: none;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero {
  width: min(1120px, calc(100% - 48px));
  margin: 64px auto 34px;
  text-align: center;
}

.portal-kicker {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  font-weight: 600;
}

.hero h1 {
  margin: 0;
  font-size: 56px;
  line-height: 1.15;
  font-weight: 800;
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.portal-subtitle {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  font-weight: 600;
}

.entry-section {
  width: min(1560px, calc(100% - 56px));
  margin: 24px auto 36px;
  padding: 30px 0 18px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 34px 28px;
}

.entry-item {
  min-height: 218px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 6px 10px 10px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  position: relative;
  border-radius: 8px;
  transition:
    transform 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.entry-item.is-enabled:hover,
.entry-item.is-enabled:focus-visible {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.entry-item.is-enabled:hover .icon-shell,
.entry-item.is-enabled:focus-visible .icon-shell {
  background: #ffffff;
  color: #173a36;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.entry-item.is-disabled {
  opacity: 0.72;
}

.entry-badge {
  min-height: 23px;
  padding: 4px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.icon-shell {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.93);
  color: #2d3639;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.entry-icon {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entry-title {
  display: block;
  min-height: 32px;
  font-size: 23px;
  line-height: 1.35;
  font-weight: 800;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

.entry-line {
  width: 54px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #ffffff, rgba(255, 255, 255, 0));
}

.entry-links {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.45;
}

.entry-state {
  margin-top: auto;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(17, 93, 79, 0.36);
  font-size: 12px;
}

.entry-item.is-disabled .entry-state {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
}

.portal-footer {
  width: min(1560px, calc(100% - 56px));
  margin: auto auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 10;
  min-width: 150px;
  transform: translate(-50%, 18px);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(8, 17, 21, 0.84);
  color: #fff;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  backdrop-filter: blur(12px);
}

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

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 9, 13, 0.58);
  backdrop-filter: blur(8px);
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 22px;
  background: rgba(14, 24, 30, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.login-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.login-card-head p {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.login-card h2 {
  margin: 0;
  font-size: 24px;
}

.login-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.login-card input {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.login-submit {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  color: #173a36;
  font-weight: 800;
  cursor: pointer;
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-note {
  min-height: 20px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.45;
}

.login-note.is-error {
  color: #fecaca;
}

@media (max-width: 1180px) {
  .portal-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero h1 {
    font-size: 46px;
  }
}

@media (max-width: 820px) {
  .topbar,
  .entry-section,
  .portal-footer {
    width: min(100% - 28px, 720px);
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    font-size: 15px;
  }

  .user-pill {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    width: min(100% - 28px, 720px);
    margin-top: 42px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .portal-subtitle {
    font-size: 17px;
  }

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

  .entry-item {
    min-height: 205px;
    padding-inline: 6px;
  }

  .entry-title {
    font-size: 19px;
  }
}

@media (max-width: 480px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .user-pill,
  .auth-button {
    max-width: 138px;
    min-height: 34px;
    padding: 0 10px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
  }

  .hero h1 {
    font-size: 31px;
  }

  .portal-kicker {
    font-size: 13px;
  }

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

  .entry-item {
    min-height: 185px;
  }

  .portal-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
