/* Malggu 공통 헤더 — portal-theme.css (nav 전용) */

.malggu-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: none;
  box-shadow: none;
  overflow: visible;
}

.malggu-nav-inner {
  display: flex;
  align-items: center;
  height: 60px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 24px;
  overflow: visible;
}

.malggu-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.malggu-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c5cbf 0%, #c9a84c 100%);
  flex-shrink: 0;
}

.malggu-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.malggu-logo-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.malggu-logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: #c9a84c;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.8;
}

.malggu-menu {
  display: none;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.malggu-menu-pill {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  overflow: visible;
}

.malggu-nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.malggu-nav-dropdown-trigger {
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.malggu-nav-dropdown-trigger::after {
  content: "";
  position: absolute;
  top: 100%;
  left: -30px;
  right: -30px;
  height: 12px;
}

.malggu-nav-dropdown-caret {
  font-size: 10px;
  opacity: 0.65;
  line-height: 1;
  transition: transform 0.15s ease;
}

.malggu-nav-dropdown:hover .malggu-nav-dropdown-caret,
.malggu-nav-dropdown.is-open .malggu-nav-dropdown-caret {
  transform: rotate(180deg);
}

.malggu-nav-dropdown-flyout {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  padding-top: 12px;
  pointer-events: none;
}

.malggu-nav-dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 188px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(12, 11, 20, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
}

@media (min-width: 768px) {
  .malggu-nav-dropdown:hover .malggu-nav-dropdown-flyout,
  .malggu-nav-dropdown.is-open .malggu-nav-dropdown-flyout,
  .malggu-nav-dropdown:focus-within .malggu-nav-dropdown-flyout {
    pointer-events: auto;
  }

  .malggu-nav-dropdown:hover .malggu-nav-dropdown-menu,
  .malggu-nav-dropdown.is-open .malggu-nav-dropdown-menu,
  .malggu-nav-dropdown:focus-within .malggu-nav-dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.malggu-nav-dropdown-item {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  white-space: nowrap;
}

.malggu-nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.malggu-nav-dropdown-item-active {
  background: rgba(255, 107, 53, 0.18);
  color: #fff;
}

@media (max-width: 767px) {
  .malggu-nav-dropdown {
    display: none;
  }
}

.malggu-mobile-market-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 8px;
  border-left: 2px solid rgba(255, 107, 53, 0.35);
  margin: 4px 0 8px;
}

.malggu-actions {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.malggu-mobile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  margin-left: auto;
}

.malggu-mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(5, 5, 9, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.malggu-mobile-menu.open {
  display: block;
}

.malggu-mobile-menu-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .malggu-menu {
    display: flex;
  }
  .malggu-actions {
    display: flex;
  }
  .malggu-mobile-btn {
    display: none;
  }
  .malggu-mobile-menu {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .malggu-nav-inner {
    padding: 0 16px;
  }
}

.malggu-nav .nav-link {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 999px;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}

.malggu-nav .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.malggu-nav .nav-link-active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1);
}

.malggu-mobile-menu-label {
  margin: 8px 0 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.malggu-nav .nav-cta {
  font-size: 15px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 100px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #f2f2f8;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.23, 1, 0.32, 1);
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}

.malggu-nav .nav-cta:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.malggu-nav .nav-cta.profile-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.malggu-nav .nav-ghost-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-family: inherit;
}

.malggu-nav .nav-ghost-btn:hover {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.18);
}

.malggu-nav .nav-coin-chip,
.malggu-mobile-menu .nav-coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 100px;
  border: 1px solid rgba(255, 196, 96, 0.35);
  background: rgba(255, 196, 96, 0.12);
  color: #ffd27a;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.malggu-nav .nav-coin-chip:hover,
.malggu-mobile-menu .nav-coin-chip:hover {
  border-color: rgba(255, 196, 96, 0.55);
  background: rgba(255, 196, 96, 0.18);
}

.malggu-mobile-menu .nav-coin-chip-mobile {
  width: 100%;
  justify-content: center;
  margin: 8px 0 4px;
}

.malggu-coin-panel-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.malggu-coin-panel-backdrop.open {
  display: flex;
}

.malggu-coin-panel {
  width: min(420px, 100%);
  max-height: min(72vh, 560px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #161018;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  color: #f2f2f8;
}

.malggu-coin-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 196, 96, 0.08);
}

.malggu-coin-panel-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

.malggu-coin-panel-head p {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.malggu-coin-panel-close {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.malggu-coin-panel-body {
  padding: 12px 16px 16px;
  overflow-y: auto;
}

.malggu-coin-panel-balance {
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.malggu-coin-panel-balance strong {
  color: #ffd27a;
}

.malggu-coin-refresh,
.malggu-coin-topup {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #f2f2f8;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.malggu-coin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}

.malggu-coin-row:last-child {
  border-bottom: 0;
}

.malggu-coin-row .reason {
  font-weight: 700;
}

.malggu-coin-row .meta {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
}

.malggu-coin-row .delta.pos {
  color: #34d399;
  font-weight: 800;
}

.malggu-coin-row .delta.neg {
  color: #ff8a68;
  font-weight: 800;
}

.malggu-coin-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  padding: 24px 8px;
}

/* Keep coin chip visible on desktop; mobile menu has its own chip */
@media (max-width: 767px) {
  .malggu-nav .malggu-actions .nav-coin-chip:not(.nav-coin-chip-mobile) {
    /* still show a compact chip next to menu when space allows */
  }
}

@media (max-width: 520px) {
  .malggu-nav .malggu-actions .nav-coin-chip {
    padding: 6px 8px;
    font-size: 12px;
  }
}

/* —— Site footer (shared black chrome) —— */
.malggu-footer {
  position: relative;
  margin-top: auto;
  padding-top: 64px;
  background: #000;
  color: #f2f2f8;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  flex-shrink: 0;
  width: 100%;
  order: 1;
}

.malggu-footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 28px 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}

.malggu-footer-brand {
  min-width: 180px;
  max-width: 240px;
}

.malggu-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  margin-bottom: 18px;
}

.malggu-footer-logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(145deg, #ff8a68, #ff6a3d);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.malggu-footer-logo-icon::after {
  content: "M";
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  line-height: 1;
}

.malggu-footer-logo-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.malggu-footer-email {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 14px;
}

.malggu-footer-email:hover {
  color: #fff;
}

.malggu-footer-address {
  font-style: normal;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}

.malggu-footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  flex: 1;
  min-width: 220px;
}

.malggu-footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 120px;
}

.malggu-footer-link {
  color: #f2f2f8;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

.malggu-footer-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.malggu-footer-mark {
  position: absolute;
  right: -2%;
  bottom: -18%;
  font-size: clamp(180px, 28vw, 320px);
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
  z-index: 0;
}

@media (max-width: 640px) {
  .malggu-footer-inner {
    padding: 36px 20px 44px;
    gap: 32px;
  }

  .malggu-footer-cols {
    gap: 28px 36px;
  }
}
