/* ==========================================================================
   JUN'S PHONE - Mobile-First Interactive Mystery Phone Web App
   Pure Vanilla CSS • iOS-like Aesthetics • 60fps Hardware-Accelerated Animations
   ========================================================================== */

:root {
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg-dark: #0a0c12;
  --chassis-border: #2c2f38;
  --chassis-shadow: rgba(0, 0, 0, 0.85);
  --glass-bg: rgba(28, 30, 42, 0.72);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.06);
  --ios-blue: #0a84ff;
  --ios-green: #30d158;
  --ios-yellow: #ffd60a;
  --ios-red: #ff453a;
  --ios-gray: #8e8e93;
  --ios-bubble-sent: #007aff;
  --ios-bubble-recv: #26272e;
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Global Guardrails */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #07080d;
  color: #ffffff;
  font-family: var(--font-system);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Desktop Ambiance Background */
.desktop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 24px 20px;
  background: radial-gradient(circle at 50% 25%, #181d2e 0%, #090a10 70%, #030407 100%);
  pointer-events: none;
}

.desktop-header {
  pointer-events: auto;
  text-align: center;
  max-width: 600px;
  animation: fadeIn 0.8s ease;
  z-index: 20;
}

.story-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ios-yellow);
  background: rgba(255, 214, 10, 0.12);
  border: 1px solid rgba(255, 214, 10, 0.3);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.desktop-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  color: #f5f5f7;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.story-desc {
  font-size: 13px;
  color: #9898a0;
  line-height: 1.4;
  margin-bottom: 12px;
}

.desktop-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e5e5ea;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: translateY(-1px);
}

.action-btn:active {
  transform: scale(0.96);
}

/* ==========================================================================
   PHYSICAL DEVICE FRAME / CHASSIS
   ========================================================================== */

.device-wrapper {
  position: relative;
  z-index: 10;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  max-height: 100dvh;
  pointer-events: none;
}

.hardware-button,
.phone-screen {
  pointer-events: auto;
}

