:root {
  --sc-brand: #4ECDC4;
  --sc-brand-dark: #2a9d96;
  --sc-font: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
}

body {
  font-family: var(--sc-font);
}

.bg-gradient-brand {
  background-image: linear-gradient(310deg, var(--sc-brand-dark) 0%, var(--sc-brand) 100%);
}

.text-brand {
  color: var(--sc-brand) !important;
}

.navbar-brand-sc {
  letter-spacing: -0.02em;
}

.badge-sc {
  background: rgba(78, 205, 196, 0.15);
  color: var(--sc-brand-dark);
}

.card-feature:hover {
  transform: translateY(-4px);
  transition: transform 0.2s ease;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.sc-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  flex-shrink: 0;
}

.sc-check .ni {
  font-size: 0.75rem;
}

.login-card {
  max-width: 420px;
}

.note-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* Demo 影片區 */
.sc-video-card {
  border: 0;
  overflow: hidden;
}

.sc-video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}

.sc-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sc-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
}

.sc-video-placeholder .ni {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.sc-video-placeholder p {
  margin: 0;
  font-size: 0.875rem;
}

.sc-video-placeholder .text-xs {
  margin-top: 0.5rem;
  opacity: 0.55;
  font-size: 0.75rem;
}

.sc-video-frame.has-video .sc-video-placeholder {
  display: none;
}

.sc-demo-featured .sc-video-frame {
  padding-top: 52%;
}

@media (max-width: 991.98px) {
  .sc-demo-featured .sc-video-frame {
    padding-top: 56.25%;
  }
}

/* MCP 區塊 */
.sc-mcp-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.sc-mcp-step {
  font-size: 0.75rem;
  font-weight: 600;
  color: #344767;
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 0.35rem 0.5rem;
}

.sc-mcp-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.25rem;
  border-radius: 50%;
  background: var(--sc-brand);
  color: #fff;
  font-size: 0.65rem;
}

.sc-mcp-arrow {
  color: var(--sc-brand-dark);
  font-weight: 700;
  font-size: 0.875rem;
}

.sc-mcp-table code {
  font-size: 0.7rem;
  color: var(--sc-brand-dark);
}

.sc-mcp-card .card-header code,
#mcp code,
#agent code,
header code.text-white {
  font-size: 0.8em;
  background: rgba(78, 205, 196, 0.12);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}

header code.text-white {
  background: rgba(255, 255, 255, 0.15);
}

.sc-pwa-path {
  font-size: 0.8rem;
  color: var(--sc-brand-dark);
  background: rgba(78, 205, 196, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.35rem;
}

.sc-pwa-card:hover {
  transform: translateY(-3px);
  transition: transform 0.2s ease;
}

/* 首頁 hub（全幅背景 + mega menu） */
.sc-hub-bg-image {
  background: url("../assets/img/curved-images/curved-8.jpg") center center / cover no-repeat;
}

.sc-hub-navbar {
  max-width: 1140px;
}

.sc-hub .badge-sc.bg-white {
  color: var(--sc-brand-dark) !important;
}

@media (max-width: 991.98px) {
  .sc-hub .dropdown-menu.dropdown-xl {
    min-width: 100%;
  }
}

/* Mega menu：對齊導覽列寬度，避免 dropdown-menu-end + 超寬面板視覺「歪到左邊」 */
@media (min-width: 992px) {
  #sc-mega-nav.navbar-collapse {
    position: relative;
  }

  #sc-mega-nav .navbar-nav .nav-item.dropdown.dropdown-hover {
    position: static;
  }

  #sc-mega-nav .dropdown-menu.sc-mega-menu.dropdown-xl {
    left: 50% !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    min-width: min(52rem, calc(100vw - 2.5rem)) !important;
    max-width: calc(100vw - 2.5rem);
  }

  /* 保留 Soft UI 動畫的 perspective / rotate / Z，並將橫向位移改為 -50% 置中 */
  #sc-mega-nav .dropdown.dropdown-hover .dropdown-menu.sc-mega-menu.dropdown-xl {
    transform: perspective(999px) rotateX(-10deg) translateZ(0) translate3d(-50%, 37px, 0px) !important;
  }

  #sc-mega-nav .dropdown.dropdown-hover:hover > .dropdown-menu.sc-mega-menu.dropdown-xl,
  #sc-mega-nav .dropdown.dropdown-hover .dropdown-menu.sc-mega-menu.dropdown-xl.show {
    transform: perspective(999px) rotateX(0deg) translateZ(0) translate3d(-50%, 37px, 5px) !important;
  }

  #sc-mega-nav .dropdown .dropdown-menu.sc-mega-menu.dropdown-xl:before {
    left: 50%;
    transform: translateX(-50%);
  }
}
