* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }
html, body {
  height: 100%;
  /* Modern text-size-adjust property for all supported browsers */
  text-size-adjust: 100%;
  /* Ensure consistent text rendering across browsers */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Tailwind base styles are imported via PostCSS; remove unknown at-rule */
/* Tailwind components layer is imported via PostCSS; remove unknown at-rule */
/* Tailwind utilities layer is imported via PostCSS; remove unknown at-rule */

:root {
  --color-primary: #14b8a6;
  --color-secondary: #0891b2;
  --color-accent: #06b6d4;
  --color-background: #0f172a;
}

/* Prevent horizontal page movement */
body {
  overflow-x: hidden;
}

/* Page-specific body backgrounds to avoid mismatched blank areas on scroll */
body.login-page {
  background: linear-gradient(to bottom right, #1e3a8a, #134e4a, #065f46) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}

/* Simple gradient body background for content pages (no cosmic overlay) */
body.simple-page {
  background: linear-gradient(to bottom right, #1e3a8a, #134e4a, #065f46) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}

/* Enhanced mobile typography with better scaling */
body {
  font-size: clamp(14px, 4vw, 18px);
  line-height: 1.6;
}

/* Improved touch-friendly targets for mobile devices */
@media (pointer: coarse) {
  html, body {
    height: 100dvh;
    /* Remove overflow: hidden to allow mobile scrolling */
    overflow-x: hidden; /* Only prevent horizontal scrolling */
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
  }
  
  #root {
    min-height: 100dvh; /* Use min-height instead of fixed height */
    overflow-x: hidden; /* Only prevent horizontal scrolling */
  }
  
  /* Enhanced touch targets */
  button, a, [role="button"], .touch-target, input, select, textarea {
    min-width: 44px;
    min-height: 44px;
    padding: 12px 16px;
    touch-action: manipulation;
  }
  
  /* Prevent zoom on input focus */
  input, select, textarea {
    font-size: 16px;
  }
  
  /* Better tap highlighting */
  button, a, [role="button"] {
    -webkit-tap-highlight-color: rgba(20, 184, 166, 0.3);
    -webkit-tap-highlight-color: rgba(20, 184, 166, 0.3);
  }
}

/* Enhanced mobile full-screen helpers */
.mobile-fullscreen {
  width: 100vw;
  height: 100dvh;
  position: relative;
}

.mobile-fixed-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  z-index: 1000;
}

.mobile-globe {
  height: calc(100dvh - 160px); /* reserve top nav + header space */
}

@media (orientation: landscape) and (max-height: 500px) {
  .mobile-globe { 
    height: calc(100dvh - 80px); 
  }
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
  /* Better spacing for mobile */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Improved button spacing */
  .btn-mobile {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }
  
  /* Better form inputs */
  .input-mobile {
    padding: 1rem;
    font-size: 1rem;
    border-radius: 0.75rem;
    min-height: 48px;
  }
  
  /* Improved card spacing */
  .card-mobile {
    padding: 1.25rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
  }
}

/* Safe area handling for notched devices */
@supports (padding: max(0px)) {
  .safe-area-top {
    padding-top: max(1rem, env(safe-area-inset-top));
  }
  
  .safe-area-bottom {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  
  .safe-area-left {
    padding-left: max(1rem, env(safe-area-inset-left));
  }
  
  .safe-area-right {
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

@layer utilities {
  .animate-marquee {
    animation: marquee 20s linear infinite;
  }
  .animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
  }

  .animate-fade-in {
    animation: fadeIn 0.5s ease-in;
  }

  .animate-register-blink {
    animation: register-blink 1.5s ease-in-out infinite;
  }

  .animate-shimmer {
    animation: shimmer-slide 3s ease-in-out infinite;
  }

  .animate-shimmer-slow {
    animation: shimmer-slide 5s ease-in-out infinite;
  }

  .animate-gradient-x {
    background-size: 200% auto;
    animation: gradient-x 3s ease infinite;
  }

  /* Enhanced scrollbar for mobile */
  .custom-scrollbar::-webkit-scrollbar {
    width: 6px;
  }

  .custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.1);
    border-radius: 10px;
  }

  .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 10px;
  }

  .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
  }

  .hover\:scale-102:hover {
    transform: scale(1.02);
  }
  
  /* Mobile-specific utilities */
  .text-mobile-xs { font-size: clamp(0.75rem, 3vw, 0.875rem); }
  .text-mobile-sm { font-size: clamp(0.875rem, 3.5vw, 1rem); }
  .text-mobile-base { font-size: clamp(1rem, 4vw, 1.125rem); }
  .text-mobile-lg { font-size: clamp(1.125rem, 4.5vw, 1.25rem); }
  .text-mobile-xl { font-size: clamp(1.25rem, 5vw, 1.5rem); }
  
  /* Touch-friendly spacing */
  .gap-mobile { gap: clamp(0.5rem, 2vw, 1rem); }
  .p-mobile { padding: clamp(0.75rem, 3vw, 1.25rem); }
  .px-mobile { padding-left: clamp(0.75rem, 3vw, 1.25rem); padding-right: clamp(0.75rem, 3vw, 1.25rem); }
  .py-mobile { padding-top: clamp(0.75rem, 3vw, 1.25rem); padding-bottom: clamp(0.75rem, 3vw, 1.25rem); }
  .m-mobile { margin: clamp(0.5rem, 2vw, 1rem); }
}

  .custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.1);
    border-radius: 10px;
  }

  .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 10px;
  }

  .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
  }

  .hover\:scale-102:hover {
    transform: scale(1.02);
  }

