/* =========================================================
   ALICACA STORE - NAVIBAR CSS (Transparent Navbar) - siap tempel
   ========================================================= */

/* =========================
   THEME TOKENS (fallback)
========================= */
:root{
  --bg: #0b1220;
  --panel: #0f172a;
  --panel-2: #101a2e;
  --text: #e5e7eb;
  --muted: #a3a9b7;
  --brand-1: #4DA6FF;
  --brand-2: #00ffe7;
  --accent: #FFD700;
  --danger: #ff5b6b;
  --radius: 14px;
  --shadow: 0 12px 28px rgba(0,0,0,.35);
}

/* =========================
   NAVBAR LAYERING & BASICS
========================= */
.navbar.sticky-top { z-index: 1040; }    /* pastikan di atas slider/hero */
.hero-slider .overlay { pointer-events: none; } /* jangan halangi klik navbar */

/* =========================
   NAVBAR TRANSPAREN & BLUR
========================= */
.navbar,
.navbar.bg-dark,
.navbar-dark{
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
.navbar{
  border-bottom: 1px solid rgba(26, 37, 64, .35) !important;
  -webkit-backdrop-filter: saturate(115%) blur(4px);
  backdrop-filter: saturate(115%) blur(4px);
  top: 0;
}
.navbar .container{ padding-top: 8px; padding-bottom: 8px; }

/* =========================
   BRAND
========================= */
.navbar-brand {
  font-family: 'Orbitron', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .5px;
  color: #fff !important;
  text-transform: uppercase;
  font-size: clamp(30px, 5.2vw, 34px);
  text-shadow: 0 0 8px rgba(0, 255, 231, 0.6),
               0 0 16px rgba(0, 255, 231, 0.4),
               0 0 24px rgba(0, 255, 231, 0.2);
  animation: neonGlow 2.5s ease-in-out infinite alternate;
  transition: all 0.4s ease-in-out;
}
.navbar-brand:hover {
  opacity: 1;
  transform: scale(1.05);
  background: linear-gradient(90deg, #00ffe7, #00aaff, #ff00ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
@keyframes neonGlow {
  from {
    text-shadow: 0 0 6px rgba(0, 255, 231, 0.5),
                 0 0 12px rgba(0, 255, 231, 0.3),
                 0 0 18px rgba(0, 255, 231, 0.1);
  }
  to {
    text-shadow: 0 0 10px rgba(0, 255, 231, 0.8),
                 0 0 20px rgba(0, 255, 231, 0.6),
                 0 0 30px rgba(0, 255, 231, 0.4);
  }
}

/* =========================
   TOGGLER (Bootstrap 5)
========================= */
.navbar-toggler{
  border-color: rgba(255,255,255,.25);
  padding: .35rem .5rem;
  border-radius: 10px;
}
.navbar-dark .navbar-toggler-icon{
  background-image: none;
  position: relative;
  width: 1.5rem;
  height: 1.2rem;
}
.navbar-dark .navbar-toggler-icon::before,
.navbar-dark .navbar-toggler-icon::after,
.navbar-dark .navbar-toggler-icon span{
  content:"";
  position:absolute;
  left:0; right:0;
  height:2px;
  background: var(--text);
  border-radius:2px;
}
.navbar-dark .navbar-toggler-icon::before{ top:0; }
.navbar-dark .navbar-toggler-icon::after{ bottom:0; }
.navbar-dark .navbar-toggler-icon span{ top: calc(50% - 1px); }

/* =========================
   NAV LINKS
========================= */
.navbar .nav-link{
  color: #d9dfec !important;
  font-weight: 600;
  letter-spacing: .2px;
  padding: .5rem .6rem;
  border-radius: 10px;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.navbar .nav-link:hover{
  color: #fff !important;
  background: rgba(0,255,231,.08);
  box-shadow: inset 0 0 0 1px rgba(0,255,231,.18);
}

/* =========================
   DROPDOWN
========================= */
.navbar .dropdown-menu{
  background: #0f1629;
  border: 1px solid #203052;
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow);
  min-width: 240px;
}
.navbar .dropdown-item{
  color: #d7def0;
  border-radius: 8px;
  padding: .55rem .7rem;
}
.navbar .dropdown-item:hover{
  background: rgba(77,166,255,.12);
  color: #fff;
}
/* Icon kecil di kiri item dropdown */
.dropdown-menu .game-item { gap: .5rem; }
.dropdown-menu .game-icon{
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(25,30,47,.65);
  box-shadow: 0 0 6px rgba(0,255,231,.25);
  flex: 0 0 22px;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.dropdown-menu .dropdown-item:hover .game-icon{
  transform: translateX(2px);
  box-shadow: 0 0 10px rgba(0,255,231,.55);
  filter: brightness(1.05);
}

/* =========================
   AUTH BUTTONS
========================= */
.navbar .btn{
  font-weight: 700;
  border-radius: 999px;
}
.navbar .btn-light{
  color: #041225;
  background: linear-gradient(90deg, var(--brand-2), var(--brand-1));
  border: none;
}
.navbar .btn-outline-light{
  color: #dbe7ff;
  border-color: #2a3959;
  background: #0f172a;
}
.navbar .btn-outline-light:hover{
  background: rgba(0,255,231,.08);
  border-color: var(--brand-2);
}

/* =========================
   NOTIFICATION BELL + BADGE
========================= */
#notif-bell{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #191e2f;
  box-shadow: 0 0 8px #00ffe744 inset;
}
#notif-badge{
  position: absolute;
  top: -4px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: linear-gradient(180deg, #ff6b6b, #ff3b3b);
  color: #fff;
  border: 2px solid #0f172a;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  display: none; /* di-toggle via JS */
  line-height: 14px;
  text-align: center;
}
#notif-bell.animate{ animation: ring .5s ease; }
@keyframes ring{
  0% { transform: rotate(0); }
  20%{ transform: rotate(-12deg); }
  40%{ transform: rotate(10deg); }
  60%{ transform: rotate(-8deg); }
  80%{ transform: rotate(6deg); }
  100%{ transform: rotate(0); }
}

/* =========================
   PROFILE MODAL (overlay + card)
========================= */
#profile-modal-overlay{
  overflow: auto;                      /* <— penting */
  padding: 12px;
  position: fixed; inset: 0;
  display: none;                 /* JS: 'block' saat dibuka */
  z-index: 11000;
  background: rgba(8,13,25,.55);
}

/* Card diposisikan absolut oleh JS (top/left) */
.profile-modal-card{
  overflow: auto;                       /* scroll isi kartu jika perlu */
  will-change: top, left;          
  position: absolute;
  width: min(360px, calc(100vw - 24px));
  background: var(--panel);
  border: 1px solid #21314f;
  border-radius: 16px;
  box-shadow: var(--shadow); 
}

/* Cover gradasi */
.profile-modal-cover{
  height: 86px;
  background: linear-gradient(100deg, rgba(34,211,238,.33), rgba(168,85,247,.33));
  border-bottom: 1px solid #2c2142;
}

/* Avatar tumpang tindih cover */
.profile-avatar{
  width: 76px; height: 76px;
  border-radius: 50%;
  border: 2px solid var(--brand-2);
  background: #0d1322;
  display: block;
  margin: -38px auto 6px; /* naik setengah tinggi untuk overlap cover */
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  object-fit: cover;
}
.profile-avatar:hover {
  box-shadow: 0 0 0 5px #ff00e799, 0 2px 22px #00ffe7cc;
}
/* Hover: glow + sedikit tilt */
@media (hover:hover){
  .profile-avatar:hover{
    transform: translateY(-2px) scale(1.03) rotate(.4deg);
    box-shadow: 0 0 0 5px #ff00e799, 0 2px 22px #00ffe7cc; /* sesuai permintaan */
    filter: saturate(1.06);
    animation: avatarPulse 1.8s ease-in-out infinite;
  }
}

/* Denyut glow */
@keyframes avatarPulse{
  0%,100% { box-shadow: 0 0 0 4px #ff00e766, 0 2px 18px #00ffe799; }
  50%     { box-shadow: 0 0 0 6px #ff00e7aa, 0 4px 26px #00ffe7cc; }
}

/* Kurangi animasi untuk preferensi aksesibilitas */
@media (prefers-reduced-motion: reduce){
  .profile-avatar{ transition: none; }
  .profile-avatar:hover{ animation: none; transform: none; }
}

/* Konten */
.profile-modal-content{ padding: 8px 14px 14px; }
.profile-title{
  text-align: center;
  font-weight: 800;
  letter-spacing: .3px;
  margin-bottom: 8px;
  font-size: 16px;
}
.profile-title a:hover{ text-decoration: underline; }

/* Body rows */
.profile-modal-body{
  background: #0f1629;
  border: 1px solid #203052;
  border-radius: 12px;
  padding: 10px;
}
.profile-modal-row{
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px 12px;
  align-items: center;
  padding: 8px 2px;
  border-bottom: 1px dashed #1f2a44;
}
.profile-modal-row:last-child{ border-bottom: 0; }
.profile-modal-row .label{
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
}
.profile-modal-row .value{
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  overflow-wrap: anywhere;
}
/* Lebar kolom label seragam; sesuaikan jika mau */
.profile-modal-body{
  --label-col: clamp(140px, 22ch, 200px); /* muat "Alicaca Gems" */
}

/* 3 kolom: [Label] [ : ] [Value] */
.profile-modal-row{
  display: grid;
  grid-template-columns: var(--label-col) 14px 1fr;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 6px;
  border-bottom: 1px dashed #1f2a44;
}
.profile-modal-row:last-child{ border-bottom: 0; }

/* Tambahkan titik dua di kolom tengah (jangan tulis ":" di HTML) */
.profile-modal-row::before{
  grid-column: 2;
  color: #cfd7eb;
  opacity: .9;
  text-align: center;
}

/* Label di kolom 1 */
.profile-modal-row .label{
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;        /* biar rata & tidak turun baris */
  color: #aeb6cc;
  font-weight: 700;
  font-size: 13px;
}

/* Value di kolom 3 */
.profile-modal-row .value{
  grid-column: 3;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  overflow-wrap: anywhere;    /* jaga-jaga kalau email super panjang */
}

/* Ikon label ukuran seragam agar tidak geser-geser */
.profile-modal-row .label .fa-solid{
  width: 16px;
  text-align: center;
}

/* Mobile: boleh wrap agar tidak meluber */
@media (max-width: 575.98px){
  .profile-modal-body{ --label-col: 120px; }
  .profile-modal-row .value{ white-space: normal; }
}

/* Footer */
.profile-modal-footer{
  display: flex;
  justify-content: center;
  margin-top: 10px;
}
.logout-btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  background: #0f172a;
  color: var(--text);
  border: 1px solid #2a3959;
  transition: transform .12s ease, box-shadow .22s ease, border-color .22s ease;
}
.logout-btn:hover{
  border-color: var(--brand-2);
  box-shadow: 0 12px 24px rgba(0,255,231,.12);
  transform: translateY(-1px);
}

/* =========================
   RESPONSIVE TWEAKS
========================= */
@media (max-width: 991.98px){
  .navbar .navbar-nav{ gap: 2px; }
  .navbar .nav-link{ padding: .5rem .55rem; }
}

@media (max-width: 575.98px){
  .navbar-brand{
    font-size: 13px;
    line-height: 1.2;
  }
  .profile-modal-card{
    width: min(360px, calc(100vw - 16px));
  }
}
/* === Profile modal: fleksibel mengikuti panjang email (desktop) === */
@media (min-width: 992px){
  .profile-modal-card{
    /* shrink-wrap ke konten */
    width: -moz-fit-content;
    width: fit-content;
    max-width: calc(100vw - 20px);   /* jangan lebih lebar dari viewport */
    min-width: 360px;                /* baseline biar tidak terlalu kecil */
    overflow-x: auto;                /* kalau email ekstrapanjang tetap tidak terpotong */
    overscroll-behavior: contain;
  }

  /* Grid label–value lebih pas untuk konten tanpa wrap */
  .profile-modal-row{
    grid-template-columns: max-content max-content; /* lebar mengikuti konten */
    column-gap: 12px;
  }

  /* Jangan wrap email & nilai lain */
  .profile-modal-row .value,
  .profile-modal-row .label{
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }
}

/* === Mobile: tetap nyaman dibaca (wrap normal) === */
@media (max-width: 991.98px){
  .profile-modal-card{
    width: min(360px, calc(100vw - 16px)); /* seperti sebelumnya, responsif */
    max-width: calc(100vw - 16px);
    overflow-x: hidden;                    /* tidak perlu scroll horizontal */
  }
  .profile-modal-row{
    grid-template-columns: 1fr 1.2fr;      /* layout semula */
  }
  .profile-modal-row .value{
    white-space: normal;                   /* boleh wrap di HP */
    word-break: break-word;
  }
}

/* (opsional) scrollbar halus jika memang harus scroll horizontal pada desktop */
.profile-modal-card::-webkit-scrollbar{ height: 8px; }
.profile-modal-card::-webkit-scrollbar-thumb{
  background: #2a3347; border-radius: 999px;
}

/* =========================
   ACCESSIBILITY & SAFE-AREA
========================= */
.navbar .nav-link:focus-visible,
.logout-btn:focus-visible{
  outline: 2px solid var(--brand-1);
  outline-offset: 2px;
}
@supports (padding: max(0px)){
  .navbar{ padding-top: max(0px, env(safe-area-inset-top)); }
  #profile-modal-overlay{ padding-bottom: max(0px, env(safe-area-inset-bottom)); }
}