/* =====================================================================
   LAKÁSŐR - Native Mobile App UI Framework
   iOS/Android Quality PWA Experience
   Version: 1.0.0
   ===================================================================== */

/* =====================================================================
   1. NATIVE APP SHELL
   ===================================================================== */

:root {
  /* iOS-style system colors */
  --ios-blue: #007AFF;
  --ios-green: #34C759;
  --ios-red: #FF3B30;
  --ios-orange: #FF9500;
  --ios-yellow: #FFCC00;
  --ios-purple: #AF52DE;
  --ios-pink: #FF2D55;
  --ios-gray: #8E8E93;
  --ios-gray2: #636366;
  --ios-gray3: #48484A;
  --ios-gray4: #3A3A3C;
  --ios-gray5: #2C2C2E;
  --ios-gray6: #1C1C1E;
  
  /* Native app spacing */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  
  /* Bottom tab bar height */
  --tab-bar-height: 83px;
  --tab-bar-height-compact: 49px;
  
  /* Navigation bar */
  --nav-bar-height: 44px;
  --large-title-height: 52px;
  
  /* Native timing functions */
  --spring-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --spring-smooth: cubic-bezier(0.23, 1, 0.32, 1);
  --ios-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --haptic-pop: cubic-bezier(0.36, 0.66, 0.04, 1);
  
  /* Touch feedback */
  --touch-highlight: rgba(99, 102, 241, 0.12);
  --touch-ripple-duration: 400ms;
}

/* Prevent overscroll bounce except where wanted */
html {
  overscroll-behavior: none;
}

body {
  -webkit-tap-highlight-color: transparent;
  /* Note: user-select kept normal for better form/text usability */
  touch-action: manipulation;
  overscroll-behavior-y: contain;
}

/* Disable text selection only on specific UI elements */
.tab-bar,
.tab-bar-item,
.native-button,
.segment-control {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* =====================================================================
   2. BOTTOM TAB BAR (iOS Style)
   ===================================================================== */

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: var(--tab-bar-height);
  padding-bottom: var(--safe-area-bottom);
  background: var(--color-surface);
  border-top: 0.5px solid var(--color-border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transform: translateZ(0); /* GPU acceleration */
}

[data-theme="dark"] .tab-bar {
  background: rgba(28, 28, 30, 0.85);
}

.tab-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px 0;
  min-width: 0;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s var(--spring-bounce);
}

.tab-bar-item:active {
  transform: scale(0.92);
}

.tab-bar-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 22px;
  color: var(--ios-gray);
  transition: color 0.2s ease, transform 0.2s var(--spring-bounce);
}

.tab-bar-item.active .tab-bar-icon {
  color: var(--color-primary);
  transform: scale(1.05);
}

.tab-bar-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ios-gray);
  transition: color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tab-bar-item.active .tab-bar-label {
  color: var(--color-primary);
}

/* Badge on tab */
.tab-bar-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: var(--ios-red);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =====================================================================
   3. PAGE TRANSITIONS (Native Feel)
   ===================================================================== */

.app-view {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  /* padding-bottom controlled by mobile-enhancements.css based on PWA mode */
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
}

/* Page container for transitions */
.page-container {
  position: relative;
  will-change: transform, opacity;
}

/* Slide from right (push) */
.page-enter {
  animation: pageSlideIn 0.35s var(--ios-ease) forwards;
}

.page-exit {
  animation: pageSlideOut 0.35s var(--ios-ease) forwards;
}

@keyframes pageSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0.3;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pageSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-30%);
    opacity: 0.3;
  }
}

/* Fade transition for tab switches */
.page-fade-enter {
  animation: pageFadeIn 0.2s var(--ios-ease) forwards;
}

.page-fade-exit {
  animation: pageFadeOut 0.15s var(--ios-ease) forwards;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pageFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.98);
  }
}

/* =====================================================================
   4. NATIVE CARDS & SURFACES
   ===================================================================== */

.native-card {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 16px;
  margin: 16px;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s var(--spring-smooth), box-shadow 0.2s ease;
}

[data-theme="dark"] .native-card {
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.2);
}

.native-card:active {
  transform: scale(0.98);
}

/* iOS-style grouped list */
.native-list {
  background: var(--color-surface);
  border-radius: 12px;
  margin: 16px;
  overflow: hidden;
}

.native-list-header {
  padding: 8px 16px 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.native-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-height: 44px;
  background: var(--color-surface);
  border-bottom: 0.5px solid var(--color-border);
  cursor: pointer;
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.native-list-item:last-child {
  border-bottom: none;
}

.native-list-item:active {
  background: var(--color-surface-hover);
}

.native-list-item-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 7px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  flex-shrink: 0;
}

