html.kcsw-prelogin-active,
html.kcsw-prelogin-active body {
  min-height: 100%;
  overflow-x: hidden;
  background: #060816;
}

html.kcsw-prelogin-active #app,
html.kcsw-prelogin-active #app-loader {
  display: none !important;
}

#kcsw-prelogin-portal {
  display: none;
}

html.kcsw-prelogin-active #kcsw-prelogin-portal {
  display: block;
}

.kcsw-portal {
  --portal-bg: #060816;
  --portal-bg-soft: #0b1024;
  --portal-card: rgba(255, 255, 255, 0.08);
  --portal-card-strong: rgba(255, 255, 255, 0.13);
  --portal-border: rgba(255, 255, 255, 0.14);
  --portal-text: #f7fbff;
  --portal-muted: rgba(230, 238, 255, 0.72);
  --portal-blue: #2f7bff;
  --portal-cyan: #22d7ff;
  --portal-gold: #ffd15c;
  --portal-orange: #ff9232;
  min-height: 100vh;
  color: var(--portal-text);
  background:
    radial-gradient(circle at 50% 28%, rgba(39, 120, 255, 0.38), transparent 34%),
    radial-gradient(circle at 84% 16%, rgba(255, 179, 76, 0.24), transparent 22%),
    linear-gradient(180deg, #050713 0%, #0b1024 58%, #f5f8ff 58%, #f5f8ff 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

.kcsw-portal *,
.kcsw-portal *::before,
.kcsw-portal *::after {
  box-sizing: border-box;
}

.kcsw-portal a {
  color: inherit;
  text-decoration: none;
}

.kcsw-portal button {
  font: inherit;
}

.kcsw-portal-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
}

.kcsw-portal-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.3) 78%, transparent);
}

.kcsw-portal-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 8, 22, 0.96) 0%, rgba(6, 8, 22, 0.64) 50%, rgba(6, 8, 22, 0.96) 100%),
    radial-gradient(circle at 50% 82%, rgba(48, 130, 255, 0.28), transparent 28%);
}

.kcsw-portal-container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.kcsw-portal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 7, 19, 0.86);
  backdrop-filter: blur(18px);
}

.kcsw-portal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 28px;
}

.kcsw-portal-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.kcsw-portal-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 16px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 12px 32px rgba(47, 123, 255, 0.34);
}

.kcsw-portal-brand-text strong {
  display: block;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.kcsw-portal-brand-text span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  letter-spacing: 0;
  white-space: nowrap;
}

.kcsw-portal-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kcsw-portal-menu a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.kcsw-portal-menu a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.kcsw-portal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kcsw-portal-link-btn,
.kcsw-portal-primary,
.kcsw-portal-secondary,
.kcsw-portal-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.kcsw-portal-link-btn {
  padding: 0 21px;
  color: #fff;
  background: linear-gradient(135deg, #4b7dff, #2f7bff);
  box-shadow: 0 16px 34px rgba(47, 123, 255, 0.36);
  font-weight: 800;
}

.kcsw-portal-link-btn:hover,
.kcsw-portal-primary:hover,
.kcsw-portal-secondary:hover,
.kcsw-portal-ghost:hover {
  transform: translateY(-2px);
}

.kcsw-portal-hero {
  min-height: 650px;
  padding: 88px 0 42px;
}

.kcsw-portal-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  align-items: center;
  gap: 62px;
}

.kcsw-portal-hero-copy {
  max-width: 810px;
}

.kcsw-portal-hero h1 {
  margin: 0;
  color: #f7fbff;
  font-size: clamp(40px, 4.35vw, 62px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0;
}

.kcsw-portal-hero h1 span {
  display: block;
  margin-top: 10px;
  color: var(--portal-gold);
  text-shadow: 0 12px 42px rgba(255, 176, 66, 0.34);
}

.kcsw-portal-lead {
  width: min(760px, 100%);
  margin: 28px 0 0;
  color: var(--portal-muted);
  font-size: 21px;
  line-height: 1.85;
}

.kcsw-portal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.kcsw-portal-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid rgba(96, 151, 255, 0.42);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 24px rgba(61, 118, 255, 0.12);
  font-size: 16px;
  font-weight: 700;
}

.kcsw-portal-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 38px;
}

.kcsw-portal-primary,
.kcsw-portal-secondary,
.kcsw-portal-ghost {
  min-width: 158px;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 800;
}

.kcsw-portal-primary {
  color: #061022;
  background: linear-gradient(135deg, var(--portal-gold), var(--portal-orange));
  box-shadow: 0 18px 42px rgba(255, 146, 50, 0.36);
}

