/* =========================================
   1. IMPORTS & VARIABLES
   ========================================= */
@import url('https://fonts.googleapis.com/css?family=Lato:300,400');

:root {
  --app-bg: #f4f6f7;
  --primary-blue: #0f5bc9;
  --text-dark: #1e1e1e;
  --text-gray: #6b7280;
  --bg-dark-blue: linear-gradient(180deg, #10428c 0%, #061c47 100%);
}

/* =========================================
   2. APP LAYOUT
   ========================================= */
/* 3. The Flexbox layout container */
.app-container {
    display: none;
    flex-direction: column; /* Stack children vertically */
    height: 100%; /* Take up the full body height */
    background-color: var(--app-bg);
    width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.app-container.active {
  display: flex;
  z-index: 2;
}
.app-top-bar
{
  padding: 24px 24px 0px 24px;
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  z-index: 10;
}

.logo-wrap {
    display: flex;
    padding-top: 8px;
    justify-content: center;
    background-color: var(--app-bg);
}
.logo-img {
    width: 200px;
}

/* 4. Header & Footer - Fixed sizes */
.app-header, 
.app-footer {
    color: white;
    text-align: center;
    flex-shrink: 0; /* CRITICAL: Prevents them from squishing when content gets long */
}
.app-footer {
  padding: 0 24px 24px 24px;
}

/* 5. The Scrollable Content Area */
.app-content {
    flex: 1; /* CRITICAL: Tells the content to fill all remaining space between header and footer */
    overflow-y: auto; /* CRITICAL: Enables vertical scrolling only inside this box */
    padding: 0 24px;
}

/* Optional: Make the scrollbar look a bit nicer on Webkit browsers */
.app-content::-webkit-scrollbar {
    width: 6px;
}
.app-content::-webkit-scrollbar-thumb {
    background-color: #bdc3c7;
    border-radius: 4px;
}
/* =========================================
   2. GLOBAL RESETS & TYPOGRAPHY
   ========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html, body {
    /* Fallback for older browsers */
    height: 100%; 
    /* Modern mobile viewport height (accounts for dynamic browser UI bars) */
    height: 100dvh; 
    overflow: hidden; /* Prevent the whole page from scrolling */
    font-family: system-ui, -apple-system, sans-serif;
    overscroll-behavior-y: none;
}
body {
  margin: 0;
  padding: 0;
}
/* Disable all zoom and panning (scrolling) */
body {
  touch-action: none;
}

/* Disable double-tap zoom while still allowing pinch-to-zoom */
button, a {
  touch-action: manipulation;
}

/* Allow scrolling but disable zooming (pan-x pan-y) */
html, body {
  touch-action: pan-x pan-y;
}
h1 {
  font-family: "Lato", sans-serif;
  font-weight: 300;
  letter-spacing: 2px;
  font-size: 48px;
}

p {
  font-family: "Lato", sans-serif;
  letter-spacing: 1px;
  font-size: 14px;
  color: #333333;
}

/* =========================================
   3. ENVIRONMENT: BACKGROUND & WAVES
   ========================================= */

.flex {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.wave-wrap {
    background: linear-gradient(60deg, rgba(84, 58, 183, 1) 0%, rgba(0, 172, 193, 1) 100%);
    background: linear-gradient(180deg, #276fdb 0%, #5191e9 100%);
    background: linear-gradient(180deg, #10428c 0%, #276fdb 100%);
}
.waves {
  margin-top: 24px;
  position: relative;
  width: 100%;
  height: 15vh;
  margin-bottom: -7px; /* Fix for safari gap */
  min-height: 100px;
  max-height: 150px;
}

.content {
  position: relative;
  height: 20vh;
  text-align: center;
  background-color: white;
}

/* =========================================
   4. MOBILE APP LAYOUT & SCREENS
   ========================================= */
.phone-frame {
  width: 375px; /*Media*/
  height: 812px;/*Media*/
  width: 100%;
  height: 100vh;
  background-color: var(--bg-dark-blue);
  /* border-radius: 40px; */
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.blue-screen {
  background: var(--bg-dark-blue);
  color: white;
}

/* Welcome Header Background */
.welcome-content {
  display: flex;
  flex-direction: column;
}

.welcome-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.welcome-sub {
  font-size: 13px;
  color: var(--text-gray);
  margin-bottom: 20px;
}

/* =========================================
   5. SHARED UI COMPONENTS
   ========================================= */

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  font-weight: 600;
}

.nav-header i {
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
}

.btn-main {
  background: var(--primary-blue);
  color: white;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 91, 201, 0.3);
  transition: opacity 0.2s;
}

.btn-main:active {
  opacity: 0.8;
}

.btn-main:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Forms & Inputs */
.form-input {
  width: 100%;
  padding: 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  background: #f8fafc;
  color: var(--text-dark);
  transition: all 0.2s;
}

.form-input:focus {
  border-color: var(--primary-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 91, 201, 0.1);
  background: white;
}

.form-input::placeholder {
  color: #a0aec0;
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 30px 0;
}

.otp-inputs input {
  width: 48px;
  height: 58px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  font-size: 26px;
  text-align: center;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.2s;
}

.otp-inputs input:focus {
  border-color: #ffffff;
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Progress Bar */
.progress-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 0 30px;
  margin: 16px;
}

.progress-bar::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 40px;
  right: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 1;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  opacity: 0.3;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--bg-dark-blue);
  transition: opacity 0.3s;
}

.dot.active {
  opacity: 1;
}

/* Menu Lists */
.menu-list {
  flex-grow: 1;
  overflow-y: auto;
  padding-bottom: 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.menu-list::-webkit-scrollbar {
  display: none;
}

.menu-item {
  display: flex;
  align-items: center;
  background: white;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: transform 0.1s;
}

.menu-item:active {
  transform: scale(0.98);
}

.icon-wrap {
  width: 40px;
  height: 40px;
  background: #eff4fb;
  color: var(--primary-blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-right: 14px;
  flex-shrink: 0;
}

.item-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.item-content p {
  font-size: 12px;
  color: var(--text-gray);
  margin-top: 2px;
}

/* Info Cards */
.white-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  color: var(--text-dark);
  margin-top: 15px;
}

.amount {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin: 8px 0;
  color: #111;
}

.details {
  text-align: center;
  font-size: 13px;
  color: var(--text-gray);
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
}

.check-box {
  width: 20px;
  height: 20px;
  background: var(--primary-blue);
  border-radius: 6px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================
   6. SPECIFIC FEATURES
   ========================================= */

/* Language Menu */
.lang-container {
  position: relative;
  z-index: 100;
}

.lang-picker {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: background 0.2s;
}

.lang-picker:active {
  background: rgba(255, 255, 255, 0.4);
}

.lang-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  min-width: 70px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: dropFade 0.2s ease forwards;
}

.lang-dropdown.show {
  display: flex;
}

.lang-option {
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
}

.lang-option:active {
  background: #f0f4f8;
  color: var(--primary-blue);
}

/* Camera & Face ID */
.face-oval {
  width: 260px;
  height: 350px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 150px;
  margin: 0 auto;
  background: #222;
  position: relative;
  z-index: 1;
}

.face-oval::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px dashed rgba(255, 255, 255, 0.5);
  border-radius: 150px;
  pointer-events: none;
  z-index: 5;
}

.camera-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 150px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  background-color: #111;
}

