/* ── Ninfex Global – Custom Styles ── */

:root {
  --background: #fafafa;
  --foreground: #171717;
  --card: #ffffff;
  --card-border: #e5e5e5;
  --primary: #f97316;
  --primary-light: #fb923c;
  --primary-dark: #ea580c;
  --secondary: #f5f5f5;
  --accent: #22c55e;
  --accent-blue: #3b82f6;
  --muted: #a3a3a3;
  --text: #171717;
  --text-light: #525252;
  --text-muted: #737373;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-heading: 'Poppins', system-ui, sans-serif;
}

body {
  background: var(--background);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f5f5f5; }
::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a3a3a3; }

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  color: var(--text);
}

/* Card hover effect */
.card-hover { transition: all 0.3s ease; }
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============ Clouds ============ */
.cloud { position: absolute; z-index: 10; filter: blur(0.5px); }

.cloud-puff {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at 45% 35%, #ffffff 0%, #f0f4f8 25%, #dce4ee 50%, #c5d3e3 75%, transparent 100%);
  box-shadow: inset 0 -10px 20px rgba(160, 185, 215, 0.35), inset 0 5px 10px rgba(255, 255, 255, 0.6), 0 8px 25px rgba(160, 185, 215, 0.15);
}

.cloud-highlight {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 30%, rgba(255, 255, 255, 0.98) 0%, rgba(245, 250, 255, 0.9) 30%, rgba(225, 238, 250, 0.6) 60%, transparent 100%);
}

.cloud-shadow {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 60%, rgba(165, 185, 210, 0.5) 0%, rgba(145, 168, 200, 0.3) 50%, transparent 100%);
}

@keyframes cloudDrift {
  0%, 100% { transform: translateX(0) translateY(0); }
  25%      { transform: translateX(8px) translateY(-2px); }
  50%      { transform: translateX(14px) translateY(1px); }
  75%      { transform: translateX(6px) translateY(-1px); }
}

/* Water fills up slowly from bottom */
@keyframes waterFill { 0% { height: 0%; } 100% { height: 100%; } }
@keyframes waterDrain { 0% { height: 100%; } 100% { height: 0%; } }

@keyframes waterHalfCycle {
  0%   { height: 0%; }
  40%  { height: 50%; }
  50%  { height: 50%; }
  90%  { height: 0%; }
  100% { height: 0%; }
}

@keyframes waveSlide {
  0%   { transform: translateX(0) translateY(-6px); }
  100% { transform: translateX(-50%) translateY(-6px); }
}

@keyframes waveSlide2 {
  0%   { transform: translateX(-50%) translateY(-3px); }
  100% { transform: translateX(0) translateY(-3px); }
}

/* Raindrop streak */
.raindrop {
  position: absolute; top: -20px; width: 2px; height: 20px;
  background: linear-gradient(to bottom, transparent 0%, rgba(100, 180, 255, 0.6) 30%, rgba(56, 189, 248, 0.9) 100%);
  border-radius: 0 0 2px 2px;
  animation: rainFall 1s linear infinite;
}
.raindrop::after {
  content: ''; position: absolute; bottom: -5px; left: -2px; width: 6px; height: 6px;
  background: radial-gradient(ellipse, rgba(56, 189, 248, 0.8) 0%, rgba(14, 165, 233, 0.4) 60%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.raindrop-large {
  position: absolute; top: -25px; width: 3px; height: 28px;
  background: linear-gradient(to bottom, transparent 0%, rgba(100, 180, 255, 0.5) 20%, rgba(56, 189, 248, 0.85) 100%);
  border-radius: 0 0 3px 3px;
  animation: rainFallSlow 1.4s linear infinite;
}
.raindrop-large::after {
  content: ''; position: absolute; bottom: -6px; left: -2.5px; width: 8px; height: 8px;
  background: radial-gradient(ellipse, rgba(56, 189, 248, 0.7) 0%, rgba(14, 165, 233, 0.3) 60%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.raindrop-mist {
  position: absolute; top: -8px; width: 1.5px; height: 12px;
  background: linear-gradient(to bottom, transparent, rgba(100, 180, 255, 0.5));
  border-radius: 0 0 1px 1px;
  animation: rainFallFast 0.6s linear infinite;
}

@keyframes rainFall {
  0%   { transform: translateY(0); opacity: 0; }
  5%   { opacity: 0.8; }
  85%  { opacity: 0.5; }
  100% { transform: translateY(600px); opacity: 0; }
}
@keyframes rainFallSlow {
  0%   { transform: translateY(0); opacity: 0; }
  5%   { opacity: 0.7; }
  85%  { opacity: 0.4; }
  100% { transform: translateY(600px); opacity: 0; }
}
@keyframes rainFallFast {
  0%   { transform: translateY(0); opacity: 0; }
  8%   { opacity: 0.5; }
  85%  { opacity: 0.3; }
  100% { transform: translateY(600px); opacity: 0; }
}

/* Page transition loader bounce */
@keyframes loaderBounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(-10px); opacity: 1; }
}

/* Typewriter cursor blink */
.typewriter-cursor { animation: cursorBlink 0.75s step-end infinite; }
@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Ripples where rain hits water surface */
.ripple {
  position: absolute; top: -2px; width: 6px; height: 3px;
  border-radius: 50%; border: 1px solid rgba(56, 189, 248, 0.3);
  animation: rippleExpand 1.5s ease-out infinite;
}
@keyframes rippleExpand {
  0%   { transform: scale(0.5); opacity: 0.7; }
  50%  { transform: scale(2.5); opacity: 0.3; }
  100% { transform: scale(4); opacity: 0; }
}

/* TikTok downloader line loader */
@keyframes ttLineLoader {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(150%); }
  100% { transform: translateX(-100%); }
}

/* Smooth animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.5s ease-out forwards; }
.animate-fade-in { animation: fadeInUp 0.3s ease-out forwards; }

@keyframes scaleIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.animate-scale-in { animation: scaleIn 0.25s ease-out; }

/* Loader spinner */
.loader-spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Route loader */
.route-loader-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 3px;
}
.route-loader-bar .bar {
  height: 100%;
  background: linear-gradient(to right, #fb923c, #f97316, #f59e0b);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Drawer transition */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.2); z-index: 40;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.drawer-overlay.active { opacity: 1; pointer-events: auto; }

.drawer-panel {
  position: fixed; top: 0; left: 0; width: 288px; z-index: 50;
  background: white; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  transform: translateX(-100%); transition: transform 0.2s ease-out;
  border-radius: 0 16px 16px 0;
  height: calc(100% - 120px);
  border-right: 2.5px solid #374151;
  border-top: 2.5px solid #374151;
  border-bottom: 2.5px solid #374151;
}
.drawer-panel.active { transform: translateX(0); }

/* Hide scrollbar on drawer nav */
.drawer-nav { overflow-y: auto; }
.drawer-nav::-webkit-scrollbar { width: 0; }
