/* Üst bar: gövdeyle uyumlu (tek tema: koyu) */
.dark .hb-site-header,
.hb-site-header {
  background: linear-gradient(
    180deg,
    rgba(8, 8, 14, 0.97) 0%,
    rgba(16, 12, 24, 0.94) 55%,
    rgba(12, 12, 18, 0.92) 100%
  );
  border-bottom-color: rgba(139, 92, 246, 0.18);
  box-shadow:
    0 8px 32px -12px rgba(0, 0, 0, 0.55),
    inset 0 -1px 0 0 rgba(251, 191, 36, 0.07);
}

/* Silik arka plan: yavaş blob + hafif ızgara (reduced-motion: kapalı) */
.hb-ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hb-ambient-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(90deg, rgba(109, 89, 230, 0.35) 1px, transparent 1px),
    linear-gradient(rgba(109, 89, 230, 0.28) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: hb-grid-drift 80s linear infinite;
}

.dark .hb-ambient-bg::before {
  opacity: 0.055;
  background-image:
    linear-gradient(90deg, rgba(155, 140, 255, 0.2) 1px, transparent 1px),
    linear-gradient(rgba(155, 140, 255, 0.15) 1px, transparent 1px);
}

@keyframes hb-grid-drift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(48px, 24px, 0);
  }
}

.hb-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
  will-change: transform;
}

.hb-blob--a {
  width: min(44vw, 380px);
  height: min(44vw, 380px);
  background: #c9bdfc;
  top: -12%;
  left: -8%;
  animation: hb-float-a 32s ease-in-out infinite alternate;
}

.hb-blob--b {
  width: min(38vw, 320px);
  height: min(38vw, 320px);
  background: #d4e8f7;
  top: 20%;
  right: -10%;
  animation: hb-float-b 38s ease-in-out infinite alternate;
}

.hb-blob--c {
  width: min(36vw, 300px);
  height: min(36vw, 300px);
  background: #c5f0e3;
  bottom: -6%;
  left: 15%;
  animation: hb-float-c 28s ease-in-out infinite alternate;
}

.dark .hb-blob {
  opacity: 0.16;
}

.dark .hb-blob--a {
  background: #6d28d9;
}

.dark .hb-blob--b {
  background: #a21caf;
}

.dark .hb-blob--c {
  background: #b45309;
}

/* Koyu temada ek sıcak ışık (logo ile uyumlu mor → fuşya → amber) */
.dark .hb-ambient-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 100% 70% at 0% -5%, rgba(168, 85, 247, 0.28), transparent 58%),
    radial-gradient(ellipse 90% 60% at 100% 5%, rgba(251, 191, 36, 0.14), transparent 52%),
    radial-gradient(ellipse 70% 55% at 50% 105%, rgba(99, 102, 241, 0.14), transparent 55%);
}

@media (prefers-reduced-motion: reduce) {
  .dark .hb-ambient-bg::after {
    background-image:
      radial-gradient(ellipse 100% 70% at 0% -5%, rgba(168, 85, 247, 0.22), transparent 58%),
      radial-gradient(ellipse 90% 60% at 100% 5%, rgba(251, 191, 36, 0.1), transparent 52%),
      radial-gradient(ellipse 70% 55% at 50% 105%, rgba(99, 102, 241, 0.1), transparent 55%);
  }
}

/* Hero üst rozeti: hafif neşeli nabız (yalnızca koyu tema) */
@keyframes hb-hero-pill-glow {
  0%,
  100% {
    box-shadow:
      0 4px 20px -4px rgba(168, 85, 247, 0.35),
      0 0 0 0 rgba(251, 191, 36, 0.12);
  }
  50% {
    box-shadow:
      0 6px 28px -4px rgba(232, 121, 249, 0.4),
      0 0 24px -4px rgba(251, 191, 36, 0.18);
  }
}

.dark .hb-hero-pill {
  animation: hb-hero-pill-glow 5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .dark .hb-hero-pill {
    animation: none;
  }
}

@keyframes hb-float-a {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(4%, 5%, 0) scale(1.05);
  }
}

@keyframes hb-float-b {
  0% {
    transform: translate3d(0, 0, 0) scale(1.03);
  }
  100% {
    transform: translate3d(-4%, 4%, 0) scale(1);
  }
}

@keyframes hb-float-c {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(3%, -4%, 0) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hb-ambient-bg::before {
    animation: none;
  }
  .hb-blob {
    animation: none;
  }
}

