/* Live Wallpaper Tool Styles - Modern iPhone Lockscreen Studio */
:root {
  --primary-color: #ec4899;
  --primary-hover: #db2777;
  --primary-gradient: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
  --secondary-gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* Preset Demo Showcase Bar */
.live-presets-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-radius: 16px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.presets-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
}

.presets-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.preset-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.preset-pill-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.preset-pill-btn.active {
  background: #fdf2f8;
  border-color: #f472b6;
  color: #db2777;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.15);
}

.preset-pill-btn.upload-pill {
  background: #f0fdf4;
  border-color: #86efac;
  color: #16a34a;
}
.preset-pill-btn.upload-pill:hover {
  background: #dcfce7;
}

/* Main Card */
.main-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
  border: 1px solid #f1f5f9;
  padding: 2.2rem;
  margin-bottom: 2.5rem;
}

/* Two-Column Grid */
.live-workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .live-workspace {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Left Column: iPhone 16 Pro Mockup */
.mockup-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.iphone-mockup {
  position: relative;
  width: 320px;
  height: 650px;
  flex-shrink: 0;
  background: #000000;
  border-radius: 48px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 0 0 3px #383838, inset 0 0 0 6px #121212;
  overflow: hidden;
  user-select: none;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.iphone-mockup:hover {
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42), inset 0 0 0 3px #444, inset 0 0 0 6px #151515;
}

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

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

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

/* Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: 94px;
  height: 27px;
  background: #000000;
  border-radius: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 9px;
  pointer-events: none;
}

.island-camera {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111e38;
  border: 1px solid #1e293b;
}

/* Lockscreen Time & Widgets Overlay */
.lockscreen-ui {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ffffff;
  z-index: 15;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

.lock-status-icon {
  font-size: 1.15rem;
  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: iosLockBounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iosLockBounce {
  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: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.lock-time {
  font-size: 5.6rem;
  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.045em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

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

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

/* Bottom Actions: Flashlight & Camera */
.lockscreen-bottom-actions {
  position: absolute;
  bottom: 24px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 15;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lock-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

/* Bottom Home Indicator Bar */
.lock-home-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  z-index: 20;
  pointer-events: none;
}

.mockup-action-pills {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

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

.btn-unlock-instant {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
  color: #ffffff;
  border: 1px solid #f472b6;
  padding: 8px 22px;
  border-radius: 24px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(236, 72, 153, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-unlock-instant:hover {
  background: linear-gradient(135deg, #db2777 0%, #9333ea 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(236, 72, 153, 0.55);
}
.btn-unlock-instant:active {
  transform: scale(0.97);
}
.btn-unlock-instant.unlocking {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  border-color: #fda4af;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.65);
}
.unlock-btn-icon {
  font-size: 1rem;
}

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

.btn-wake-sim {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  border: 1px solid #334155;
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-wake-sim:hover {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
}
.btn-wake-sim.waking {
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
  border-color: #f472b6;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.55);
}

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

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

/* 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: iosScreenPop 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes iosScreenPop {
  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: iosScreenPop 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Right Column: Editor Sidebar */
.editor-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.control-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 1.15rem 1.35rem;
  border: 1px solid #e2e8f0;
}

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

.card-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #1e293b;
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #db2777;
  background: #fdf2f8;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid #fbcfe8;
}

.card-badge-secondary {
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  background: #ffffff;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.card-hint {
  font-size: 0.76rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.range-sliders-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.slider-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.slider-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.mini-slider {
  width: 100%;
  accent-color: #ec4899;
  cursor: pointer;
}

.keyframe-control-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-scrubber {
  width: 100%;
  accent-color: #6366f1;
  cursor: pointer;
}

.keyframe-preview-box {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#keyframeCanvas {
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  background: #0f172a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.btn-toggle-cover-mode {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-toggle-cover-mode:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.btn-toggle-cover-mode.active {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #c4b5fd;
}

.toggle-options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.field-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

.pill-toggle {
  background: #e2e8f0;
  border: none;
  color: #64748b;
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pill-toggle.active {
  background: #dbeafe;
  color: #1d4ed8;
}

/* Export Actions */
.export-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0.5rem;
}

.btn-export-primary {
  width: 100%;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
  transition: all 0.2s ease;
}
.btn-export-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.45);
}

.btn-export-shortcut {
  width: 100%;
  background: var(--secondary-gradient);
  color: #ffffff;
  border: none;
  padding: 11px 18px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  transition: all 0.2s ease;
}
.btn-export-shortcut:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.secondary-export-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-sub-action {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}
.btn-sub-action:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Tutorial Card */
.tutorial-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 1rem 1.2rem;
}

.tutorial-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.tutorial-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #166534;
}

.tutorial-steps {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.78rem;
  color: #15803d;
  line-height: 1.6;
}
.tutorial-steps li {
  margin-bottom: 4px;
}
.step-highlight {
  font-weight: 800;
  color: #14532d;
  background: #dcfce7;
  padding: 2px 4px;
  border-radius: 4px;
}

/* Modal Overlay & Box */
.shortcut-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.shortcut-modal-box {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  padding: 1.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: #94a3b8;
  cursor: pointer;
}

.shortcut-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.sc-step-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.sc-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ede9fe;
  color: #6d28d9;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.sc-step-item p {
  margin: 0;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.5;
}

.modal-cta-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-icloud-shortcut {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary-gradient);
  color: #ffffff;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 9px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