/* Desktop Centered Frame (9:19.5 aspect ratio) */
@media (min-width: 501px) {
  .device-wrapper {
    padding: 20px 0;
  }

  .phone-screen {
    width: 390px;
    height: 844px;
    max-height: calc(100dvh - 40px);
    border-radius: 50px;
    box-shadow:
      0 0 0 10px #1e2029,
      0 0 0 12px #383c48,
      0 0 0 13px #13141a,
      0 25px 60px var(--chassis-shadow),
      0 10px 25px rgba(0, 0, 0, 0.6);
  }

  /* Physical hardware buttons on side of phone */
  .hardware-button {
    position: absolute;
    background: #323542;
    border-radius: 3px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
    z-index: 5;
  }

  .action-button {
    left: calc(50% - 195px - 14px);
    top: calc(50% - 280px);
    width: 4px;
    height: 32px;
  }

  .volume-up {
    left: calc(50% - 195px - 14px);
    top: calc(50% - 225px);
    width: 4px;
    height: 52px;
  }

  .volume-down {
    left: calc(50% - 195px - 14px);
    top: calc(50% - 160px);
    width: 4px;
    height: 52px;
  }

  .power-button {
    right: calc(50% - 195px - 14px);
    top: calc(50% - 200px);
    width: 4px;
    height: 78px;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  .power-button:hover {
    background: #4a4e60;
  }

  .power-button:active {
    transform: translateX(-1px);
  }
}

/* Mobile Fullscreen Immersion (Zero bezel, fills device) */
@media (max-width: 500px) {
  .desktop-backdrop {
    display: none;
  }

  .device-wrapper {
    width: 100vw;
    height: 100dvh;
    padding: 0;
  }

  .hardware-button {
    display: none;
  }

  .phone-screen {
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   PHONE SCREEN INTERIOR
   ========================================================================== */

.phone-screen {
  position: relative;
  background-color: #000000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Dynamic Island & Speaker */
.dynamic-island-wrapper {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
}

.dynamic-island {
  pointer-events: auto;
  width: 120px;
  height: 34px;
  background: #000000;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.35s var(--ease-spring);
}

.dynamic-island:hover {
  transform: scale(1.04);
}

.dynamic-island.expanded {
  width: 280px;
  height: 48px;
  background: rgba(15, 17, 24, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.island-camera {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #111420;
  box-shadow: inset 0 0 2px #0a84ff;
}

.island-content {
  display: flex;
  align-items: center;
  gap: 6px;
}

.island-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ios-yellow);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.island-text {
  font-size: 11px;
  font-weight: 600;
  color: #e5e5ea;
  letter-spacing: -0.2px;
}

/* Status Bar */
.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  padding: 12px 24px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 90;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: #ffffff;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.status-left {
  display: flex;
  align-items: center;
}

.status-time {
  font-size: 14px;
  font-weight: 600;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.signal-bars .bar {
  width: 3px;
  background: #ffffff;
  border-radius: 1px;
}

.bar-1 { height: 4px; }
.bar-2 { height: 6px; }
.bar-3 { height: 8px; }
.bar-4 { height: 10px; }

.carrier-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-right: 2px;
}

.status-icon {
  fill: #ffffff;
}

.battery-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.battery-percent {
  font-size: 11px;
  font-weight: 600;
}

.battery-shell {
  width: 22px;
  height: 11px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 3px;
  padding: 1px;
  display: flex;
  align-items: center;
}

.battery-level {
  height: 100%;
  background: var(--ios-green);
  border-radius: 1.5px;
  transition: width 0.3s ease;
}

.battery-tip {
  width: 1.5px;
  height: 4px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0 1px 1px 0;
}

/* ==========================================================================
   WALLPAPERS & SCREENS BASE
   ========================================================================== */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-smooth), transform 0.45s var(--ease-spring);
  transform: scale(0.96);
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: scale(1);
}

.wallpaper-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.lock-wallpaper {
  background-image: url('assets/photos/photo_18.jpg');
}

.home-wallpaper {
  background-image: url('assets/photos/photo_14.jpg');
}

.home-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.05) 30%,
    rgba(0, 0, 0, 0.15) 70%,
    rgba(0, 0, 0, 0.45) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* ==========================================================================
   SCREEN 1: LOCK SCREEN
   ========================================================================== */

.lock-screen {
  z-index: 40;
}

.lock-screen.unlocked {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.lock-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 40%,
    rgba(0, 0, 0, 0.5) 80%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.lock-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding-top: 55px;
  padding-bottom: 24px;
}

.lock-icon-wrapper {
  margin-top: 8px;
  margin-bottom: 4px;
  color: #ffffff;
  transition: transform 0.3s ease;
}

.lock-icon-wrapper.unlocking {
  transform: scale(1.15);
  color: var(--ios-green);
}

.lock-clock-area {
  text-align: center;
  margin-bottom: 12px;
}

.lock-date {
  font-size: 19px;
  font-weight: 500;
  color: #f2f2f7;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  margin-bottom: 2px;
}

.lock-time {
  font-size: 78px;
  font-weight: 200;
  line-height: 1;
  letter-spacing: -1.5px;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

/* Passcode Matrix */
.passcode-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4px;
  width: 100%;
}

.passcode-label {
  font-size: 14px;
  font-weight: 500;
  color: #e5e5ea;
  letter-spacing: -0.2px;
  margin-bottom: 12px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.pin-dots {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.pin-dots.shake {
  animation: pinShake 0.45s var(--ease-spring);
}

@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-12px); }
  40%, 80% { transform: translateX(12px); }
}

.pin-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  background: transparent;
  transition: all 0.18s ease;
}

.pin-dot.filled {
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

.pin-dots.shake .pin-dot {
  background: var(--ios-red) !important;
  border-color: var(--ios-red) !important;
}

/* Keypad Grid (Frosted Glass Round Buttons) */
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  grid-gap: 14px 22px;
  justify-content: center;
}

.keypad-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  transition: all 0.12s ease;
}

.keypad-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.keypad-btn:active {
  background: rgba(255, 255, 255, 0.42);
  transform: scale(0.92);
}

.keypad-btn .num {
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}

.keypad-btn .sub {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1px;
}

.keypad-btn.aux-btn {
  background: transparent;
  backdrop-filter: none;
  border: none;
}

