@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --ocean-950: #020617;
  --ocean-900: #050d1a;
  --ocean-800: #0a1628;
  --ocean-700: #0f2035;
  --seafoam: #4ecdc4;
  --seafoam-glow: rgba(78, 205, 196, 0.4);
  --coral: #ff6b6b;
  --pearl: #f0f4f8;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --transition-cinematic: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background-color: #020617; /* Root fallback */
}

body {
  width: 100%;
  min-height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--pearl);
  cursor: default;
  transition: background-color 1s ease;
  background-color: transparent; /* Allow ocean-stage to show through */
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; letter-spacing: -0.02em; }
.font-ritual { font-family: 'Playfair Display', serif; }

/* ===== LAYOUT UTILITIES ===== */
.container-app {
  width: 100%;
  max-width: 1200px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px;
  padding-right: 24px;
  display: block;
}

/* ===== CINEMATIC OCEAN CORE ===== */
.ocean-stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

.ocean-bg {
  position: absolute;
  inset: 0;
  transition: var(--transition-cinematic);
}

.ocean-bg-default {
  background-image: radial-gradient(circle at 50% -20%, #1e3a8a 0%, #050d1a 70%);
}

.ocean-mist {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1000 1000' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.ocean-depths {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60vh;
  background: linear-gradient(to top, rgba(2, 6, 23, 1), transparent);
  z-index: 1;
}

/* ===== MAGICAL WAVES ===== */
.wave-layer {
  position: fixed;
  bottom: 0;
  left: -50%;
  width: 200%;
  height: 400px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%234ecdc4' fill-opacity='0.05' d='M0,224L80,213.3C160,203,320,181,480,181.3C640,181,800,203,960,213.3C1120,224,1280,224,1360,224L1440,224L1440,320L1360,320C1280,320,1120,320,960,320C800,320,640,320,480,320C320,320,160,320,80,320L0,320Z'/%3E%3C/svg%3E") repeat-x;
  background-size: 50% 100%;
  animation: wave-float 20s ease-in-out infinite alternate;
  filter: blur(20px);
  z-index: -5;
}

.wave-layer-2 {
  bottom: -50px;
  animation-duration: 15s;
  animation-delay: -5s;
  opacity: 0.7;
}

@keyframes wave-float {
  0% { transform: translateX(0) translateY(10px) rotate(0deg); }
  100% { transform: translateX(5%) translateY(-20px) rotate(1deg); }
}

/* ===== GLOWING PARTICLES ===== */
.luminescence {
  position: fixed;
  border-radius: 50%;
  background: var(--seafoam);
  filter: blur(4px);
  box-shadow: 0 0 20px var(--seafoam-glow);
  pointer-events: none;
  animation: rise 15s infinite linear;
  opacity: 0.2;
}

@keyframes rise {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  20% { opacity: 0.3; }
  80% { opacity: 0.3; }
  100% { transform: translateY(-10vh) translateX(100px); opacity: 0; }
}

/* ===== ULTRA GLASSMORPHISM ===== */
.glass-ritual {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.02);
  border-radius: 40px;
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 32px;
  transition: var(--transition-cinematic);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(78, 205, 196, 0.2);
  transform: translateY(-10px) scale(1.02);
}

/* ===== PREMIUM BUTTONS ===== */
.btn-ritual {
  position: relative;
  padding: 18px 40px;
  border-radius: 20px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  color: white;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  transition: var(--transition-cinematic);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ritual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--seafoam), #2d6a9f);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}

.btn-ritual:hover {
  border-color: var(--seafoam);
  box-shadow: 0 0 30px var(--seafoam-glow);
  transform: translateY(-2px);
}

.btn-ritual:hover::before {
  opacity: 1;
}

/* ===== RITUAL TEXT AREA ===== */
.ritual-input {
  background: transparent;
  border: none;
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  line-height: 1.4;
  width: 100%;
  outline: none;
  text-align: center;
  transition: var(--transition-cinematic);
}

.ritual-input::placeholder {
  color: rgba(255,255,255,0.15);
  font-style: italic;
}

/* ===== NAV RITUAL ===== */
.nav-ritual {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: transparent;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px 30px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.nav-ritual-link {
  padding: 10px 20px;
  border-radius: 100px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.nav-ritual-link:hover, .nav-ritual-link.active {
  color: white;
  background: rgba(255,255,255,0.1);
}

/* ===== SCROLLBAR RITUAL ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--ocean-950); }
::-webkit-scrollbar-thumb { background: rgba(78, 205, 196, 0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--seafoam); }

/* ===== SECTION TRANSITIONS ===== */
.ocean-fade-in { animation: oceanFadeIn 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes oceanFadeIn {
  from { opacity: 0; transform: translateY(40px); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ===== BOTTLE STYLE VARIANTS ===== */
.bottle-style-crystal {
  box-shadow: 0 0 40px rgba(147, 197, 253, 0.15), inset 0 0 20px rgba(255, 255, 255, 0.1);
  border-color: rgba(147, 197, 253, 0.3) !important;
}

.bottle-style-vintage {
  border-color: rgba(251, 191, 36, 0.2) !important;
  background: rgba(251, 191, 36, 0.02) !important;
}

.bottle-style-pearl {
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.05), inset 0 0 30px rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.2) !important;
}