/* Screen-reader only until focus */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only:focus,
.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Loading headline pulse */
@keyframes hb-loading-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.hb-loading-text {
  animation: hb-loading-pulse 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hb-loading-text {
    animation: none;
  }
}

/* Skeleton shimmer */
@keyframes hb-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.hb-skeleton {
  border-radius: 0.75rem;
  background: linear-gradient(
    110deg,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0.12) 40%,
    rgba(0, 0, 0, 0.06) 80%
  );
  background-size: 200% 100%;
  animation: hb-shimmer 1.4s ease-in-out infinite;
}

.dark .hb-skeleton {
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.14) 40%,
    rgba(255, 255, 255, 0.06) 80%
  );
  background-size: 200% 100%;
}

@media (prefers-reduced-motion: reduce) {
  .hb-skeleton {
    animation: none;
    background: rgba(0, 0, 0, 0.08);
  }
  .dark .hb-skeleton {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* Button press micro-interaction (reinforced beyond Tailwind active:scale) */
.hb-btn-press {
  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out;
}

.hb-btn-press:active:not(:disabled) {
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  .hb-btn-press:active:not(:disabled) {
    transform: none;
  }
}

/* İlgi önerileri: native <details>, kapalıyken tek satır */
.hb-interest-summary {
  list-style: none;
}

.hb-interest-summary::-webkit-details-marker {
  display: none;
}

.hb-interest-details .hb-interest-chevron {
  transition: transform 0.2s ease;
}

.hb-interest-details[open] .hb-interest-chevron {
  transform: rotate(180deg);
}

.hb-interest-details[open] .hb-interest-summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Haftalık nabız anketi — seçili düğme */
.hb-pulse-rating-btn--on {
  border-color: rgba(232, 121, 249, 0.55) !important;
  background: linear-gradient(
    145deg,
    rgba(109, 89, 230, 0.35),
    rgba(168, 85, 247, 0.2),
    rgba(251, 191, 36, 0.12)
  ) !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 20px -8px rgba(168, 85, 247, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .hb-pulse-rating-btn {
    transition: none;
  }
}

@keyframes hb-badge-pop-in {
  0% {
    opacity: 0;
    transform: scale(0.82) translateY(16px);
  }
  70% {
    opacity: 1;
    transform: scale(1.04) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes hb-badge-pop-out {
  to {
    opacity: 0;
    transform: scale(0.88) translateY(10px);
  }
}

@keyframes hb-badge-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes hb-badge-overlay-out {
  to {
    opacity: 0;
  }
}

.hb-badge-toast-overlay {
  isolation: isolate;
  animation: hb-badge-overlay-in 0.32s ease forwards;
}

/* Strong frost + dim so page content behind the medal stays out of focus */
.hb-badge-toast-backdrop {
  background: rgba(3, 2, 10, 0.82);
  backdrop-filter: blur(36px) saturate(1.2);
  -webkit-backdrop-filter: blur(36px) saturate(1.2);
  transform: translateZ(0);
}

.hb-badge-toast-panel {
  animation: hb-badge-pop-in 0.48s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hb-badge-medal-shell {
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
}

/* Hexagonal medal — classic “rozet” silhouette */
.hb-badge-medal--hex {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.75rem;
  height: 5.75rem;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(
    155deg,
    #c4b5fd 0%,
    #8b5cf6 38%,
    #6d28d9 72%,
    #4c1d95 100%
  );
  box-shadow:
    0 0 0 3px rgba(251, 191, 36, 0.92),
    inset 0 2px 10px rgba(255, 255, 255, 0.22),
    inset 0 -6px 14px rgba(15, 23, 42, 0.35);
}

.hb-badge-medal-icon {
  font-size: 2rem;
  color: #fef3c7;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.hb-badge-toast-overlay.hb-badge-toast--out {
  animation: hb-badge-overlay-out 0.42s ease forwards;
  pointer-events: none;
}

.hb-badge-toast-overlay.hb-badge-toast--out .hb-badge-toast-panel {
  animation: hb-badge-pop-out 0.42s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .hb-badge-toast-overlay {
    animation: none;
    opacity: 1;
  }

  .hb-badge-toast-panel {
    animation: none;
  }

  .hb-badge-toast-overlay.hb-badge-toast--out {
    animation: none;
    opacity: 0;
  }

  .hb-badge-toast-overlay.hb-badge-toast--out .hb-badge-toast-panel {
    animation: none;
    opacity: 0;
  }
}
