/* Mobile Styles for Live Wallpaper Studio */
:root {
  --primary-gradient: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
  --secondary-gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
}

.m-live-container {
  padding: 0.5rem 0.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Horizontal Scroll Presets */
.m-presets-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px;
  -webkit-overflow-scrolling: touch;
}
.m-presets-scroll::-webkit-scrollbar {
  display: none;
}

.m-preset-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 5px 12px;
  border-radius: 18px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.m-preset-pill.active {
  background: #fdf2f8;
  border-color: #f472b6;
  color: #db2777;
  box-shadow: 0 1px 4px rgba(236, 72, 153, 0.2);
}
.m-preset-pill.m-upload-pill {
  background: #f0fdf4;
  border-color: #86efac;
  color: #16a34a;
}

/* Centered iPhone 16 Pro Mockup */
.m-mockup-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

.iphone-mockup {
  position: relative;
  width: 250px;
  height: 508px;
  flex-shrink: 0;
  background: #000000;
  border-radius: 40px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35), inset 0 0 0 2.5px #383838, inset 0 0 0 5px #121212;
  overflow: hidden;
  user-select: none;
}

.iphone-screen {
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-radius: 35px;
  overflow: hidden;
  background: #090d16;
}

.iphone-video,
.iphone-cover-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  display: block;
}

/* Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 22px;
  background: #000000;
  border-radius: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 7px;
  pointer-events: none;
}
.island-camera {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111e38;
  border: 1px solid #1e293b;
}

/* Lockscreen Overlay */
.lockscreen-ui {
  position: absolute;
  top: 38px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ffffff;
  z-index: 15;
  pointer-events: none;
}

.lock-status-header {
  margin-bottom: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lock-status-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.lock-status-icon.unlocked {
  transform: scale(1.15) rotate(-6deg);
  animation: iosLockBounceMobile 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iosLockBounceMobile {
  0% { transform: scale(0.9) rotate(0deg); }
  50% { transform: scale(1.22) rotate(-12deg); }
  100% { transform: scale(1.15) rotate(-6deg); }
}

.lock-date {
  font-size: 0.92rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.lock-time {
  font-size: 4.8rem;
  font-weight: 850;
  line-height: 0.90;
  margin-top: 2px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  letter-spacing: -0.04em;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.35);
}

.lock-widgets {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.widget-pill {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #ffffff;
}

/* Bottom Actions */
.lockscreen-bottom-actions {
  position: absolute;
  bottom: 20px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 15;
  pointer-events: none;
}
.lock-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.lock-home-bar {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 95px;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 3px;
  z-index: 20;
  pointer-events: none;
}

.m-mockup-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.m-trigger-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.m-btn-unlock-instant {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
  color: #ffffff;
  border: 1px solid #f472b6;
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4);
  transition: all 0.2s ease;
}
.m-btn-unlock-instant:active {
  transform: scale(0.96);
}
.m-btn-unlock-instant.unlocking {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  border-color: #fda4af;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.6);
}

.m-mode-row {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px;
  border-radius: 16px;
  gap: 3px;
}
.m-mode-chip {
  background: transparent;
  border: none;
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.m-mode-chip.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.m-btn-wake {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  border: 1px solid #334155;
  padding: 6px 16px;
  border-radius: 18px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
  transition: all 0.2s ease;
}
.m-btn-wake.waking {
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
  border-color: #f472b6;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.5);
}

.m-hold-hint {
  background: #fdf2f8;
  color: #db2777;
  border: 1px solid #fbcfe8;
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.25s ease;
}
.m-hold-hint.unlocked {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}
.m-hold-hint.black-screen {
  background: #0f172a;
  color: #38bdf8;
  border-color: #0284c7;
}

.m-btn-screen-off {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #0f172a;
  color: #94a3b8;
  border: 1px solid #334155;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.m-btn-screen-off:hover {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #475569;
}

/* Screen Off & Black State (真正锁屏熄屏黑屏) */
.iphone-screen.is-screen-off {
  background: #000000 !important;
  filter: brightness(0) !important;
  transition: filter 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.iphone-screen.is-screen-off .lockscreen-ui,
.iphone-screen.is-screen-off .lockscreen-bottom-actions,
.iphone-screen.is-screen-off .lock-home-bar {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Screen Unlocking & Popping Out Live Motion (开屏瞬间弹出动画) */
.iphone-screen.is-screen-popping {
  animation: iosScreenPopMobile 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes iosScreenPopMobile {
  0% {
    filter: brightness(0.1) saturate(0.5);
    opacity: 0.25;
  }
  38% {
    filter: brightness(1.22) saturate(1.12);
    opacity: 1;
  }
  75% {
    filter: brightness(1.03) saturate(1.03);
    opacity: 1;
  }
  100% {
    filter: brightness(1) saturate(1);
    opacity: 1;
  }
}

.iphone-screen.is-screen-waking {
  animation: iosScreenPopMobile 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Controls Stack */
.m-controls-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.m-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.m-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.m-card-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1e293b;
}

.m-badge-pink {
  font-size: 0.68rem;
  font-weight: 800;
  color: #db2777;
  background: #fdf2f8;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #fbcfe8;
}
.m-badge-gray {
  font-size: 0.68rem;
  font-weight: 800;
  color: #475569;
  background: #f8fafc;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.m-trim-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.m-input-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.m-sub-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
}

.m-keyframe-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.m-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.m-btn-mini {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 6px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

/* Actions Card */
.m-actions-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-export-primary {
  width: 100%;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.btn-export-shortcut {
  width: 100%;
  background: var(--secondary-gradient);
  color: #ffffff;
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.m-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.m-btn-sub {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 7px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Tutorial */
.m-tutorial-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
}
.m-tutorial-head {
  font-size: 0.8rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 4px;
}
.m-tutorial-body {
  font-size: 0.74rem;
  color: #15803d;
  line-height: 1.5;
}
.m-tutorial-body p {
  margin: 0 0 4px 0;
}
.m-tip-highlight {
  font-weight: 800;
  color: #14532d;
  background: #dcfce7;
  padding: 2px 4px;
  border-radius: 4px;
}

/* Mini sliders */
.mini-slider,
.timeline-scrubber {
  width: 100%;
  accent-color: #ec4899;
}
