/* ====================================
   RESET & BASE STYLES
   ==================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* rimuove highlight blu iOS */
}

html, body {
  overflow: hidden;
  height: 100vh;
  width: 100%;
  overflow: hidden; /* blocca scroll nativo */
  touch-action: none; /* previeni gesti browser */
  user-select: none; /* disabilita selezione testo */
  -webkit-user-select: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
  background: #000;
  color: #fff;
  position: relative;
  max-width: 428px; /* iPhone 14 Pro Max width */
  margin: 0 auto;
  box-shadow: 0 0 50px rgba(0,0,0,0.5); /* effetto device */
}



/* ====================================
   TIPOGRAFIA iOS
   ==================================== */
.sf-text {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-weight: 400;
}

.sf-display {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  font-weight: 600;
}

/* ====================================
   STATUS BAR iOS (top bar)
   ==================================== */
.status-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  padding-top: 8px; /* spazio per notch */
  font-size: 15px;
  font-weight: 600;
  z-index: 1000;
  background: transparent;
  max-width: 428px;
  margin: 0 auto;
}

.status-bar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.status-bar-center {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.status-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
}

/* Icone status bar */
.status-icon {
  height: 20px;
  width: auto;
  display: block;
  opacity: 0.95;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.status-icon {
  filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.status-icon.signal {
  width: 20px;
  height: 16px;
}

/* .status-icon.wifi {
  
  height: 14px;
}

.status-icon.battery {
  height: 12px;
} */

/* Operatore nome */
.carrier-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  margin-left: 4px;
}

/* Percentuale batteria */
.battery-percent {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  margin-right: 2px;
}

/* Responsive status bar */
@media (max-width: 375px) {
  .status-bar {
    font-size: 14px;
    padding: 0 16px;
  }
  
  .status-icon {
    height: 13px;
  }
  
  .carrier-name,
  .battery-percent {
    font-size: 14px;
  }
}


/* ====================================
   ANIMAZIONI COMUNI
   ==================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

.slide-up {
  animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scale-in {
  animation: scaleIn 0.3s ease;
}

/* ====================================
   BLUR EFFECT iOS
   ==================================== */
.blur-bg {
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  background-color: rgba(255, 255, 255, 0.1);
}

.blur-bg-dark {
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  background-color: rgba(0, 0, 0, 0.4);
}

/* ====================================
   NOTIFICHE STYLE
   ==================================== */
.notification {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 13px;
  padding: 12px 16px;
  margin: 10px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.notification .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.notification .content {
  flex: 1;
}

.notification .app-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  opacity: 0.9;
}

.notification .message {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0.95;
}

.notification .time-ago {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 4px;
}

/* ====================================
   TRANSIZIONI SMOOTH
   ==================================== */
.smooth-transition {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ====================================
   UTILITY CLASSES
   ==================================== */
.text-center {
  text-align: center;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.no-scroll {
  overflow: hidden;
}

/* ====================================
   RESPONSIVE ADJUSTMENTS
   ==================================== */
@media (max-width: 390px) {
  body {
    max-width: 390px; /* iPhone 14 Pro */
  }
}

@media (max-width: 375px) {
  body {
    max-width: 375px; /* iPhone SE */
  }
  
  .notification {
    padding: 10px 14px;
    font-size: 14px;
  }
}

/* ====================================
   DARK MODE VARIABLES (iOS style)
   ==================================== */
:root {
  --ios-blue: #007AFF;
  --ios-red: #FF3B30;
  --ios-green: #34C759;
  --ios-yellow: #FFCC00;
  --ios-pink: #FF2D55;
  --ios-purple: #AF52DE;
  --ios-gray: #8E8E93;
  --ios-bg-dark: #000000;
  --ios-bg-light: #FFFFFF;
  --ios-separator: rgba(255, 255, 255, 0.1);
}

/* ====================================
   FIX iOS Safari Viewport
   ==================================== */
html {
  height: -webkit-fill-available;
}

body {
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

/* Fallback per Safari vecchi */
@supports not (height: 100dvh) {
  .lockscreen,
  .homescreen,
  .giorni-app {
    height: calc(100vh - env(safe-area-inset-bottom));
    min-height: -webkit-fill-available;
  }
}