.native-list-item-content {
  flex: 1;
  min-width: 0;
}

.native-list-item-title {
  font-size: 17px;
  font-weight: 400;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.native-list-item-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.native-list-item-chevron {
  color: var(--ios-gray3);
  font-size: 14px;
  margin-left: auto;
  flex-shrink: 0;
}

/* =====================================================================
   5. SKELETON LOADING (Shimmer Effect)
   ===================================================================== */

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--color-surface-hover);
  border-radius: 8px;
}

.skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
  transform: translateX(-100%);
}

[data-theme="light"] .skeleton::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-text:last-child {
  width: 60%;
  margin-bottom: 0;
}

.skeleton-title {
  height: 24px;
  width: 70%;
  margin-bottom: 12px;
  border-radius: 4px;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-card {
  height: 120px;
  border-radius: 16px;
  margin: 16px;
}

.skeleton-button {
  height: 50px;
  border-radius: 12px;
  margin: 16px;
}

/* =====================================================================
   6. NATIVE BUTTONS & INPUTS
   ===================================================================== */

.native-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 24px;
  font-size: 17px;
  font-weight: 600;
  color: white;
  background: var(--color-primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s var(--spring-bounce), opacity 0.15s ease;
  position: relative;
  overflow: hidden;
}

.native-button:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.native-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Ripple effect */
.native-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.native-button.ripple::before {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    width: 0;
    height: 0;
    opacity: 0.5;
  }
  100% {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

.native-button-secondary {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.native-button-text {
  background: transparent;
  color: var(--color-primary);
  height: auto;
  padding: 8px 12px;
}

/* Native Input */
.native-input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  font-size: 17px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.native-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.native-input::placeholder {
  color: var(--color-text-muted);
}

/* Input group with label */
.native-input-group {
  margin-bottom: 16px;
}

.native-input-label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
}

/* =====================================================================
   7. PULL TO REFRESH
   ===================================================================== */

.pull-to-refresh {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  z-index: var(--z-dropdown);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-surface);
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: transform 0.3s var(--spring-smooth), opacity 0.3s ease;
}

.pull-to-refresh.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(80px);
}

.pull-to-refresh.refreshing {
  transform: translateX(-50%) translateY(80px);
}

.pull-to-refresh-spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =====================================================================
   8. NATIVE TOGGLE SWITCH
   ===================================================================== */

.native-switch {
  position: relative;
  width: 51px;
  height: 31px;
  background: var(--ios-gray);
  border-radius: 31px;
  cursor: pointer;
  transition: background-color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.native-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s var(--spring-smooth);
}

.native-switch.active {
  background: var(--ios-green);
}

.native-switch.active::after {
  transform: translateX(20px);
}

/* =====================================================================
   9. FLOATING ACTION BUTTON
   ===================================================================== */

.fab {
  position: fixed;
  bottom: calc(var(--tab-bar-height) + 16px);
  right: 16px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  background: var(--color-primary);
  border: none;
  border-radius: 50%;
  box-shadow: 
    0 4px 12px rgba(99, 102, 241, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: var(--z-dropdown);
  transition: transform 0.2s var(--spring-bounce), box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.fab:active {
  transform: scale(0.92);
}

.fab:hover {
  box-shadow: 
    0 6px 20px rgba(99, 102, 241, 0.5),
    0 4px 8px rgba(0, 0, 0, 0.15);
}

/* =====================================================================
   10. BOTTOM SHEET
   ===================================================================== */

.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, background-color 0.3s ease;
}

.bottom-sheet-overlay.visible {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.4);
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-modal);
  background: var(--color-surface);
  border-radius: 16px 16px 0 0;
  max-height: 90vh;
  max-height: 90dvh;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.35s var(--spring-smooth);
  padding-bottom: var(--safe-area-bottom);
}

.bottom-sheet.visible {
  transform: translateY(0);
}

.bottom-sheet-handle {
  display: flex;
  justify-content: center;
  padding: 12px;
}

.bottom-sheet-handle::after {
  content: '';
  width: 36px;
  height: 5px;
  background: var(--color-border);
  border-radius: 3px;
}

.bottom-sheet-content {
  padding: 0 16px 16px;
  overflow-y: auto;
  max-height: calc(90vh - 50px);
  max-height: calc(90dvh - 50px);
  overscroll-behavior: contain;
}

/* =====================================================================
   11. TOAST NOTIFICATIONS (Native Style)
   ===================================================================== */

.native-toast-container {
  position: fixed;
  bottom: calc(var(--tab-bar-height) + 16px);
  left: 16px;
  right: 16px;
  z-index: var(--z-tooltip);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.native-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--ios-gray6);
  color: white;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  animation: toastSlideIn 0.35s var(--spring-smooth);
}