.kcsw-portal-secondary {
  color: #fff;
  background: linear-gradient(135deg, #4b7dff, #2f7bff);
  box-shadow: 0 18px 42px rgba(47, 123, 255, 0.34);
}

.kcsw-portal-ghost {
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.kcsw-portal-orbit {
  position: relative;
  min-height: 420px;
}

.kcsw-portal-orbit-card {
  position: absolute;
  inset: 48px 8px auto auto;
  width: 318px;
  min-height: 318px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 42px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at 50% 10%, rgba(34, 215, 255, 0.2), transparent 36%);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.kcsw-portal-orbit-card::before,
.kcsw-portal-orbit-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.kcsw-portal-orbit-card::before {
  width: 260px;
  height: 260px;
  left: 28px;
  top: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.kcsw-portal-orbit-card::after {
  width: 172px;
  height: 172px;
  left: 72px;
  top: 78px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  animation: kcswPortalSpin 18s linear infinite;
}

.kcsw-portal-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 110px;
  height: 110px;
  transform: translate(-50%, -50%);
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(42, 125, 255, 0.36);
  overflow: hidden;
}

.kcsw-portal-core img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kcsw-portal-node {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 22px;
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  font-size: 23px;
  font-weight: 900;
}

.kcsw-portal-node.n1 {
  left: 34px;
  top: 44px;
}

.kcsw-portal-node.n2 {
  right: 34px;
  top: 60px;
  color: #07111f;
  background: linear-gradient(135deg, var(--portal-gold), var(--portal-orange));
}

.kcsw-portal-node.n3 {
  left: 62px;
  bottom: 52px;
  background: linear-gradient(135deg, #1fd5ff, #2f7bff);
}

.kcsw-portal-node.n4 {
  right: 56px;
  bottom: 44px;
}

.kcsw-portal-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.kcsw-portal-metric {
  padding: 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}

.kcsw-portal-metric strong {
  display: block;
  color: #0b8cff;
  font-size: 34px;
  font-weight: 900;
}

.kcsw-portal-metric span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  font-weight: 700;
}

.kcsw-portal-light {
  color: #12203a;
  background: #f5f8ff;
}

.kcsw-portal-dark {
  color: #fff;
  background:
    radial-gradient(circle at 22% 10%, rgba(34, 215, 255, 0.18), transparent 24%),
    radial-gradient(circle at 78% 10%, rgba(255, 177, 70, 0.13), transparent 22%),
    #070a18;
}

.kcsw-portal-section {
  padding: 86px 0;
}

.kcsw-portal-section-title {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

.kcsw-portal-section-title h2 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 0;
}

.kcsw-portal-section-title p {
  margin: 14px 0 0;
  color: #5d6b86;
  font-size: 18px;
  line-height: 1.7;
}

.kcsw-portal-dark .kcsw-portal-section-title p {
  color: rgba(230, 238, 255, 0.72);
}

.kcsw-portal-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.kcsw-portal-info-card,
.kcsw-portal-course-card,
.kcsw-portal-service-card,
.kcsw-portal-case-card {
  border-radius: 8px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.kcsw-portal-info-card {
  padding: 30px;
  border: 1px solid #e1e8f7;
  background: #fff;
  box-shadow: 0 18px 46px rgba(30, 63, 112, 0.08);
}

.kcsw-portal-info-card:hover,
.kcsw-portal-course-card:hover,
.kcsw-portal-service-card:hover,
.kcsw-portal-case-card:hover {
  transform: translateY(-4px);
}

.kcsw-portal-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #2f7bff, #22d7ff);
  font-size: 23px;
  font-weight: 900;
}

.kcsw-portal-info-card h3,
.kcsw-portal-course-card h3,
.kcsw-portal-service-card h3,
.kcsw-portal-case-card h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0;
}

.kcsw-portal-info-card p,
.kcsw-portal-course-card p,
.kcsw-portal-service-card p,
.kcsw-portal-case-card p {
  margin: 13px 0 0;
  color: #5d6b86;
  font-size: 15px;
  line-height: 1.8;
}

.kcsw-portal-path {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin-bottom: 34px;
}

.kcsw-portal-path-step {
  padding: 24px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
}

.kcsw-portal-path-step strong {
  display: block;
  color: var(--portal-gold);
  font-size: 24px;
  font-weight: 900;
}

.kcsw-portal-path-step span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  line-height: 1.6;
}

.kcsw-portal-arrow {
  color: rgba(255, 255, 255, 0.52);
  font-size: 28px;
  font-weight: 900;
}

