/* Portal header — PERITOTO gold / black */
.portal-site-header.site-header {
  background: linear-gradient(180deg, #1a1404 0%, #0a0800 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 2px solid rgba(255, 204, 0, 0.55);
}

.portal-site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  background: linear-gradient(180deg, #1a1404 0%, #0a0800 100%);
  border-bottom: 2px solid rgba(255, 204, 0, 0.55);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.portal-header-inner {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 200px;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 100%;
  min-height: 118px;
}

.portal-logo {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: auto;
  min-height: 118px;
  padding: 8px 22px 8px 14px;
  background-image: linear-gradient(180deg, rgba(255, 204, 0, 0.12), rgba(10, 8, 0, 0.2));
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  text-decoration: none;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: visible;
  box-sizing: border-box;
}

.portal-logo.logo-link:hover {
  transform: none;
}

.portal-logo.logo-link img {
  width: auto;
  max-width: 168px;
  max-height: 76px;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center center;
  margin: 0;
  transform: translateX(8px);
  filter: none;
}

.portal-menu-slide {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-width: 0;
  min-height: 118px;
  overflow: visible;
  margin: 0 auto;
  padding: 6px 8px 8px;
  box-sizing: border-box;
}

.portal-menu-arrow {
  flex: 0 0 26px;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.portal-menu-arrow:hover {
  background: rgba(200, 30, 30, 0.5);
  color: #fff;
}

.portal-menu-viewport {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.portal-menu-viewport::-webkit-scrollbar {
  display: none;
}

.portal-top-menu {
  display: flex;
  align-items: stretch;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  height: auto;
  min-width: max-content;
}

.portal-menu-item {
  position: static;
  flex: 0 0 auto;
}

.portal-menu-item::after {
  content: "";
  position: absolute;
  top: 22%;
  right: 0;
  width: 2px;
  height: 56%;
  background-image: url("../site-header/vertical-separator.png");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.85;
  pointer-events: none;
}

.portal-menu-item {
  position: relative;
}

.portal-menu-item:last-child::after {
  display: none;
}

.portal-menu-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 88px;
  max-width: 118px;
  height: auto;
  min-height: 44px;
  padding: 7px 8px;
  color: #f5e6d8;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-align: center;
  line-height: 1.15;
  transition: color 0.22s, background 0.22s, box-shadow 0.22s;
  border: 2px solid transparent;
  box-sizing: border-box;
}

.portal-menu-link img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  transition: transform 0.22s;
}

.portal-menu-item.is-active .portal-menu-link,
.portal-menu-item:hover .portal-menu-link,
.portal-menu-item:focus-within .portal-menu-link {
  color: #ffb800;
  background: linear-gradient(180deg, rgba(200, 30, 30, 0.22) 0%, rgba(120, 12, 12, 0.62) 100%);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 184, 0, 0.28);
}

.portal-menu-item.is-active .portal-menu-link img,
.portal-menu-item:hover .portal-menu-link img,
.portal-menu-item:focus-within .portal-menu-link img {
  transform: scale(1.06);
}

.portal-menu-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 0 2px;
}

.portal-header-clock {
  margin: 0;
  color: #ffe082;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.3;
}

.portal-header-clock time {
  display: inline;
  margin-left: 6px;
  color: #fff8e7;
}

.portal-header-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  padding: 0 16px 0 10px;
  height: auto;
  min-height: 118px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

.btn-portal-login,
.btn-portal-daftar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
}

.btn-portal-login {
  color: #fff;
  background: linear-gradient(180deg, #5c5c5c, #3a3a3a);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-portal-daftar {
  color: #2a1000;
  background: linear-gradient(135deg, #ffe082, #ffb800, #e65100);
  box-shadow: 0 4px 16px rgba(255, 184, 0, 0.35);
}

.btn-portal-login:hover,
.btn-portal-daftar:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

/* Mega dropdown — fixed full width, menutupi konten di bawah */
.portal-mega-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--portal-mega-top, 130px);
  z-index: 199;
  background: #0a0800;
  border-bottom: 3px solid #ffcc00;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.65);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.portal-mega-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.portal-mega-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.portal-mega-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
  list-style: none;
  margin: 0;
  padding: 22px 4px 28px;
}

.portal-mega-grid > li {
  min-width: 0;
}

.portal-game-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 92px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(90deg, #120404 0%, #1e0a0a 50%, #120404 100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
  text-decoration: none;
  padding: 6px 12px;
  box-sizing: border-box;
}

.portal-game-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 184, 0, 0.55);
  box-shadow: 0 10px 24px rgba(229, 57, 53, 0.3);
}

.portal-game-pill img {
  width: auto;
  max-width: 100%;
  height: 78px;
  max-height: 78px;
  min-height: 64px;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
}

.portal-game-source {
  display: none !important;
}

.portal-site-header.is-scrolled {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

.portal-site-header.is-mega-open {
  border-bottom-color: #ffcc00;
}

body.portal-mega-active {
  overflow: clip;
}

@media (max-width: 1100px) {
  .portal-header-inner {
    grid-template-columns: 220px minmax(0, 1fr) 200px;
  }

  .portal-mega-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portal-game-pill {
    height: 84px;
  }

  .portal-game-pill img {
    height: 70px;
    max-height: 70px;
    min-height: 56px;
  }
}

@media (max-width: 900px) {
  .portal-header-inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    min-height: 0;
  }

  .portal-logo {
    grid-column: 1;
    grid-row: 1;
    height: 80px;
    border-right: none;
    justify-content: flex-end;
    padding: 8px 18px 8px 12px;
  }

  .portal-logo.logo-link img {
    max-width: 150px;
    max-height: 68px;
    transform: translateX(6px);
  }

  .portal-header-auth {
    grid-column: 2;
    grid-row: 1;
    height: 80px;
    min-height: 80px;
    border-left: none;
    background: transparent;
    justify-content: flex-end;
  }

  .portal-menu-slide {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 0;
    padding: 0 4px 8px;
    justify-content: stretch;
  }

  .portal-top-menu {
    height: auto;
  }

  .portal-menu-link {
    height: auto;
    min-height: 40px;
    max-width: 104px;
  }

  .portal-mega-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .portal-mega-grid {
    grid-template-columns: 1fr;
  }

  .btn-portal-login,
  .btn-portal-daftar {
    min-width: 72px;
    padding: 8px 12px;
    font-size: 10px;
  }

  .portal-header-auth {
    padding: 0 10px;
    gap: 6px;
  }
}