.keypad-btn.aux-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.aux-text {
  font-size: 13px;
  font-weight: 500;
  color: #f2f2f7;
}

/* Hint Box */
.pin-hint-box {
  margin-top: 12px;
  padding: 6px 14px;
  background: rgba(20, 24, 38, 0.75);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  max-width: 320px;
  transition: all 0.2s ease;
}

.pin-hint-box:hover {
  background: rgba(30, 36, 56, 0.85);
  border-color: rgba(255, 214, 10, 0.4);
}

.pin-hint-box:active {
  transform: scale(0.96);
}

.hint-icon {
  font-size: 13px;
}

.hint-text {
  font-size: 11px;
  color: #ffd60a;
  font-weight: 500;
  text-align: center;
}

/* Lock Bottom Bar */
.lock-bottom-bar {
  margin-top: auto;
  width: 100%;
  padding: 0 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quick-tool-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(20, 22, 34, 0.65);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-tool-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.quick-tool-btn:active {
  transform: scale(0.92);
}

.swipe-hint {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}

/* ==========================================================================
   SCREEN 2: HOME SCREEN
   ========================================================================== */

.home-screen {
  z-index: 20;
}

.home-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: 60px;
  padding-bottom: 24px;
}

/* Glass Card helper */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Smart Widget Area */
.home-widget-area {
  padding: 0 20px;
  margin-bottom: 24px;
}

.smart-widget {
  border-radius: 20px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.widget-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}

.widget-day {
  font-size: 11px;
  font-weight: 700;
  color: var(--ios-red);
  letter-spacing: 0.5px;
}

.widget-date-num {
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  color: #ffffff;
}

.widget-right {
  display: flex;
  flex-direction: column;
}

.widget-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.widget-sub {
  font-size: 12px;
  color: #a1a1a6;
  margin-top: 2px;
}

/* App Grid */
.app-grid {
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 22px 14px;
}

.app-icon-item {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: #ffffff;
  transition: transform 0.12s ease;
}

.app-icon-item:active {
  transform: scale(0.9);
}

