/* OWEL Main Styles — Clean Centered Mobile App Shell Architecture (420px) */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

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

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: #ffffff;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  color: #0f172a;
  overflow-x: hidden;
  transition: background-color 0.25s ease;
}

/* Auth Screens (Sign In, Sign Up, Forgot Password, Splash) & Light Mode -> Seamless Full White Canvas */
body.theme-auth,
body.theme-splash,
body.light-mode {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

body.theme-auth #app,
body.theme-splash #app {
  background-color: #ffffff !important;
  box-shadow: none !important;
}

body.light-mode #app {
  background-color: #ffffff !important;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.06) !important;
}

/* Logged-In Dark Mode App Shell -> Deep Obsidian */
body:not(.light-mode):not(.theme-auth):not(.theme-splash) {
  background-color: #050508 !important;
  color: #ffffff !important;
}

body:not(.light-mode):not(.theme-auth):not(.theme-splash) #app {
  background-color: #000000 !important;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9), 0 0 80px rgba(139, 92, 246, 0.15) !important;
}

/* Centered Mobile App Container (420px Viewport Frame) */
#app {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* OWEL SPLASH SCREEN ANIMATION — WHITE MODE */
.splash-screen-container {
  width: 100%;
  min-height: 100vh;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9999;
  padding: 20px;
  overflow: hidden;
}

.splash-wing-emblem {
  width: 230px;
  height: 230px;
  object-fit: contain;
  animation: owelLogoFadeScale 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-brand-title-light {
  font-size: 2.4rem;
  font-weight: 800;
  color: #050508;
  letter-spacing: 7px;
  margin-top: 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  opacity: 0;
  animation: owelTextFadeIn 1.4s ease forwards 0.4s;
}

.splash-tagline-light {
  font-size: 0.74rem;
  font-weight: 700;
  color: #666677;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-top: 10px;
  opacity: 0;
  animation: owelTextFadeIn 1.4s ease forwards 0.8s;
}

@keyframes owelLogoFadeScale {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(10px);
  }
  60% {
    opacity: 1;
    transform: scale(1.05) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes owelTextFadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes owelLogoBreathePulse {
  0% {
    transform: scale(0.95);
    opacity: 0.85;
    filter: drop-shadow(0 0 0px rgba(139, 92, 246, 0));
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
    filter: drop-shadow(0 0 16px rgba(139, 92, 246, 0.45));
  }
  100% {
    transform: scale(0.95);
    opacity: 0.85;
    filter: drop-shadow(0 0 0px rgba(139, 92, 246, 0));
  }
}

.reddit-style-breathing-logo {
  animation: owelLogoBreathePulse 2s ease-in-out infinite;
}

@keyframes owelTextFadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

body.light-mode #app {
  background-color: #f4f3f9;
  box-shadow: 0 10px 50px rgba(124, 58, 237, 0.15);
}

/* FLOATING BOTTOM NAV BAR — STRICTLY CENTERED INSIDE 420px SHELL */
.bottom-nav-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 388px;
  height: 56px;
  background: rgba(9, 9, 14, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

body.modal-open .bottom-nav-bar,
.bottom-nav-bar.hidden-nav {
  display: none !important;
}

.modal-overlay {
  z-index: 100000 !important;
}

body.light-mode .bottom-nav-bar {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(124, 58, 237, 0.15);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.12);
}

.nav-icon-item {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888899;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-icon-item svg,
.nav-icon-item svg path,
.nav-icon-item svg circle,
.nav-icon-item svg polygon {
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.nav-icon-item.active {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.15);
}

body.light-mode .nav-icon-item.active {
  color: #7c3aed;
  background: #ede9fe;
}

/* Sleek Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #222233;
  border-radius: 9999px;
}
