@keyframes bw-rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
@keyframes bw-pop {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: none; }
}
@keyframes bw-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes bw-modal {
  from { opacity: 0; transform: translateY(16px) scale(0.92); }
  to { opacity: 1; transform: none; }
}
@keyframes bw-slide-up {
  from { opacity: 0; transform: translateY(100px); }
  to { opacity: 1; transform: none; }
}
@keyframes bw-wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
}
@keyframes bw-spin {
  to { transform: rotate(360deg); }
}
@keyframes bw-shimmer {
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}
@keyframes bw-score-in {
  from { opacity: 0; transform: scale(1.2); }
  to { opacity: 1; transform: none; }
}

.bw-rise { animation: bw-rise 0.45s ease both; }
.bw-rise-late { animation: bw-rise 0.45s ease 0.2s both; }
.bw-pop { animation: bw-pop 0.8s cubic-bezier(0.22, 1.15, 0.36, 1) both; }
.bw-fade { animation: bw-fade 0.3s ease both; }
.bw-modal { animation: bw-modal 0.4s cubic-bezier(0.22, 1.15, 0.36, 1) both; }
.bw-slide-up { animation: bw-slide-up 0.35s ease both; }
.bw-wobble { animation: bw-wobble 2s ease-in-out infinite; }
.bw-spin { animation: bw-spin 2s linear infinite; }
.bw-delay-2 { animation-delay: 0.2s; }
.bw-delay-4 { animation-delay: 0.4s; }
.bw-delay-6 { animation-delay: 0.6s; }
.bw-score-in { animation: bw-score-in 0.35s ease both; }
.bw-shimmer {
  background-image: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: bw-shimmer 2s linear infinite;
}
.bw-grow { transition: width 0.7s ease; }
.bw-marker { transition: left 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.bw-panel-exit { transition: transform 0.28s ease, opacity 0.28s ease; }

.bw-topbar { position: sticky; top: 0; z-index: 80; }
.bw-nav-link {
  display: inline-flex;
  align-items: center;
  margin-left: 1.35rem;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  padding: 0.2rem 0.05rem;
  white-space: nowrap;
  transition: color 0.15s ease, font-weight 0.15s ease, text-shadow 0.15s ease;
}
.bw-nav-link:hover,
.bw-nav-link.is-current {
  color: #0f172a;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}
.bw-topbar .bw-nav-row { position: relative; padding-right: 52px; }
.bw-nav-toggle {
  position: absolute;
  top: 12px;
  right: 0;
  z-index: 100;
  width: 42px;
  height: 42px;
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  visibility: visible !important;
  opacity: 1 !important;
}
.bw-nav-toggle span {
  display: block !important;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: #0f172a;
  opacity: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.bw-nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.bw-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.bw-nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.bw-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 70;
}
.bw-nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
.bw-side-menu {
  position: fixed;
  top: 64px;
  right: 0;
  z-index: 75;
  width: min(320px, 88vw);
  height: calc(100% - 64px);
  margin: 0;
  padding: 1.75rem 1.5rem 2rem;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.08);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
}
.bw-side-menu.is-open { transform: translateX(0); }
.bw-menu-link {
  display: block;
  padding: 0.9rem 0.1rem;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.15s ease, font-weight 0.15s ease, text-shadow 0.15s ease;
}
.bw-menu-link:hover,
.bw-menu-link.is-current {
  color: #0f172a;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}
@media (max-width: 959px) {
  a.bw-nav-link { display: none; }
}
@media (min-width: 960px) {
  .bw-menu-page { display: none; }
}
