@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --night: #0b0d26;
  --spring: #19c3a0;
  --glow: #5ff0cb;
  --sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --logo: "Poppins", "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  --tabs: 44px;
}

.tabs {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 990;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-left: env(safe-area-inset-left, 0px);
}

.tabs a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--tabs);
  min-width: var(--tabs);
  max-width: var(--tabs);
  width: auto;
  padding: 0;
  color: #fff;
  font: 600 14px/1 var(--logo);
  text-decoration: none;
  border-radius: 0 12px 12px 0;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(11, 13, 38, 0.18);
  transform-origin: left center;
  transition:
    max-width 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

.tabs .tab-short {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--tabs);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 16.5px/1 var(--logo);
  letter-spacing: -0.01em;
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.16s ease,
    transform 0.2s ease;
  pointer-events: none;
}

.tabs .tab-full {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 16px;
  padding-right: 18px;
  white-space: nowrap;
  font: 600 14px/1 var(--logo);
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateX(-12px);
  transition:
    opacity 0.22s ease 0.05s,
    transform 0.26s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
  pointer-events: none;
}

/* Hover & Focus State */
.tabs a:hover,
.tabs a:focus-visible {
  max-width: 280px;
  transform: scale(1.08);
  z-index: 50;
  outline: none;
  color: #fff;
  text-decoration: none;
}

.tabs a:hover .tab-short,
.tabs a:focus-visible .tab-short {
  opacity: 0;
  transform: scale(0.65);
}

