/* ============================================================
   MYSTIC ORACLE — tabs.css
   Floating Pill Navigation dengan Glow + Mystical Aura Effect
   Menggantikan slider biasa yang terlalu basic
   ============================================================ */

/* ── Wrapper nav ── */
.tabs {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  margin: 18px 0 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;           /* Firefox */
  -ms-overflow-style: none;        /* IE/Edge */
  position: relative;

  /* Floating card background */
  background: rgba(15, 8, 35, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-radius: 50px;
  border: 1px solid rgba(147, 91, 255, 0.22);
  box-shadow:
    0 4px 30px rgba(100, 40, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tabs::-webkit-scrollbar {
  display: none;                   /* Chrome/Safari */
}

/* Fade mask kiri-kanan biar kelihatan ada konten tersembunyi */
.tabs::before,
.tabs::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
}
.tabs::before {
  left: 0;
  background: linear-gradient(90deg, rgba(15, 8, 35, 0.85) 0%, transparent 100%);
}
.tabs::after {
  right: 0;
  background: linear-gradient(-90deg, rgba(15, 8, 35, 0.85) 0%, transparent 100%);
}

/* ── Tab Button ── */
.tab {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border-radius: 40px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(200, 180, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  transition:
    color          0.25s ease,
    background     0.25s ease,
    border-color   0.25s ease,
    box-shadow     0.25s ease,
    transform      0.18s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Emoji icon sedikit lebih besar */
.tab::first-letter {
  font-size: 15px;
}

/* ── Hover State ── */
.tab:hover:not(.active) {
  color: rgba(220, 200, 255, 0.9);
  background: rgba(147, 91, 255, 0.1);
  border-color: rgba(147, 91, 255, 0.25);
  transform: translateY(-1px);
}

/* ── Active / Selected State ── */
.tab.active {
  background: linear-gradient(135deg, #7c3aed 0%, #4f1d9e 60%, #9333ea 100%);
  color: #ffffff;
  border-color: rgba(167, 139, 250, 0.5);
  font-weight: 600;
  transform: translateY(-1px);
  
  /* Multi-layer glow: aura luar + inner highlight */
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.3),
    0 0 12px rgba(124, 58, 237, 0.7),
    0 0 28px rgba(124, 58, 237, 0.35),
    0 0 50px rgba(147, 91, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* Shimmer kecil di atas button aktif */
.tab.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  border-radius: 999px;
}

/* ── Focus visible (aksesibilitas keyboard) ── */
.tab:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.8);
  outline-offset: 2px;
}

/* ── Pulse animasi saat tab pertama kali aktif ── */
@keyframes tabPulse {
  0%   { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.6); }
  60%  { box-shadow: 0 0 0 10px rgba(124, 58, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}

.tab.active.just-activated {
  animation: tabPulse 0.55s ease-out;
}

/* ── Scroll indicator dots (opsional visual hint) ── */
.tabs-scroll-hint {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
}

.tabs-scroll-hint span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(147, 91, 255, 0.3);
  transition: background 0.2s;
}

.tabs-scroll-hint span.active {
  background: rgba(147, 91, 255, 0.9);
  width: 12px;
  border-radius: 2px;
}

/* ── Responsive Mobile ── */
@media (max-width: 600px) {
  .tabs {
    padding: 5px 6px;
    gap: 4px;
    border-radius: 40px;
    margin: 14px 0 16px;
  }

  .tab {
    padding: 8px 12px;
    font-size: 12px;
    gap: 4px;
  }

  /* Di mobile, emoji saja tanpa teks jika layar sangat kecil */
  @media (max-width: 380px) {
    .tab span.tab-label {
      display: none;
    }
    .tab {
      padding: 9px 11px;
      font-size: 16px;
    }
  }
}

/* ── Light mode overrides ── */
body.light .tabs {
  background: rgba(240, 235, 255, 0.82);
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow:
    0 4px 24px rgba(100, 40, 200, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.light .tabs::before {
  background: linear-gradient(90deg, rgba(240, 235, 255, 0.9) 0%, transparent 100%);
}
body.light .tabs::after {
  background: linear-gradient(-90deg, rgba(240, 235, 255, 0.9) 0%, transparent 100%);
}

body.light .tab {
  color: rgba(80, 40, 160, 0.65);
}

body.light .tab:hover:not(.active) {
  color: rgba(80, 40, 160, 0.9);
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.2);
}

body.light .tab.active {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  box-shadow:
    0 0 12px rgba(124, 58, 237, 0.45),
    0 2px 8px rgba(124, 58, 237, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}