/* ================================================
   NATIVE APP FEEL — v1
   ================================================ */

/* Base */
html, body {
  overscroll-behavior: none !important;
  overscroll-behavior-y: none !important;
  overscroll-behavior-x: none !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y !important;
  overflow-x: hidden;
  min-height: 100vh;
}

body {
  position: relative;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: contain;
}

/* Allow text select di input */
input, textarea, pre, code, .result-text, .chat-bubble.ai, [contenteditable] {
  -webkit-user-select: text !important;
  user-select: text !important;
}

/* Disable image drag */
img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
img.clickable,
a img,
button img {
  pointer-events: auto;
}

/* Smooth momentum scroll */
.scrollable, .page-content, .admin-panel, .buy-wrap, .ib-wrap, .sp-wrap, body {
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar */
::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Disable double-tap zoom */
button, a, input, select, textarea, .fx-card, .fx-icon-btn, .btn-action {
  touch-action: manipulation !important;
}

/* Active state untuk tombol (native feel) */
button:active, a:active, .fx-card:active, .fx-icon-btn:active {
  transform: scale(0.97);
  transition: transform 0.08s ease;
}

/* Prevent text selection halo */
::selection {
  background: rgba(14,165,233,0.3);
}

/* Prevent link preview */
a {
  -webkit-touch-callout: none;
}

/* Safe area untuk notch */
body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Prevent address bar hide glitch */
@supports (padding: max(0px)) {
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}

/* Status bar theme color */
@supports (background-color: color-mix(in srgb, red 50%, blue)) {
  body { background-color: color-mix(in srgb, var(--bg, #f0f7ff) 100%, transparent); }
}

/* Prevent tap delay */
a, button, input, select, textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent long press save image */
img, a {
  -webkit-touch-callout: none;
}

/* Header sticky performance */
header, .fx-header {
  will-change: transform;
  transform: translateZ(0);
}

/* Smooth tap feedback */
.fx-card,
.buy-pkg,
.mo-card,
.ib-card,
.settings-item,
.tool-card,
.card {
  transition: transform 0.08s ease, background-color 0.15s ease;
}

/* ================================================
   UPDATE BANNER
   ================================================ */
.update-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 9000;
  background: linear-gradient(135deg, #0EA5E9, #6366F1);
  color: #fff;
  padding: 14px 18px;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(14,165,233,0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(.2,.9,.3,1.2);
  cursor: pointer;
  max-width: 560px;
  margin: 0 auto;
}
.update-banner.show {
  transform: translateY(0);
}
.update-banner-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.update-banner-body {
  flex: 1;
  min-width: 0;
}
.update-banner-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 2px;
  letter-spacing: -0.2px;
}
.update-banner-sub {
  font-size: 11px;
  opacity: 0.9;
  line-height: 1.4;
}
.update-banner-btn {
  padding: 8px 14px;
  background: rgba(255,255,255,0.25);
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.update-banner-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  font-weight: 700;
  line-height: 1;
}