.kcsw-portal-course-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.kcsw-portal-course-card,
.kcsw-portal-service-card {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.kcsw-portal-course-card p,
.kcsw-portal-service-card p {
  color: rgba(230, 238, 255, 0.72);
}

.kcsw-portal-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.kcsw-portal-product-card {
  min-height: 208px;
  padding: 28px 22px;
  border: 1px solid #e1e8f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(30, 63, 112, 0.08);
}

.kcsw-portal-product-letter {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border-radius: 8px;
  color: #fff;
  background: #102247;
  font-size: 27px;
  font-weight: 900;
}

.kcsw-portal-product-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 900;
}

.kcsw-portal-product-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: #5d6b86;
  list-style: none;
  font-size: 15px;
}

.kcsw-portal-service-grid,
.kcsw-portal-case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.kcsw-portal-case-card {
  padding: 26px;
  border: 1px solid #e1e8f7;
  background: #fff;
  box-shadow: 0 18px 46px rgba(30, 63, 112, 0.08);
}

.kcsw-portal-footer {
  padding: 34px 0;
  color: rgba(255, 255, 255, 0.68);
  background: #050713;
  text-align: center;
  font-size: 14px;
}

.kcsw-portal-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(3, 5, 15, 0.72);
  backdrop-filter: blur(16px);
}

.kcsw-portal-modal.is-open {
  display: grid;
}

.kcsw-portal-login-box {
  width: min(430px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #fff;
  color: #12203a;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.kcsw-portal-login-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px;
  background: linear-gradient(135deg, #071025, #102a63);
  color: #fff;
}

.kcsw-portal-login-head strong {
  font-size: 22px;
  font-weight: 900;
}

.kcsw-portal-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  cursor: pointer;
}

.kcsw-portal-login-body {
  padding: 28px 26px 30px;
}

.kcsw-portal-login-body p {
  margin: 0 0 20px;
  color: #5d6b86;
  line-height: 1.7;
}

.kcsw-portal-login-options {
  display: grid;
  gap: 12px;
}

.kcsw-portal-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid #dfe7f6;
  border-radius: 8px;
  background: #f7faff;
  color: #102247;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.kcsw-portal-option:hover {
  transform: translateX(3px);
  border-color: #2f7bff;
  background: #eef5ff;
}

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

@media (prefers-reduced-motion: reduce) {
  .kcsw-portal *,
  .kcsw-portal *::before,
  .kcsw-portal *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1080px) {
  .kcsw-portal-menu {
    display: none;
  }

  .kcsw-portal-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .kcsw-portal-orbit {
    display: none;
  }

  .kcsw-portal-card-grid,
  .kcsw-portal-product-grid,
  .kcsw-portal-service-grid,
  .kcsw-portal-case-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kcsw-portal-course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .kcsw-portal-container {
    width: min(100% - 28px, 1200px);
  }

  .kcsw-portal-nav {
    min-height: 68px;
  }

  .kcsw-portal-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .kcsw-portal-brand-text strong {
    font-size: 18px;
  }

  .kcsw-portal-brand-text span {
    display: none;
  }

  .kcsw-portal-actions {
    gap: 8px;
  }

  .kcsw-portal-actions .kcsw-portal-ghost {
    display: none;
  }

  .kcsw-portal-link-btn {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
  }

  .kcsw-portal-hero {
    min-height: auto;
    padding: 44px 0 28px;
  }

  .kcsw-portal-hero h1 {
    font-size: clamp(31px, 10vw, 42px);
    line-height: 1.08;
  }

  .kcsw-portal-lead {
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.68;
  }

  .kcsw-portal-tags {
    gap: 8px;
    margin-top: 24px;
  }

  .kcsw-portal-tags span {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .kcsw-portal-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 28px;
  }

  .kcsw-portal-primary,
  .kcsw-portal-secondary,
  .kcsw-portal-ghost {
    width: 100%;
    min-height: 44px;
  }

  .kcsw-portal-metrics {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 12px;
  }

  .kcsw-portal-section {
    padding: 62px 0;
  }

  .kcsw-portal-card-grid,
  .kcsw-portal-course-grid,
  .kcsw-portal-product-grid,
  .kcsw-portal-service-grid,
  .kcsw-portal-case-grid {
    grid-template-columns: 1fr;
  }

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

  .kcsw-portal-arrow {
    transform: rotate(90deg);
    text-align: center;
  }
}

@media (max-width: 430px) {
  .kcsw-portal-brand {
    gap: 9px;
  }

  .kcsw-portal-brand-text strong {
    font-size: 16px;
  }

  .kcsw-portal-link-btn {
    padding: 0 13px;
    font-size: 13px;
  }

  .kcsw-portal-metric {
    padding: 18px 12px;
  }

  .kcsw-portal-metric strong {
    font-size: 28px;
  }
}
