/**
 * KH MAX Vitrin — header CTA, profil dropdown, boost badge
 */

.kh-max-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
  z-index: 100020;
}

/* KH MAX CTA */
.kh-max-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0b1020;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 45%, #00d4ff 100%);
  box-shadow:
    0 0 24px rgba(251, 191, 36, 0.35),
    0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.kh-max-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 32px rgba(0, 212, 255, 0.45),
    0 12px 28px rgba(0, 0, 0, 0.35);
}

.kh-max-cta__glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-120%);
  animation: kh-max-shine 3.5s ease-in-out infinite;
}

@keyframes kh-max-shine {
  0% { transform: translateX(-120%); }
  55%, 100% { transform: translateX(120%); }
}

/* Profil dropdown */
.kh-max-profile {
  position: relative;
}

.kh-max-profile__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kh-max-profile__toggle:hover,
.kh-max-profile.is-open .kh-max-profile__toggle {
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.kh-max-profile__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 212, 255, 0.35);
}

.kh-max-profile__avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(59, 130, 246, 0.2);
}

.kh-max-profile__badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fbbf24;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kh-max-profile__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(10, 14, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 100020;
}

.kh-max-profile__head {
  margin-bottom: 10px;
}

.kh-max-profile__name {
  display: block;
  font-size: 0.95rem;
}

.kh-max-profile__tier {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: #fbbf24;
  font-weight: 700;
}

.kh-max-profile__wallet {
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.kh-max-profile__wallet-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  padding: 4px 0;
}

.kh-max-profile__wallet-row strong {
  color: #00d4ff;
}

.kh-max-profile__links {
  display: grid;
  gap: 6px;
}

.kh-max-profile__links a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #e2e8f0;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.kh-max-profile__links a:hover {
  background: rgba(59, 130, 246, 0.15);
}

.kh-max-profile__guest {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.kh-max-profile__login {
  display: block;
  text-align: center;
}

/* Single boost badge */
.kh-max-boost-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(239, 68, 68, 0.12));
  border: 1px solid rgba(251, 191, 36, 0.45);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Okuma tracker chip */
.kh-reading-tracker-v5 {
  position: fixed;
  right: 16px;
  bottom: 88px;
  z-index: 9000;
  width: 120px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(10, 14, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.kh-reading-tracker-v5__fill {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #00d4ff);
  width: 0;
  transition: width 0.2s ease;
}

.kh-reading-tracker-v5__label {
  display: block;
  margin-top: 6px;
  font-size: 0.68rem;
  color: #94a3b8;
  text-align: center;
}

.kh-reading-tracker-v5.is-qualified {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

.kh-reading-tracker-v5.is-qualified .kh-reading-tracker-v5__label {
  color: #fbbf24;
}

/* Daily boost homepage */
.kh-daily-boost {
  margin-bottom: 2rem;
}

.kh-daily-boost__panel {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.08), rgba(10, 14, 28, 0.92) 55%);
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.kh-daily-boost__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.kh-daily-boost__eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fbbf24;
  margin-bottom: 6px;
}

.kh-daily-boost__title {
  margin: 0 0 6px;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}

.kh-daily-boost__sub {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.kh-daily-boost__multiplier {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fbbf24;
}

.kh-daily-boost__coin {
  font-size: 1.2rem;
}

.kh-daily-boost__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.kh-daily-boost__card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  animation: kh-boost-card-glow 3s ease-in-out infinite;
}

@keyframes kh-boost-card-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(251, 191, 36, 0); }
  50% { box-shadow: 0 0 22px rgba(251, 191, 36, 0.18); }
}

.kh-daily-boost__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(251, 191, 36, 0.15);
}

.kh-daily-boost__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.kh-daily-boost__media {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
}

.kh-daily-boost__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kh-daily-boost__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.92);
  color: #0b1020;
  font-size: 0.72rem;
  font-weight: 800;
}

.kh-daily-boost__body {
  padding: 12px 14px 14px;
}

.kh-daily-boost__story-title {
  margin: 0 0 8px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.kh-daily-boost__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

@media (max-width: 900px) {
  .kh-daily-boost__grid {
    grid-template-columns: 1fr;
  }

  .kh-max-profile__badge {
    display: none;
  }

  .kh-reading-tracker-v5 {
    right: 12px;
    bottom: 76px;
    width: 100px;
  }
}

@media (max-width: 1024px) {
  .kh-max-cta__label {
    display: none;
  }

  .kh-max-cta {
    padding: 10px 12px;
  }
}

/* Profil boost uyarısı */
.kh-max-profile__boost-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(239, 68, 68, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.45);
  font-size: 0.78rem;
  font-weight: 700;
  color: #fbbf24;
  animation: kh-boost-pulse 2.4s ease-in-out infinite;
}

.kh-sidebar-boost-wrap {
  margin-bottom: 1rem;
}

.kh-sb-boost {
  border-color: rgba(251, 191, 36, 0.28) !important;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.06), rgba(255, 255, 255, 0.02)) !important;
}

.kh-sb-boost__sub {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
}

.kh-sb-boost__pulse {
  animation: kh-boost-pulse 2.4s ease-in-out infinite;
}

.kh-sb-boost__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.kh-sb-boost__link {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.kh-sb-boost__link:hover {
  border-color: rgba(251, 191, 36, 0.4);
  transform: translateX(3px);
}

.kh-sb-boost__media {
  width: 56px;
  height: 56px;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.kh-sb-boost__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kh-sb-boost__title {
  display: block;
  font-size: 0.82rem;
  line-height: 1.3;
}

.kh-sb-boost__tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fbbf24;
}

/* Toast bildirimleri */
.kh-toast-stack {
  position: fixed;
  top: calc(var(--kh-header-fixed-h, 80px) + 12px);
  right: 16px;
  z-index: 100050;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.kh-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(5, 8, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: auto;
}

.kh-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.kh-toast--success {
  border-color: rgba(34, 197, 94, 0.45);
}

.kh-toast--boost {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 20px 40px rgba(251, 191, 36, 0.12);
}

.kh-toast__icon {
  font-size: 1.2rem;
  line-height: 1;
}

.kh-toast__body {
  flex: 1;
  min-width: 0;
}

.kh-toast__title {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.kh-toast__msg {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
}

.kh-toast__close {
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
}
