/* ========================================
   HAPNOTLAR.COM - COMPLETE STYLES
   Tailwind CSS Replacement + Custom Styles
   ======================================== */

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --primary: #1e40af;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.16);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  line-height: 1.2;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

/* === LAYOUT === */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.max-w-3xl { max-width: 768px; margin: 0 auto; }
.max-w-4xl { max-width: 896px; margin: 0 auto; }
.max-w-5xl { max-width: 1024px; margin: 0 auto; }
.max-w-6xl { max-width: 1152px; margin: 0 auto; }
.max-w-7xl { max-width: 1280px; margin: 0 auto; }

/* === FLEXBOX === */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.self-start { align-self: flex-start; }

/* === GRID === */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
}

/* === SPACING === */
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.p-12 { padding: 3rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pb-28 { padding-bottom: 7rem; }

.m-4 { margin: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mb-32 { margin-bottom: 8rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-auto { margin-top: auto; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }

.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }

/* === TYPOGRAPHY === */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-8xl { font-size: 6rem; line-height: 1; }
.text-9px { font-size: 9px; }
.text-10px { font-size: 10px; }
.text-11px { font-size: 11px; }

.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.underline { text-decoration: underline; }
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }
.tracking-0\.2em { letter-spacing: 0.2em; }
.tracking-0\.25em { letter-spacing: 0.25em; }
.tracking-0\.3em { letter-spacing: 0.3em; }
.tracking-0\.5em { letter-spacing: 0.5em; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

/* === COLORS === */
.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-gray-100 { color: #f1f5f9; }
.text-gray-400 { color: #94a3b8; }
.text-gray-500 { color: #64748b; }
.text-gray-700 { color: #334155; }
.text-gray-800 { color: #1e293b; }
.text-gray-900 { color: #0f172a; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-800 { color: #1e293b; }
.text-blue-50 { color: #eff6ff; }
.text-blue-100 { color: #dbeafe; }
.text-blue-400 { color: #60a5fa; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-blue-900 { color: #1e3a8a; }
.text-indigo-400 { color: #818cf8; }
.text-indigo-500 { color: #6366f1; }
.text-orange-500 { color: #f97316; }
.text-orange-800 { color: #9a3412; }
.text-green-600 { color: #16a34a; }
.text-yellow-400 { color: #facc15; }

.bg-white { background-color: #ffffff; }
.bg-black { background-color: #000000; }
.bg-gray-50 { background-color: #f8fafc; }
.bg-gray-700 { background-color: #334155; }
.bg-gray-900 { background-color: #0f172a; }
.bg-slate-900 { background-color: #0f172a; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-600 { background-color: #2563eb; }
.bg-green-100 { background-color: #dcfce7; }
.bg-green-500 { background-color: #22c55e; }
.bg-indigo-600 { background-color: #4f46e5; }

.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-white\/8 { background-color: rgba(255, 255, 255, 0.08); }
.bg-black\/40 { background-color: rgba(0, 0, 0, 0.4); }
.bg-blue-50\/10 { background-color: rgba(239, 246, 255, 0.1); }
.bg-blue-600\/20 { background-color: rgba(37, 99, 235, 0.2); }
.bg-indigo-600\/20 { background-color: rgba(79, 70, 229, 0.2); }

/* === BORDERS === */
.border { border-width: 1px; }
.border-t-8 { border-top-width: 8px; }
.border-white\/5 { border-color: rgba(255, 255, 255, 0.05); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-gray-100 { border-color: #f1f5f9; }
.border-blue-100 { border-color: #dbeafe; }
.border-blue-200 { border-color: #bfdbfe; }
.border-blue-500 { border-color: #3b82f6; }
.border-green-500 { border-color: #22c55e; }
.border-indigo-500\/50 { border-color: rgba(99, 102, 241, 0.5); }

.rounded { border-radius: 0.25rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-2\.5rem { border-radius: 2.5rem; }
.rounded-3rem { border-radius: 3rem; }
.rounded-full { border-radius: 9999px; }

.decoration-blue-600\/30 { text-decoration-color: rgba(37, 99, 235, 0.3); }

/* === SIZING === */
.w-full { width: 100%; }
.w-16 { width: 4rem; }
.w-24 { width: 6rem; }
.w-32 { width: 8rem; }
.w-80 { width: 20rem; }
.h-8 { height: 2rem; }
.h-16 { height: 4rem; }
.h-24 { height: 6rem; }
.h-32 { height: 8rem; }
.h-80 { height: 20rem; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }
.max-w-lg { max-width: 32rem; }
.max-w-2xl { max-width: 42rem; }

/* === POSITION === */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.top-32 { top: 8rem; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.bottom-8 { bottom: 2rem; }
.left-0 { left: 0; }
.-right-10 { right: -2.5rem; }
.-top-10 { top: -2.5rem; }
.-mt-20 { margin-top: -5rem; }
.-mr-20 { margin-right: -5rem; }
.-mb-20 { margin-bottom: -5rem; }
.-ml-20 { margin-left: -5rem; }

.z-10 { z-index: 10; }
.z-90 { z-index: 90; }
.z-100 { z-index: 100; }

/* === DISPLAY === */
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }
.overflow-hidden { overflow: hidden; }

/* === EFFECTS === */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.outline-none { outline: 2px solid transparent; }
.grayscale { filter: grayscale(100%); }
.invert { filter: invert(100%); }
.blur-2xl { filter: blur(40px); }
.blur-3xl { filter: blur(64px); }
.mix-blend-multiply { mix-blend-mode: multiply; }
.opacity-10 { opacity: 0.1; }
.opacity-50 { opacity: 0.5; }

/* === TRANSITIONS === */
.transition { transition-property: all; transition-duration: 150ms; }
.transition-all { transition-property: all; transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color; }
.duration-300 { transition-duration: 300ms; }

/* === CUSTOM COMPONENTS === */

/* Glass Effect */
.glass {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-glass {
  background: rgba(15, 23, 42, 0.85) !important;
  border-bottom: 1px solid var(--border) !important;
  backdrop-filter: blur(12px);
}

/* Buttons */
.btn {
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  transition: all 0.3s ease;
  display: inline-block;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), rgba(30, 64, 175, 0.75));
  color: #fff;
  box-shadow: 0 12px 32px rgba(30, 64, 175, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

/* Product Cards */
.product-card {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1.5rem;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
}

.product-card.selected {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.2), var(--shadow);
  background-color: rgba(255, 255, 255, 0.08) !important;
}

.product-card.inactive {
  opacity: 0.6;
  filter: grayscale(1);
}

.product-card.inactive:hover {
  opacity: 1;
  filter: grayscale(0);
}

/* Blog Card */
.blog-card {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Level Buttons */
.level-btn {
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.level-btn.level-active {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Hero Blobs */
.hero-blob {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 9999px;
  filter: blur(55px);
  opacity: 0.55;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: floaty 10s ease-in-out infinite;
}

.hero-blob-1 {
  left: -180px;
  top: -220px;
  background: radial-gradient(circle at 30% 30%, rgba(30, 64, 175, 0.9), rgba(30, 64, 175, 0));
}

.hero-blob-2 {
  right: -220px;
  bottom: -240px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  animation-duration: 13s;
}

@keyframes floaty {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, 18px, 0) scale(1.03);
  }
}

/* Featured Hero */
.featured-hero {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.featured-hero:hover {
  transform: translateY(-5px);
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
  }
}

.pulse-animation {
  animation: pulse 2s infinite;
}

@keyframes blob {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.animate-blob {
  animation: blob 7s infinite;
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(2px);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Modal */
.modal-backdrop {
  background: rgba(2, 6, 23, 0.90);
  backdrop-filter: blur(12px);
}

/* Exit Popup */
#exit-popup {
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  z-index: 10000;
}

#exit-popup.visible {
  opacity: 1;
  pointer-events: auto;
}

.exit-popup-content {
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#exit-popup.visible .exit-popup-content {
  transform: scale(1);
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 90px;
  right: 25px;
  z-index: 90;
}

@media (min-width: 768px) {
  .whatsapp-float {
    bottom: 25px;
  }
}

/* Strike Text */
.strike-text {
  position: relative;
  display: inline-block;
  color: rgba(255, 255, 255, 0.4);
}

.strike-text::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 4px;
  background: #ef4444;
  transform: rotate(-3deg);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Glow Text */
.glow-text {
  background: linear-gradient(135deg, #fde047 0%, #eab308 50%, #facc15 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(234, 179, 8, 0.4));
  display: inline-block;
}

/* Ad Banner */
.ad-banner-sidebar {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.15), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 2rem;
  text-align: center;
}

/* Form Elements */
input, textarea, select {
  width: 100%;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: #3b82f6;
}

/* Mobile Responsiveness */
@media (min-width: 768px) {
  .md\:p-12 { padding: 3rem; }
  .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:text-8xl { font-size: 6rem; line-height: 1; }
  .md\:pb-0 { padding-bottom: 0; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}

/* Utility Classes */
.hover\:underline:hover { text-decoration: underline; }
.hover\:bg-slate-800:hover { background-color: #1e293b; }
.hover\:bg-slate-600:hover { background-color: #475569; }
.hover\:bg-blue-50:hover { background-color: #eff6ff; }
.hover\:bg-blue-600:hover { background-color: #2563eb; }
.hover\:bg-blue-600\/20:hover { background-color: rgba(37, 99, 235, 0.2); }
.hover\:bg-indigo-600:hover { background-color: #4f46e5; }
.hover\:text-white:hover { color: #ffffff; }
.hover\:text-blue-400:hover { color: #60a5fa; }
.hover\:border-blue-500\/40:hover { border-color: rgba(59, 130, 246, 0.4); }
.hover\:border-indigo-500\/50:hover { border-color: rgba(99, 102, 241, 0.5); }
.hover\:-translate-y-1:hover { transform: translateY(-0.25rem); }
.hover\:gap-6:hover { gap: 1.5rem; }
.group:hover .group-hover\:bg-blue-600 { background-color: #2563eb; }
.group:hover .group-hover\:bg-indigo-600 { background-color: #4f46e5; }
.group:hover .group-hover\:text-white { color: #ffffff; }
.focus-within\:ring-2:focus-within { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); }
.focus\:border-blue-500:focus { border-color: #3b82f6; }

/* No Scroll */
.no-scroll {
  overflow: hidden;
}

/* Preview Image Grid */
#previewImageGrid {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  gap: 2.5rem;
}

.preview-item {
  width: 100%;
  max-width: 450px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.preview-item img {
  width: 100%;
  height: auto;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading State */
body.preload {
  opacity: 0;
}

body.is-loaded {
  opacity: 1;
  transition: opacity 0.6s ease;
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  .hero-blob,
  .pulse-animation,
  .animate-blob {
    animation: none !important;
  }
  .reveal {
    transition: none !important;
  }
}
