/* ========================================================
   Realistic Smartphone Mobile Simulator Layouts
   ======================================================== */

/* Mobile Device Center Frame Container */
.m-device-simulator {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
  padding: var(--space-6) var(--space-4);
  box-sizing: border-box;
}

/* Smartphone Body Frame (iPhone 15 Pro style) */
.m-app {
  width: 100%;
  max-width: 410px;
  height: 840px;
  background-color: #F8FAFC;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 46px;
  border: 12px solid #0F172A;
  box-shadow: 
    0 25px 60px -12px rgba(15, 23, 42, 0.25),
    0 0 0 2px rgba(255, 255, 255, 0.5) inset;
  box-sizing: border-box;
}

/* Smartphone Top Camera Notch (Dynamic Island) */
.m-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 24px;
  background-color: #0F172A;
  border-radius: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  pointer-events: none;
}

.m-notch-camera {
  width: 10px;
  height: 10px;
  background-color: #1E293B;
  border-radius: 50%;
  border: 1px solid #334155;
}

.m-notch-sensor {
  width: 8px;
  height: 8px;
  background-color: #1E293B;
  border-radius: 50%;
}

/* Top Status Bar (Time, Wifi, Battery) */
.m-status-bar {
  height: 44px;
  padding: 10px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #0F172A;
  z-index: 999;
  background: transparent;
  user-select: none;
  pointer-events: none;
  flex-shrink: 0;
}

/* Smartphone Home Indicator Bar at Bottom */
.m-home-indicator {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 4px;
  background-color: #64748B;
  border-radius: 100px;
  z-index: 1001;
  pointer-events: none;
}

@media (max-width: 480px) {
  .m-device-simulator {
    padding: 0;
    background: none;
  }
  .m-app {
    max-width: 100%;
    height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
  .m-notch {
    display: none;
  }
}

/* Scrollable Inner Mobile Content (Guaranteed Smooth Touch & Mouse Scroll with Generous Bottom Clearance) */
.m-content {
  flex: 1;
  height: calc(100% - 44px);
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  position: relative;
  padding-bottom: 140px !important;
  touch-action: pan-y;
  box-sizing: border-box;
}

/* Custom Visible Scrollbar for mobile simulator */
.m-content::-webkit-scrollbar {
  width: 6px;
}
.m-content::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.02);
}
.m-content::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 10px;
}
.m-content::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.m-content.no-nav {
  padding-bottom: 40px !important;
}

/* Bottom Navigation Bar (Fixed at Bottom of Mobile Frame) */
.m-bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: 8px;
  z-index: 990;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04);
}

.m-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #64748B;
  text-decoration: none;
  background: none;
  border: none;
  width: 58px;
  height: 48px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 180ms ease-out;
}

.m-nav-item:hover {
  color: #0E6E4E;
}

.m-nav-item.active {
  color: #0E6E4E;
  font-weight: bold;
}

.m-nav-icon {
  font-size: 22px;
  transition: transform 180ms ease-out;
}

.m-nav-item.active .m-nav-icon {
  transform: translateY(-2px) scale(1.1);
  color: #0E6E4E;
}

.m-nav-label {
  font-size: 10px;
  font-weight: 600;
}

/* Mobile Header (App Bar) */
.m-header {
  height: 54px;
  padding: 0 var(--space-3);
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid #E2E8F0;
  flex-shrink: 0;
}

.m-header-title {
  font-size: var(--font-base);
  font-weight: var(--weight-bold);
  flex: 1;
  text-align: center;
  color: #0F172A;
}

.m-header-start {
  min-width: 44px;
  display: flex;
  align-items: center;
}

.m-header-end {
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Page Animations */
.m-page-enter {
  animation: m-fade-slide 0.25s var(--ease-out) forwards;
}

@keyframes m-fade-slide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