.app-icon {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.app-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.2px;
  margin-top: 5px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Specific App Icon Aesthetics */
.app-icon-messages {
  background: linear-gradient(135deg, #34c759 0%, #248a3d 100%);
  color: #ffffff;
}

.app-icon-photos {
  background: #ffffff;
  overflow: hidden;
}

.photos-flower-symbol {
  position: relative;
  width: 32px;
  height: 32px;
}

.photos-flower-symbol.mini {
  transform: scale(0.75);
}

.photos-flower-symbol .petal {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  opacity: 0.88;
}

.p1 { top: 0; left: 9px; background: #ff3b30; }
.p2 { top: 9px; right: 0; background: #ff9500; }
.p3 { bottom: 0; left: 9px; background: #007aff; }
.p4 { top: 9px; left: 0; background: #34c759; }

.app-icon-notes {
  background: linear-gradient(180deg, #ffd60a 0%, #e5bc00 100%);
  overflow: hidden;
  padding: 6px;
  display: flex;
  flex-direction: column;
}

.notes-header-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
  margin-bottom: 6px;
}

.notes-ruled-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.notes-ruled-lines span {
  height: 2px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 1px;
}

.notes-ruled-lines.mini span {
  height: 1.5px;
  gap: 3px;
}

.app-icon-phone {
  background: linear-gradient(135deg, #30d158 0%, #1e8738 100%);
  color: #ffffff;
}

.app-icon-settings {
  background: linear-gradient(135deg, #8e8e93 0%, #48484a 100%);
  color: #ffffff;
}

/* Badge (Red counter circle) */
.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--ios-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #000000;
  box-shadow: 0 2px 6px rgba(255, 69, 58, 0.5);
}

.badge.hidden {
  display: none;
}

/* Bottom Dock */
.dock-container {
  margin-top: auto;
  margin-left: 16px;
  margin-right: 16px;
  border-radius: 32px;
  padding: 12px 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.dock-icon-item {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.dock-icon-item:active {
  transform: scale(0.88);
}

/* Push Notification Banner */
.notification-banner {
  position: absolute;
  top: 14px;
  left: 12px;
  right: 12px;
  z-index: 85;
  background: rgba(26, 28, 40, 0.92);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  padding: 14px 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transform: translateY(-160%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.55s var(--ease-spring), opacity 0.3s ease;
}

.notification-banner.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.notif-app-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-app-icon {
  font-size: 13px;
}

.notif-app-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #a1a1a6;
}

.notif-time {
  font-size: 11px;
  color: #8e8e93;
}

.notif-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-avatar img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.notif-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.notif-message {
  font-size: 13px;
  color: #dedee3;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-drag-bar {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  margin: 8px auto 0 auto;
}

/* ==========================================================================
   APP SCREENS CONTAINER & GENERAL APP ARCHITECTURE
   ========================================================================== */

.app-screens-container {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.app-window {
  position: absolute;
  inset: 0;
  background: #000000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: scale(0.92);
  transition: all 0.35s var(--ease-spring);
  padding-top: 48px;
  padding-bottom: 24px;
}

.app-window.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: scale(1);
}

/* App Nav Bar (iOS standard header) */
.app-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.nav-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.nav-text-btn {
  font-size: 16px;
  color: var(--ios-blue);
  cursor: pointer;
}

.nav-back-to-home-btn {
  background: transparent;
  border: none;
  color: var(--ios-blue);
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 4px 6px 4px 0;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}

.nav-back-to-home-btn:active {
  opacity: 0.6;
}

.nav-icon-btn {
  background: transparent;
  border: none;
  color: var(--ios-blue);
  cursor: pointer;
}

.app-view {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.app-view.active {
  display: flex;
}

/* Search bar */
.search-bar-wrapper {
  padding: 10px 16px;
}

.search-bar {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-bar input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 14px;
  width: 100%;
  outline: none;
}

/* ==========================================================================
   APP 1: MESSAGES APP
   ========================================================================== */

#app-window-messages {
  background: #000000;
}

.conversation-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.15s ease;
}

.conversation-item:active {
  background: rgba(255, 255, 255, 0.06);
}

.conv-avatar-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.conv-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 13px;
  height: 13px;
  background: var(--ios-green);
  border: 2px solid #000000;
  border-radius: 50%;
}

.conv-info {
  flex: 1;
  min-width: 0;
}

.conv-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3px;
}

.conv-name {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.conv-time {
  font-size: 12px;
  color: #8e8e93;
}

.conv-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.conv-preview {
  font-size: 13px;
  color: #8e8e93;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.conv-badge {
  background: var(--ios-blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  flex-shrink: 0;
}

/* Chat Thread View */
.thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(18, 20, 28, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.thread-back-btn {
  background: transparent;
  border: none;
  color: var(--ios-blue);
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 4px;
}

.thread-back-label {
  font-size: 15px;
  font-weight: 500;
}

.thread-contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thread-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.thread-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.thread-status {
  font-size: 10px;
  color: var(--ios-green);
}

.thread-actions {
  display: flex;
}

.thread-icon-btn {
  background: transparent;
  border: none;
  color: var(--ios-blue);
  cursor: pointer;
  padding: 6px;
}

/* Chat Stream */
.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubbles-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble-row {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  animation: bubblePop 0.28s var(--ease-spring);
}

@keyframes bubblePop {
  0% { opacity: 0; transform: translateY(10px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-bubble-row.sent {
  align-self: flex-end;
}

.chat-bubble-row.received {
  align-self: flex-start;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: -0.2px;
  word-break: break-word;
}

.chat-bubble-row.sent .chat-bubble {
  background: var(--ios-bubble-sent);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-bubble-row.received .chat-bubble {
  background: var(--ios-bubble-recv);
  color: #f2f2f7;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-bubble.chat-bubble-image {
  padding: 4px;
  max-width: 220px;
  overflow: hidden;
}

.chat-photo-wrap {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
}

.chat-photo-attachment {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.chat-photo-attachment:hover {
  transform: scale(1.02);
  opacity: 0.95;
}

.chat-text {
  padding: 8px 10px 4px 10px;
  font-size: 13.5px;
  line-height: 1.35;
}

.chat-bubble-meta {
  font-size: 10px;
  color: #8e8e93;
  margin-top: 3px;
  align-self: flex-end;
}

.chat-bubble-row.received .chat-bubble-meta {
  align-self: flex-start;
}

/* Typing Indicator */
.typing-indicator-row {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  animation: fadeIn 0.25s ease;
}

.typing-indicator-row.hidden {
  display: none !important;
}

.typing-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.typing-bubble {
  background: var(--ios-bubble-recv);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8e8e93;
  animation: typingBounce 1.3s infinite;
}

.dot-1 { animation-delay: 0s; }
.dot-2 { animation-delay: 0.2s; }
.dot-3 { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Quick Replies Bar */
.quick-replies-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 12px;
  background: rgba(15, 17, 24, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.quick-replies-bar.hidden {
  display: none;
}

.quick-reply-pill {
  background: rgba(0, 122, 255, 0.18);
  border: 1px solid rgba(0, 122, 255, 0.4);
  color: #70b4ff;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-reply-pill:hover {
  background: rgba(0, 122, 255, 0.3);
  color: #ffffff;
}

.quick-reply-pill:active {
  transform: scale(0.95);
}

/* Chat Input Bar */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(18, 20, 26, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.input-tool-btn {
  background: transparent;
  border: none;
  color: #8e8e93;
  cursor: pointer;
}

.chat-input-field {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 6px 14px;
}

.chat-input-field input {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 14px;
  outline: none;
}

.chat-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ios-blue);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.chat-send-btn:active {
  transform: scale(0.9);
}

/* ==========================================================================
   APP 2: PHOTOS APP
   ========================================================================== */

#app-window-photos {
  background: #000000;
}

.photos-tabs-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.photos-tab {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #8e8e93;
  cursor: pointer;
  padding: 4px 8px;
}

.photos-tab.active {
  color: #ffffff;
  border-bottom: 2px solid #ffffff;
}

.photos-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
}

.photo-section-header {
  padding: 12px 14px 6px 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.section-sub {
  font-size: 12px;
  color: #8e8e93;
}

/* 3-Column Square Thumbnail Grid */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 2px;
}

.photo-thumb-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: #151822;
}

.photo-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.photo-thumb-item:hover img {
  transform: scale(1.04);
}

.photo-thumb-item:active {
  opacity: 0.8;
}

/* Fullscreen Photo Viewer Modal */
.photo-viewer-modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 50;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.25s ease;
}

.photo-viewer-modal.hidden {
  display: none;
}

.viewer-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 54px 18px 12px 18px;
  z-index: 10;
}

.viewer-btn {
  background: rgba(255, 255, 255, 0.14);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallpaper-action-sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.wallpaper-action-sheet-overlay.hidden {
  display: none !important;
}

.wallpaper-action-card {
  background: rgba(30, 32, 44, 0.95);
  backdrop-filter: blur(25px);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.wallpaper-action-btn {
  width: 100%;
  padding: 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #0a84ff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.wallpaper-action-btn:last-child {
  border-bottom: none;
}

.wallpaper-action-btn:active {
  background: rgba(255, 255, 255, 0.12);
}

.wallpaper-cancel-btn {
  width: 100%;
  padding: 16px;
  background: rgba(30, 32, 44, 0.95);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ff453a;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.wallpaper-toast {
  position: absolute;
  top: 55px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 22, 32, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 10px 20px;
  border-radius: 20px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  z-index: 120;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.wallpaper-toast.hidden {
  display: none !important;
}

.viewer-counter {
  font-size: 14px;
  font-weight: 600;
  color: #8e8e93;
}

.viewer-main-image-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 10px;
}

.viewer-main-image-wrap img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.viewer-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 22, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.15s ease;
}

.viewer-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.prev-btn { left: 14px; }
.next-btn { right: 14px; }

.viewer-caption-card {
  background: rgba(20, 22, 32, 0.85);
  backdrop-filter: blur(25px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 20px 24px 20px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.viewer-caption-card.hidden-caption {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.caption-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.caption-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #8e8e93;
  margin-top: 3px;
  margin-bottom: 8px;
}

.caption-location {
  color: var(--ios-yellow);
}

.caption-text {
  font-size: 13px;
  line-height: 1.4;
  color: #dedee3;
}

/* ==========================================================================
   APP 3: NOTES APP
   ========================================================================== */

#app-window-notes {
  background: #000000;
}

.notes-nav-bar {
  border-bottom: none;
}

.notes-folder-tag {
  font-size: 15px;
  color: var(--ios-yellow);
}

.notes-yellow {
  color: var(--ios-yellow);
}

.notes-search-wrapper {
  padding: 0 16px 8px 16px;
}

.notes-count-bar {
  padding: 0 16px 8px 16px;
  font-size: 11px;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notes-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-card-item {
  background: #1c1c1e;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.15s ease;
}

.note-card-item:active {
  background: #2c2c2e;
  transform: scale(0.98);
}

.note-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.note-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.note-card-lock-badge {
  font-size: 13px;
  color: var(--ios-yellow);
}

.note-card-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #8e8e93;
}

.note-card-date {
  color: #a1a1a6;
}

.note-card-snippet {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Note Reader Detail View */
.notes-back-btn {
  background: transparent;
  border: none;
  color: var(--ios-yellow);
  display: flex;
  align-items: center;
  font-size: 16px;
  cursor: pointer;
}

.note-reader-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.note-reader-date {
  font-size: 12px;
  color: #8e8e93;
  margin-bottom: 8px;
}

.note-reader-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.4px;
}

.note-reader-body {
  font-size: 14px;
  line-height: 1.6;
  color: #e5e5ea;
  white-space: pre-wrap;
  font-family: inherit;
}

/* Locked Note Overlay */
.note-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(20px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.note-lock-overlay.hidden {
  display: none;
}

.note-lock-card {
  width: 100%;
  max-width: 310px;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.note-lock-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.note-lock-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.note-lock-sub {
  font-size: 12px;
  color: #8e8e93;
  margin-bottom: 16px;
}

.note-pin-dots {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.np-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  transition: all 0.15s ease;
}

.np-dot.filled {
  background: var(--ios-yellow);
  border-color: var(--ios-yellow);
  box-shadow: 0 0 8px rgba(255, 214, 10, 0.6);
}

.note-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 58px);
  grid-gap: 10px;
  margin-bottom: 14px;
}

.nkey {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  font-size: 22px;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}

.nkey:active {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0.92);
}

.nkey.aux-k {
  font-size: 13px;
  font-weight: 600;
  color: var(--ios-yellow);
  background: transparent;
}

.note-hint-label {
  font-size: 11px;
  color: var(--ios-yellow);
  background: rgba(255, 214, 10, 0.12);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 12px;
}

.note-hint-label.hidden {
  display: none;
}

.note-cancel-btn {
  background: transparent;
  border: none;
  color: var(--ios-blue);
  font-size: 15px;
  cursor: pointer;
}

/* ==========================================================================
   APP 4: PHONE APP
   ========================================================================= */

#app-window-phone {
  background: #000000;
}

.phone-tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.phone-tab-content.active {
  display: block;
}

/* Recents list */
.recents-list, .contacts-list {
  padding: 0 16px;
}

.call-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.call-info-left {
  display: flex;
  flex-direction: column;
}

.call-name {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.call-name.missed {
  color: var(--ios-red);
}

.call-sub {
  font-size: 12px;
  color: #8e8e93;
}

.call-meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #8e8e93;
}

.info-icon-btn {
  color: var(--ios-blue);
  font-size: 18px;
}

/* Voicemail Player */
.voicemail-card {
  margin: 16px;
  border-radius: 18px;
  padding: 18px;
}

.vm-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.vm-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--ios-red);
  background: rgba(255, 69, 58, 0.15);
  border: 1px solid rgba(255, 69, 58, 0.3);
  padding: 2px 8px;
  border-radius: 10px;
}

.vm-time {
  font-size: 12px;
  color: #8e8e93;
}

.vm-sender {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.vm-duration {
  font-size: 12px;
  color: #8e8e93;
  margin-bottom: 14px;
}

.vm-player {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.vm-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ios-blue);
  color: #ffffff;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vm-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
}

.wbar {
  width: 3px;
  height: 12px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

.vm-waveform.playing .wbar {
  background: var(--ios-blue);
  animation: wavePulse 0.8s infinite ease-in-out alternate;
}

.vm-waveform.playing .wbar:nth-child(2n) { animation-delay: 0.15s; }
.vm-waveform.playing .wbar:nth-child(3n) { animation-delay: 0.3s; }

@keyframes wavePulse {
  0% { height: 6px; }
  100% { height: 26px; }
}

.vm-transcript-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vm-transcript-label {
  font-size: 11px;
  font-weight: 700;
  color: #8e8e93;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.vm-transcript-text {
  font-size: 13px;
  line-height: 1.4;
  color: #f2f2f7;
  font-style: italic;
}

/* Phone Keypad */
.phone-dialer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

.dialer-display {
  font-size: 28px;
  font-weight: 300;
  height: 38px;
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.dialer-grid {
  display: grid;
  grid-template-columns: repeat(3, 70px);
  grid-gap: 14px 24px;
  margin-bottom: 20px;
}

.dial-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #2c2c2e;
  border: none;
  color: #ffffff;
  font-size: 28px;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dial-btn span {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #8e8e93;
  margin-top: -2px;
}

.dial-btn:active {
  background: #48484a;
  transform: scale(0.92);
}

.call-action-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--ios-green);
  border: none;
  font-size: 26px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.call-action-btn:active {
  transform: scale(0.92);
}

/* Phone bottom nav */
.phone-bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  background: rgba(20, 22, 30, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.phone-tab-btn {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #8e8e93;
  cursor: pointer;
}

.phone-tab-btn.active {
  color: var(--ios-blue);
}

.phone-tab-btn .tab-icon {
  font-size: 18px;
}

.phone-tab-btn .tab-name {
  font-size: 10px;
  font-weight: 500;
}

/* ==========================================================================
   APP 5: SETTINGS / STORY BRIEF
   ========================================================================== */

#app-window-settings {
  background: #000000;
}

.settings-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.settings-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #1c1c1e;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.settings-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.settings-user-info h3 {
  font-size: 17px;
  font-weight: 700;
}

.settings-user-info p {
  font-size: 12px;
  color: #8e8e93;
  margin-top: 2px;
  margin-bottom: 6px;
}

.status-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.status-pill.warning {
  background: rgba(255, 69, 58, 0.15);
  color: var(--ios-red);
  border: 1px solid rgba(255, 69, 58, 0.3);
}

.settings-group {
  background: #1c1c1e;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row.clickable {
  cursor: pointer;
}

.settings-row.clickable:active {
  background: rgba(255, 255, 255, 0.08);
}

.row-value {
  color: #8e8e93;
}

.text-danger {
  color: var(--ios-red);
  font-weight: 600;
}

.text-warning {
  color: var(--ios-yellow);
  font-weight: 600;
}

.story-notes-card {
  background: rgba(255, 214, 10, 0.08);
  border: 1px solid rgba(255, 214, 10, 0.25);
  border-radius: 14px;
  padding: 16px;
}

.story-notes-card h4 {
  font-size: 14px;
  color: var(--ios-yellow);
  margin-bottom: 6px;
}

.story-notes-card p {
  font-size: 12px;
  line-height: 1.4;
  color: #dedee3;
  margin-bottom: 10px;
}

.story-notes-card ul {
  padding-left: 20px;
  font-size: 12px;
  color: #dedee3;
}

/* ==========================================================================
   GLOBAL HOME INDICATOR BAR (SWIPE-UP BAR)
   ========================================================================== */

.home-indicator-zone {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  cursor: pointer;
  pointer-events: auto;
}

.home-indicator-bar {
  width: 135px;
  height: 5px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 100px;
  transition: all 0.2s ease;
}

.home-indicator-zone:hover .home-indicator-bar {
  background: #ffffff;
  transform: scaleY(1.3);
}

.home-indicator-zone:active .home-indicator-bar {
  transform: scaleX(0.85) scaleY(1.5);
}

/* Utility Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hidden {
  display: none !important;
}
