/* ============ 변수 (최종 톤 고정) ============ */
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/static/woff2/Pretendard-Regular.woff2")
    format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/static/woff2/Pretendard-Medium.woff2")
    format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/static/woff2/Pretendard-SemiBold.woff2")
    format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/static/woff2/Pretendard-Bold.woff2")
    format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --glass-blur: 8px; /* blur 줄임 */
  --glass-sat: 120%;
  --glass-contrast: 110%;
  --glass-bg: rgba(255, 255, 255, 0.12); /* 살짝 투명 흰색 */
  --glass-border: rgba(255, 255, 255, 0.2);
}

/* ============ 메뉴바 ============ */
#mainNav {
  position: absolute;
  top: 30px;
  left: 290px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 18px;
  align-items: center;
  font-family: "Pretendard", sans-serif;
  white-space: nowrap;
}
#mainNav > li {
  position: relative;
  font-size: 15px;
  font-weight: 400;
  color: #222;
  flex-shrink: 0;
}
#mainNav > li::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: var(--hover-bridge, 22px); /* 다리 높이 */
  pointer-events: auto;
}
#mainNav > li > a {
  position: relative;
  display: inline-block;
  padding: 10px 35px;
  top: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--nav-text);
  text-decoration: none;
  border-radius: 8px;
  background-color: transparent;
}

/* hover 밑줄 */
#mainNav > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, #8e2de2, #ff6a00);

  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
#mainNav > li:hover > a::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ============ 드롭다운 ============ */
#mainNav > li > div > ul {
  list-style: none;
  padding-left: 0;

  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  margin: 0;
  padding: 10px;
  border-radius: 12px;
  text-align: center;
  z-index: 1000;

  /* Glass 제거 → 반투명 + Gradient */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.85) 0%,
    /* 위쪽 진하게 */ rgba(1, 12, 112, 0.85) 100% /* 아래쪽 옅게 */
  );

  /* 테두리 */
  border: 1px solid rgba(255, 255, 255, 0.15);

  /* 부드러운 그림자 */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);

  /* GPU 최적화 */
  will-change: opacity, transform;
}
#mainNav > li > div > ul::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  pointer-events: none;
  background: radial-gradient(
    120% 100% at 50% 0%,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0.12) 55%,
    rgba(0, 0, 0, 0.18) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 0;
}
#mainNav > li > div > ul::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 40%,
    var(--glass-glare) 50%,
    transparent 60%
  );
  background-size: 220% 220%;
  opacity: 0.35;
  z-index: 1;
}
#mainNav > li > div > ul > li {
  list-style: none;
}
/* 드롭다운 항목 */
#mainNav > li > div > ul > li > a {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}
#mainNav > li > div > ul > li > a:hover {
  background: #FFF44F;
  color: #002147;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px); /* 살짝 위로 띄우기 */
  transition: all 0.25s ease;
}