@keyframes glow {
  from {
    opacity: 0.8;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.4)) 
            drop-shadow(0 0 20px rgba(168, 85, 247, 0.3));
  }
  to {
    opacity: 1;
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.6)) 
            drop-shadow(0 0 30px rgba(168, 85, 247, 0.5));
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0%, 100% {
    opacity: 0.9;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)) 
            drop-shadow(0 0 40px rgba(168, 85, 247, 0.3));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 1)) 
            drop-shadow(0 0 60px rgba(168, 85, 247, 0.5));
  }
}

@keyframes golden-ripple {
  0% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.9),
                0 0 0 0 rgba(251, 191, 36, 0.7),
                0 0 0 0 rgba(251, 191, 36, 0.5);
  }
  50% {
    box-shadow: 0 0 15px 10px rgba(251, 191, 36, 0.6),
                0 0 25px 20px rgba(251, 191, 36, 0.4),
                0 0 35px 30px rgba(251, 191, 36, 0.2);
  }
  100% {
    box-shadow: 0 0 20px 15px rgba(251, 191, 36, 0),
                0 0 30px 25px rgba(251, 191, 36, 0),
                0 0 40px 35px rgba(251, 191, 36, 0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px 5px rgba(34, 197, 94, 0.4),
                0 0 40px 10px rgba(16, 185, 129, 0.3),
                0 0 60px 15px rgba(5, 150, 105, 0.2);
  }
  50% {
    box-shadow: 0 0 30px 10px rgba(34, 197, 94, 0.6),
                0 0 50px 15px rgba(16, 185, 129, 0.5),
                0 0 80px 25px rgba(5, 150, 105, 0.3);
  }
}

@keyframes soft-blink {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

/* Yogi blink without scaling — only opacity/brightness changes */
@keyframes yogi-blink {
  0%, 100% {
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 1))
            drop-shadow(0 0 8px rgba(251, 191, 36, 0.8))
            drop-shadow(0 0 20px rgba(251, 191, 36, 0.6));
  }
  50% {
    opacity: 0.9;
    filter: drop-shadow(0 0 16px rgba(251, 191, 36, 1))
            drop-shadow(0 0 12px rgba(251, 191, 36, 0.9))
            drop-shadow(0 0 26px rgba(251, 191, 36, 0.75));
  }
}

@keyframes button-shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes ripple-rings {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7),
                0 0 0 0 rgba(34, 197, 94, 0.5),
                0 0 0 0 rgba(34, 197, 94, 0.3);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(34, 197, 94, 0.4),
                0 0 40px 20px rgba(34, 197, 94, 0.2),
                0 0 60px 30px rgba(34, 197, 94, 0.1);
  }
  100% {
    box-shadow: 0 0 30px 20px rgba(34, 197, 94, 0),
                0 0 60px 40px rgba(34, 197, 94, 0),
                0 0 90px 60px rgba(34, 197, 94, 0);
  }
}

.scene-tooltip {
  pointer-events: none !important;
}

.scene-container > div > div {
  transform-origin: center center !important;
}

@keyframes marquee {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes register-blink {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.8));
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.6),
                0 0 25px rgba(251, 191, 36, 0.4);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
    filter: drop-shadow(0 0 30px rgba(251, 191, 36, 1));
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.8),
                0 0 40px rgba(251, 191, 36, 0.6);
  }
}

@keyframes slide-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-slide-in-right {
  animation: slide-in-right 0.3s ease-out;
}

@keyframes shimmer-slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes gradient-x {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* --- Divine aura & energy waves (gold, blue, white) --- */
@keyframes divine-aura {
  0% { filter: drop-shadow(0 0 6px rgba(255, 215, 115, 0.8)) drop-shadow(0 0 4px rgba(40, 140, 255, 0.6)); opacity: 0.85; }
  50% { filter: drop-shadow(0 0 14px rgba(255, 223, 186, 1)) drop-shadow(0 0 8px rgba(80, 170, 255, 0.8)) drop-shadow(0 0 18px rgba(255, 255, 255, 0.9)); opacity: 1; }
  100% { filter: drop-shadow(0 0 6px rgba(255, 215, 115, 0.8)) drop-shadow(0 0 4px rgba(40, 140, 255, 0.6)); opacity: 0.85; }
}

@keyframes energy-wave {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.9; }
  40% { transform: translate(-50%, -50%) scale(1.0); opacity: 0.8; }
  70% { transform: translate(-50%, -50%) scale(1.6); opacity: 0.45; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0.2; }
}