.tabs a:hover .tab-full,
.tabs a:focus-visible .tab-full {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Click (Active) State */
.tabs a:active {
  transform: scale(0.94) !important;
  transition: transform 0.08s ease;
}

/* Current Page Active State */
.tabs a[aria-current="page"],
.tabs a.active {
  transform: scale(1.06);
  z-index: 40;
}

.tabs a[aria-current="page"]:hover,
.tabs a[aria-current="page"]:focus-visible,
.tabs a.active:hover,
.tabs a.active:focus-visible {
  transform: scale(1.08);
  z-index: 50;
}

/* Tab Colors & Themed Shadows */
.tabs .t1 {
  background: #5b7cf0;
  box-shadow:
    0 0 0 1px rgba(155, 179, 255, 0.45),
    0 4px 14px rgba(11, 13, 38, 0.18);
}
.tabs .t1:hover,
.tabs .t1:focus-visible,
.tabs .t1[aria-current="page"],
.tabs .t1.active {
  box-shadow:
    0 0 0 2px #9bb3ff,
    0 8px 24px -4px rgba(91, 124, 240, 0.65),
    0 2px 6px rgba(0, 0, 0, 0.12);
}

.tabs .t2 {
  background: #f0335f;
  box-shadow:
    0 0 0 1px rgba(255, 133, 161, 0.45),
    0 4px 14px rgba(11, 13, 38, 0.18);
}
.tabs .t2:hover,
.tabs .t2:focus-visible,
.tabs .t2[aria-current="page"],
.tabs .t2.active {
  box-shadow:
    0 0 0 2px #ff85a1,
    0 8px 24px -4px rgba(240, 51, 95, 0.65),
    0 2px 6px rgba(0, 0, 0, 0.12);
}

.tabs .t3 {
  background: #f6b500;
  color: #2a2100 !important;
  box-shadow:
    0 0 0 1px rgba(255, 221, 102, 0.55),
    0 4px 14px rgba(11, 13, 38, 0.18);
}
.tabs .t3,
.tabs .t3 .tab-short,
.tabs .t3 .tab-full {
  color: #2a2100 !important;
}
.tabs .t3:hover,
.tabs .t3:focus-visible,
.tabs .t3[aria-current="page"],
.tabs .t3.active {
  box-shadow:
    0 0 0 2px #ffe066,
    0 8px 24px -4px rgba(246, 181, 0, 0.65),
    0 2px 6px rgba(0, 0, 0, 0.12);
}

.tabs .t4 {
  background: #7a3fe0;
  box-shadow:
    0 0 0 1px rgba(180, 140, 255, 0.45),
    0 4px 14px rgba(11, 13, 38, 0.18);
}
.tabs .t4:hover,
.tabs .t4:focus-visible,
.tabs .t4[aria-current="page"],
.tabs .t4.active {
  box-shadow:
    0 0 0 2px #b48cff,
    0 8px 24px -4px rgba(122, 63, 224, 0.65),
    0 2px 6px rgba(0, 0, 0, 0.12);
}

.tabs .t5 {
  background: linear-gradient(135deg, #19c3a0, #0e7c72);
  box-shadow:
    0 0 0 1px rgba(95, 240, 203, 0.3),
    0 16px 34px -12px rgba(25, 195, 160, 0.75);
}
.tabs .t5:hover,
.tabs .t5:focus-visible,
.tabs .t5[aria-current="page"],
.tabs .t5.active {
  box-shadow:
    0 0 0 2px var(--spring),
    0 10px 28px -4px rgba(95, 240, 203, 0.3);
}
.tabs .t5 .new {
  display: inline-block;
  background: var(--glow);
  color: var(--night);
  font: 800 9.5px/1 var(--sans);
  letter-spacing: 0.06em;
  padding: 3px 6px;
  border-radius: 4px;
  margin-left: 2px;
  vertical-align: middle;
}

@media (prefers-reduced-motion: reduce) {
  .tabs,
  .tabs * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.tabs:empty {
  display: none;
}

@media (max-width: 860px) {
  :root {
    --tabs: 0px;
    --tabs-bar: 76px;
  }

  /* Mobile bottom tab navigation */
  .tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    transform: none;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 8px 12px 0 !important;
    background: #fff;
    border-top: 1px solid #eee;
    border-bottom: none;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    box-sizing: border-box;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .container-fluid > .tabs {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  /* Individual tabs */
  .tabs a {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: 76px !important;
    height: auto;
    min-height: 62px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 4px !important;
    border-radius: 17px 17px 0 0;
    writing-mode: horizontal-tb;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    transform: none !important;
    box-shadow: none;
    box-sizing: border-box;
  }

  /* Two-line tab labels */
  .tabs .tab-short {
    display: none !important;
  }

  .tabs .tab-full {
    display: inline-block !important;
    width: 100%;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-align: center;
    font-size: 12px;
    line-height: 1.3;
    opacity: 1 !important;
    transform: none !important;
    padding: 0 !important;
    pointer-events: auto !important;
  }

  /* Active tab */
  .tabs a[aria-current="page"],
  .tabs a.active {
    transform: none !important;
  }

  .tabs .t5 {
    order: -1;
  }

  .tabs .t5 .new {
    display: inline-block;
    font-size: 8.5px;
    padding: 2px 5px;
    margin-left: 0;
    margin-top: 2px;
    transform: none;
  }

  /* Keep page content visible above navigation */
  body {
    padding-bottom: calc(var(--tabs-bar) + env(safe-area-inset-bottom));
  }
}

@media (max-width: 430px) {
  :root {
    --tabs-bar: 68px;
  }

  .tabs {
    gap: 5px;
    padding: 8px 6px 0 !important;
  }

  .tabs a {
    min-height: 56px;
    padding: 6px 2px !important;
    border-radius: 14px 14px 0 0;
    font-size: 10.5px;
    line-height: 1.25;
  }

  .tabs .tab-full {
    font-size: 10.5px;
    line-height: 1.25;
  }

  .tabs .t5 .new {
    font-size: 8px;
    padding: 2px 4px;
  }
}
@media (min-width: 861px) and (hover: hover) {
  .tabs a {
    transition:
      max-width 0.32s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
      box-shadow 0.25s ease,
      opacity 0.22s ease,
      filter 0.22s ease;
  }

  /* Dim all non-hovered tabs when one tab is hovered */
  .tabs:has(a:hover) a:not(:hover) {
    opacity: 0.85;
    filter: saturate(0.75);
    transform: scale(0.96);
  }

  /* Keep the hovered tab crisp and forward */
  .tabs a:hover {
    opacity: 1;
    filter: none;
  }
}