.live-feed {
  transform: scaleX(-1);
}

.capture-btn {
  width: 70px;
  height: 70px;
  background: white;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.capture-btn.recording {
  background: #e02424;
  border-radius: 20%;
  transform: scale(0.85);
  border-color: rgba(224, 36, 36, 0.3);
  animation: pulse 1.5s infinite;
}

/* Signature Pad */
.sig-pad {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  height: 140px;
  margin: 12px 0;
  cursor: crosshair;
}

canvas {
  width: 100%;
  height: 100%;
  touch-action: none;
  background: transparent;
}

/* Success Indicator */
.success-icon-wrap {
  width: 110px;
  height: 110px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  color: var(--primary-blue);
  font-size: 45px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  opacity: 0;
}

.success-icon-wrap.animate {
  animation: scalePop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  animation-delay: 0.3s;
}

/* =========================================
   7. ANIMATIONS & MEDIA QUERIES
   ========================================= */

/* Parallax Wave Animation */
.parallax > use {
  animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }

@keyframes move-forever {
  0% { transform: translate3d(-90px, 0, 0); }
  100% { transform: translate3d(85px, 0, 0); }
}

/* Screen Transitions */
.slide-forward {
  animation: slideInRight 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.slide-backward {
  animation: slideInLeft 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dropFade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Component Animations */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(224, 36, 36, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(224, 36, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 36, 36, 0); }
}

@keyframes scalePop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Media Queries */
@media (max-width: 768px) {
  .waves {
    height: 40px;
    min-height: 40px;
  }
  .content {
    height: 30vh;
  }
  h1 {
    font-size: 24px;
  }
}

/* =========================================
   6. HELPERS
   ========================================= */

   .d-none{
    display: none;
    opacity: 0;
   }
   .w-100{
    width: 100%;
   }

   .text-white{
    color: #fff;
   }