.divine-aura-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  mix-blend-mode: screen;
}

.divine-aura-gold {
  background: radial-gradient(circle, rgba(255, 223, 150, 0.85), rgba(255, 215, 115, 0.55) 60%, rgba(255, 215, 115, 0.1) 80%);
  animation: energy-wave 2.6s ease-out infinite;
}

.divine-aura-blue {
  background: radial-gradient(circle, rgba(80, 170, 255, 0.8), rgba(40, 140, 255, 0.5) 60%, rgba(40, 140, 255, 0.1) 80%);
  animation: energy-wave 3s ease-out infinite;
}

.divine-aura-white {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.35) 60%, rgba(255, 255, 255, 0.05) 80%);
  animation: energy-wave 2.2s ease-out infinite;
}

.yogi-aura-img {
  animation: divine-aura 3.2s ease-in-out infinite;
  will-change: filter, opacity;
}

/* --- Golden Vibration Spread Animation for Main Meditator --- */
@keyframes golden-vibration-spread {
  0% { 
    transform: translate(-50%, -50%) scale(0.8); 
    opacity: 0.9; 
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 16px rgba(255, 215, 0, 0.6));
  }
  25% { 
    transform: translate(-50%, -50%) scale(1.1); 
    opacity: 1; 
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 1)) drop-shadow(0 0 24px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 36px rgba(255, 215, 0, 0.4));
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.3); 
    opacity: 0.85; 
    filter: drop-shadow(0 0 16px rgba(255, 215, 0, 1)) drop-shadow(0 0 32px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 48px rgba(255, 215, 0, 0.6));
  }
  75% { 
    transform: translate(-50%, -50%) scale(1.1); 
    opacity: 0.95; 
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 24px rgba(255, 215, 0, 0.7)) drop-shadow(0 0 36px rgba(255, 215, 0, 0.3));
  }
  100% { 
    transform: translate(-50%, -50%) scale(0.8); 
    opacity: 0.9; 
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 16px rgba(255, 215, 0, 0.6));
  }
}

@keyframes golden-pulse-wave {
  0% { 
    transform: translate(-50%, -50%) scale(0.5); 
    opacity: 0.8; 
  }
  30% { 
    transform: translate(-50%, -50%) scale(1.2); 
    opacity: 0.6; 
  }
  60% { 
    transform: translate(-50%, -50%) scale(2.0); 
    opacity: 0.3; 
  }
  100% { 
    transform: translate(-50%, -50%) scale(3.5); 
    opacity: 0; 
  }
}

@keyframes golden-shimmer {
  0% { 
    opacity: 0.7; 
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.7));
  }
  50% { 
    opacity: 1; 
    filter: drop-shadow(0 0 18px rgba(255, 215, 0, 1)) drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
  }
  100% { 
    opacity: 0.7; 
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.7));
  }
}

/* Enhanced Golden Button Animations */
@keyframes golden-pulse {
  0%, 100% { 
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.6), 0 0 80px rgba(251, 191, 36, 0.3);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 60px rgba(251, 191, 36, 0.8), 0 0 120px rgba(251, 191, 36, 0.5);
    transform: scale(1.02);
  }
}

@keyframes golden-shimmer-button {
  0% { 
    transform: translateX(-100%);
    opacity: 0;
  }
  50% { 
    opacity: 1;
  }
  100% { 
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Main Meditator Golden Aura Classes */
.main-meditator-golden-aura {
  background: radial-gradient(circle, rgba(255, 215, 0, 0.9), rgba(255, 215, 0, 0.7) 40%, rgba(255, 215, 0, 0.4) 70%, rgba(255, 215, 0, 0.1) 90%);
  animation: golden-vibration-spread 2.8s ease-in-out infinite;
  will-change: transform, opacity, filter;
}

.main-meditator-pulse-wave {
  background: radial-gradient(circle, rgba(255, 215, 0, 0.6), rgba(255, 215, 0, 0.3) 50%, rgba(255, 215, 0, 0.1) 80%, transparent 100%);
  animation: golden-pulse-wave 3.5s ease-out infinite;
  will-change: transform, opacity;
}

.main-meditator-shimmer {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(255, 215, 0, 0.6) 60%, rgba(255, 215, 0, 0.2) 90%);
  animation: golden-shimmer 2.2s ease-in-out infinite;
  will-change: opacity, filter;
}

.main-meditator-img {
  animation: golden-shimmer 2.5s ease-in-out infinite;
  will-change: filter, opacity;
}
