/* ── Mobil uygulama sayfa geçişleri + splash ─────────────── */
html.app-booting .page-wrapper,
html.app-booting main.s4,
html.app-booting .cw {
  opacity: 0;
}

html.app-ready .page-wrapper,
html.app-ready main.s4,
html.app-ready .cw {
  opacity: 1;
}

html.app-exiting .page-wrapper,
html.app-exiting main.s4,
html.app-exiting .cw {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.page-wrapper,
main.s4,
.cw {
  will-change: transform, opacity;
}

html.app-enter .page-wrapper,
html.app-enter main.s4,
html.app-enter .cw {
  animation: appScreenIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.app-enter--left .page-wrapper,
html.app-enter--left main.s4,
html.app-enter--left .cw {
  animation-name: appScreenInFromRight;
}

html.app-enter--right .page-wrapper,
html.app-enter--right main.s4,
html.app-enter--right .cw {
  animation-name: appScreenInFromLeft;
}

html.app-enter--up .page-wrapper,
html.app-enter--up main.s4,
html.app-enter--up .cw {
  animation-name: appScreenInFromBottom;
}

@keyframes appScreenIn {
  from { opacity: 0; transform: scale(0.97); filter: blur(4px); }
  to   { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes appScreenInFromRight {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes appScreenInFromLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes appScreenInFromBottom {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

html.app-enter .app-page-header {
  animation: appBlockIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both;
}

html.app-enter .app-stagger > * {
  animation: appBlockIn 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.app-enter .app-stagger > *:nth-child(1) { animation-delay: 0.06s; }
html.app-enter .app-stagger > *:nth-child(2) { animation-delay: 0.1s; }
html.app-enter .app-stagger > *:nth-child(3) { animation-delay: 0.14s; }
html.app-enter .app-stagger > *:nth-child(4) { animation-delay: 0.18s; }
html.app-enter .app-stagger > *:nth-child(5) { animation-delay: 0.22s; }
html.app-enter .app-stagger > *:nth-child(n+6) { animation-delay: 0.26s; }

@keyframes appBlockIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Splash geçiş ekranı — menünün üstünde değil, menü her zaman görünür */
.app-splash {
  position: fixed;
  inset: 0;
  bottom: calc(var(--nav-clearance) - 6px);
  z-index: 9000;
  display: grid;
  place-items: center;
  background: #000000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.26s ease, visibility 0.26s ease;
  overflow: hidden;
}

.app-splash.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.app-splash__orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.app-splash__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: splashOrbFloat 5s ease-in-out infinite;
}

.app-splash__orb--1 {
  width: 220px;
  height: 220px;
  top: 8%;
  left: -40px;
  background: rgba(124, 58, 237, 0.35);
}

.app-splash__orb--2 {
  width: 180px;
  height: 180px;
  bottom: 18%;
  right: -30px;
  background: rgba(245, 166, 35, 0.22);
  animation-delay: -2s;
}

@keyframes splashOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -16px) scale(1.08); }
}

.app-splash__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  animation: splashContentIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes splashContentIn {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.app-splash__icon-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.app-splash__ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid rgba(245, 166, 35, 0.15);
  border-top-color: var(--gold, #f5a623);
  border-right-color: rgba(124, 58, 237, 0.6);
  animation: appTransitionSpin 0.8s linear infinite;
}

.app-splash__icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow:
    0 12px 32px rgba(245, 166, 35, 0.28),
    0 0 0 3px rgba(255, 255, 255, 0.08);
  animation: splashIconPulse 1.2s ease-in-out infinite;
}

@keyframes splashIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.app-splash__logo {
  width: min(200px, 72vw);
  height: auto;
  object-fit: contain;
  animation: splashLogoIn 0.5s ease 0.08s both;
}

@keyframes splashLogoIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.app-splash__tagline {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  background: linear-gradient(135deg, #ffffff 0%, #f5a623 55%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: splashTaglineShine 2.2s ease-in-out infinite;
}

@keyframes splashTaglineShine {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.app-splash__bar {
  width: 120px;
  height: 4px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.app-splash__bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold, #f5a623), #7c3aed);
  animation: splashBarSlide 0.9s ease-in-out infinite;
}

@keyframes splashBarSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

@keyframes appTransitionSpin {
  to { transform: rotate(360deg); }
}

/* Nav ripple */
.bn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(245, 166, 35, 0.35);
  transform: scale(0);
  animation: bnRipple 0.55s ease-out forwards;
  pointer-events: none;
  z-index: 0;
}

@keyframes bnRipple {
  to { transform: scale(2.8); opacity: 0; }
}

/* Font Awesome */
.bn-ico .fa-solid,
.bn-ico .fa-regular {
  font-size: 17px;
  line-height: 1;
  display: block;
  color: rgba(255, 255, 255, 0.42);
  transition: color 0.25s ease, transform 0.25s ease;
}

.bn-item.active .bn-ico .fa-solid,
.bn-item.active .bn-ico .fa-regular {
  color: var(--gold-light);
}

.app-header-btn .fa-solid,
.app-header-btn .fa-regular {
  font-size: 16px;
  line-height: 1;
}

.app-header-card .fa-solid {
  font-size: 15px;
  color: var(--gold-light);
}

.coupon-history-btn .fa-solid {
  margin-right: 4px;
  font-size: 12px;
}

.section-title .fa-solid {
  margin-right: 6px;
  font-size: 0.92em;
  color: var(--gold-light);
}

.section-link .fa-solid {
  font-size: 10px;
  margin-left: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html.app-enter .page-wrapper,
  html.app-enter main.s4,
  html.app-enter .cw,
  html.app-enter .app-page-header,
  html.app-enter .app-stagger > *,
  .app-splash__orb,
  .app-splash__icon,
  .app-splash__tagline,
  .app-splash__bar span,
  .app-splash__ring,
  .bn-ripple {
    animation: none !important;
  }

  html.app-booting .page-wrapper,
  html.app-booting main.s4,
  html.app-booting .cw {
    opacity: 1;
  }
}
