/* NivaPlus Home v2 (luxury theme)
   Non-Tailwind helpers: scrollbar, glass, small utilities, and key visuals.
*/

/* Base Setup */
html { scrollbar-width: thin; scrollbar-color: #997B4D #02040a; }

body {
  background-color: #02040a;
  color: #e2e8f0;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.04"/%3E%3C/svg%3E');
  padding-bottom: env(safe-area-inset-bottom);
}

/* Luxury Scrollbar (Webkit) */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #02040a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; border: 2px solid #02040a; }
::-webkit-scrollbar-thumb:hover { background: #C6A87C; }

.font-persian { font-family: 'Vazirmatn', sans-serif !important; }

/* Utilities */
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }

.scrollbar-hide {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* Glass & Cards */
.glass {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(2, 6, 23, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(198, 168, 124, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -5px rgba(0,0,0,0.6);
  border-color: rgba(198, 168, 124, 0.2);
}

.glass-card:hover::before { opacity: 1; }

/* Typography & Effects */
.text-champagne {
  background: linear-gradient(to right, #F3E5AB, #C6A87C, #F3E5AB);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: shine 5s linear infinite;
}

@keyframes shine {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.typing-cursor::after {
  content: '|';
  animation: blink 1s infinite;
  color: #C6A87C;
  margin-left: 2px;
}

@keyframes blink { 50% { opacity: 0; } }

/* Phone & Elements */
.phone-frame {
  box-shadow:
    0 0 0 1px #333,
    0 0 0 3px #0f172a,
    0 0 0 4px #1e293b,
    0 30px 60px -10px rgba(0,0,0,0.9),
    0 0 120px rgba(198, 168, 124, 0.08);
}

.dynamic-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 30;
  transition: all 0.3s ease;
}

.phone-frame:hover .dynamic-island { width: 35%; }

.live-dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes floatUpFade {
  0% { transform: translateY(0) scale(0.5) rotate(0deg); opacity: 0; }
  20% { opacity: 1; transform: translateY(-30px) scale(1) rotate(10deg); }
  100% { transform: translateY(-120px) scale(1.2) rotate(-10deg); opacity: 0; }
}

.animate-float-heart {
  position: absolute;
  bottom: 30px;
  right: 20px;
  animation: floatUpFade 2.5s ease-out forwards;
  pointer-events: none;
}

/* Navbar Sticky */
.header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-bar {
  transition: all 0.4s ease;
  height: 36px;
  overflow: hidden;
  background: #02040a;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.navbar-main {
  transition: all 0.4s ease;
  background: transparent;
  height: 90px;
}

.scrolled .top-bar { height: 0; opacity: 0; }

.scrolled .navbar-main {
  background-color: rgba(2, 4, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  height: 70px;
}

.scrolled .logo-container { transform: scale(0.9); }

/* Active Language Style */
.lang-btn-active {
  background-color: rgba(198, 168, 124, 0.2) !important;
  color: #C6A87C !important;
  border: 1px solid rgba(198, 168, 124, 0.5) !important;
}