[data-theme="light"] .native-toast {
  background: var(--color-text);
}

.native-toast.exit {
  animation: toastSlideOut 0.25s var(--ios-ease) forwards;
}

@keyframes toastSlideIn {
  from {
    transform: translateY(100%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  to {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
}

.native-toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.native-toast-message {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}

/* =====================================================================
   12. HAPTIC FEEDBACK INDICATORS
   ===================================================================== */

.haptic-light {
  animation: hapticLight 0.1s ease;
}

.haptic-medium {
  animation: hapticMedium 0.15s ease;
}

.haptic-heavy {
  animation: hapticHeavy 0.2s ease;
}

@keyframes hapticLight {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.99); }
}

@keyframes hapticMedium {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.98); }
}

@keyframes hapticHeavy {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.96); }
}

/* =====================================================================
   13. SEGMENT CONTROL (iOS Style)
   ===================================================================== */

.segment-control {
  display: flex;
  padding: 2px;
  background: var(--color-surface-hover);
  border-radius: 10px;
  position: relative;
}

.segment-control-item {
  flex: 1;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  z-index: 1;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.segment-control-item.active {
  color: var(--color-text);
}

.segment-control-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  height: calc(100% - 4px);
  background: var(--color-surface);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s var(--spring-smooth), width 0.25s var(--spring-smooth);
}

/* =====================================================================
   14. PROGRESS INDICATORS
   ===================================================================== */

/* Linear Progress */
.native-progress {
  width: 100%;
  height: 4px;
  background: var(--color-surface-hover);
  border-radius: 2px;
  overflow: hidden;
}

.native-progress-bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width 0.3s var(--ios-ease);
}

/* Circular Progress */
.native-spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.native-spinner-large {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

/* =====================================================================
   15. EMPTY STATES
   ===================================================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.empty-state-description {
  font-size: 15px;
  color: var(--color-text-muted);
  max-width: 280px;
  margin-bottom: 24px;
}

/* =====================================================================
   16. GESTURE HINTS
   ===================================================================== */

.swipe-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  animation: swipeHint 2s ease infinite;
}

@keyframes swipeHint {
  0%, 100% { opacity: 1; transform: translateX(-50%); }
  50% { opacity: 0.7; transform: translateX(calc(-50% - 10px)); }
}

/* =====================================================================
   17. SCROLL SNAP CARDS
   ===================================================================== */

.snap-scroll {
  display: flex;
  gap: 12px;
  padding: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.snap-scroll::-webkit-scrollbar {
  display: none;
}

.snap-card {
  flex-shrink: 0;
  width: 280px;
  scroll-snap-align: start;
}

/* =====================================================================
   18. NATIVE MODAL
   ===================================================================== */

.native-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: var(--z-modal-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.native-modal-overlay.visible {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.5);
}

.native-modal {
  width: 100%;
  max-width: 340px;
  background: var(--color-surface);
  border-radius: 14px;
  overflow: hidden;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.3s var(--spring-smooth), opacity 0.3s ease;
}

.native-modal-overlay.visible .native-modal {
  transform: scale(1);
  opacity: 1;
}

.native-modal-content {
  padding: 20px;
  text-align: center;
}

.native-modal-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.native-modal-message {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.native-modal-actions {
  display: flex;
  border-top: 0.5px solid var(--color-border);
}

.native-modal-action {
  flex: 1;
  padding: 16px;
  font-size: 17px;
  font-weight: 400;
  color: var(--ios-blue);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.native-modal-action:not(:last-child) {
  border-right: 0.5px solid var(--color-border);
}

.native-modal-action:active {
  background: var(--color-surface-hover);
}

.native-modal-action.primary {
  font-weight: 600;
}

.native-modal-action.destructive {
  color: var(--ios-red);
}

/* =====================================================================
   19. INLINE LOADING STATE
   ===================================================================== */

.loading-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.loading-dots {
  display: flex;
  gap: 4px;
}

.loading-dot {
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: loadingDot 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loadingDot {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* =====================================================================
   20. RESPONSIVE UTILITIES
   ===================================================================== */

@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 641px) {
  .hide-desktop { display: none !important; }
}

/* Standalone mode (installed PWA) */
@media (display-mode: standalone) {
  .tab-bar {
    padding-bottom: max(var(--safe-area-bottom), 20px);
  }
  
  .app-view {
    padding-bottom: calc(var(--tab-bar-height) + var(--safe-area-bottom));
  }
}

/* iOS specific */
@supports (-webkit-touch-callout: none) {
  .tab-bar {
    padding-bottom: max(var(--safe-area-bottom), 20px);
  }
}
