/* === SMC FUTURES — Mobile-First Premium Styles === */

* { -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a0f;
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
}

.font-mono { font-family: 'JetBrains Mono', monospace; }

/* === Lock Screen Blur === */
.app-locked { filter: blur(20px); pointer-events: none; user-select: none; }
.app-unlocked { filter: blur(0); transition: filter 0.6s ease; }

/* === Custom Scrollbar (mobile-friendly) === */
::-webkit-scrollbar { width: 0; height: 0; }
.swipe-x { scrollbar-width: none; -ms-overflow-style: none; }
.swipe-x::-webkit-scrollbar { display: none; }

/* === Premium Gradients === */
.bg-aurora {
  background:
    radial-gradient(ellipse at top left, rgba(168,85,247,0.15) 0%, transparent 40%),
    radial-gradient(ellipse at top right, rgba(34,211,238,0.12) 0%, transparent 40%),
    radial-gradient(ellipse at bottom, rgba(236,72,153,0.10) 0%, transparent 50%),
    #0a0a0f;
}

.glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
}

.glass-strong {
  background: rgba(20,20,30,0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
}

/* === Trade Card (Swiggy-style) === */
.trade-card {
  background: linear-gradient(145deg, rgba(28,28,40,0.95) 0%, rgba(15,15,22,0.95) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.trade-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
.trade-card.long { box-shadow: 0 0 0 1px rgba(34,197,94,0.2), 0 8px 32px rgba(34,197,94,0.08); }
.trade-card.short { box-shadow: 0 0 0 1px rgba(239,68,68,0.2), 0 8px 32px rgba(239,68,68,0.08); }

/* === Tap state === */
.tap { transition: transform 0.1s ease, opacity 0.1s ease; }
.tap:active { transform: scale(0.97); opacity: 0.85; }

/* === Pulse dot (LIVE) === */
.pulse-dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-ring 1.5s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(3); opacity: 0; }
}

/* === Skeleton Loader === */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === Bottom Nav === */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 50;
}

/* === Bottom Sheet === */
.bottom-sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.bottom-sheet-backdrop.show { opacity: 1; }
.bottom-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #14141d;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 101;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-sheet.show { transform: translateY(0); }
.sheet-handle {
  width: 36px; height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 12px auto 8px;
}

/* === Animations (Framer-style) === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.fade-up-delay-1 { animation-delay: 0.05s; }
.fade-up-delay-2 { animation-delay: 0.1s; }
.fade-up-delay-3 { animation-delay: 0.15s; }
.fade-up-delay-4 { animation-delay: 0.2s; }
.fade-up-delay-5 { animation-delay: 0.25s; }

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.scale-in { animation: scaleIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) backwards; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
.shake { animation: shake 0.4s ease-in-out; }

@keyframes glow-long {
  0%, 100% { box-shadow: 0 0 20px rgba(34,197,94,0.3); }
  50% { box-shadow: 0 0 32px rgba(34,197,94,0.5); }
}
@keyframes glow-short {
  0%, 100% { box-shadow: 0 0 20px rgba(239,68,68,0.3); }
  50% { box-shadow: 0 0 32px rgba(239,68,68,0.5); }
}
.glow-long { animation: glow-long 2.5s ease-in-out infinite; }
.glow-short { animation: glow-short 2.5s ease-in-out infinite; }

/* === Direction Pills === */
.pill-long {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.pill-short {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* === Price tape === */
.price-up { color: #22c55e; }
.price-down { color: #ef4444; }

/* === Confluence stars === */
.star-filled { color: #fbbf24; filter: drop-shadow(0 0 6px rgba(251,191,36,0.5)); }
.star-empty { color: rgba(255,255,255,0.15); }

/* === Tab indicator === */
.tab-indicator {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 2px;
}

/* === Number ticker === */
.ticker { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* === Lock screen specific === */
.lock-bg {
  background:
    radial-gradient(circle at 30% 20%, rgba(168,85,247,0.25) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(34,211,238,0.20) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(236,72,153,0.15) 0%, transparent 60%),
    #050507;
}
.lock-orb {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #06b6d4 100%);
  position: relative;
  animation: orbFloat 4s ease-in-out infinite;
  box-shadow: 0 0 80px rgba(168,85,247,0.5);
}
.lock-orb::before {
  content: '';
  position: absolute; inset: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.85);
}
.lock-orb i {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: linear-gradient(135deg, #a855f7, #ec4899, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  z-index: 1;
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.lock-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}
.lock-input:focus {
  background: rgba(255,255,255,0.08);
  border-color: rgba(168,85,247,0.6);
  box-shadow: 0 0 0 4px rgba(168,85,247,0.15);
  outline: none;
}

/* === Range bar (entry/sl/tp visual) === */
.range-bar {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ef4444 0%, #ef4444 25%, #6b7280 25%, #6b7280 60%, #22c55e 60%, #22c55e 100%);
  position: relative;
}
.range-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #14141d;
}

/* === Toast === */
.toast {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  background: #14141d;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 18px;
  z-index: 200;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* === Streak badge === */
.streak-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* === Win/Loss color hierarchy === */
.win-bg { background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(34,197,94,0.05)); border: 1px solid rgba(34,197,94,0.25); }
.loss-bg { background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.05)); border: 1px solid rgba(239,68,68,0.25); }
.pending-bg { background: linear-gradient(135deg, rgba(168,85,247,0.10), rgba(168,85,247,0.03)); border: 1px solid rgba(168,85,247,0.20); }

/* No-blue-flash on iOS */
input, button, textarea, select { -webkit-tap-highlight-color: transparent; outline: none; }

/* Safe-area top padding */
.safe-top { padding-top: max(1rem, env(safe-area-inset-top)); }

/* Hide number input arrows */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
