/* device-frames.css - iPhone 外框 + 状态栏 + 导航栏 + 底部工具栏 */

:root {
  --screen-bg-dark: #000000;
  --screen-bg-light: #ffffff;
  --text-dark: #ffffff;
  --text-light: #1c1c1e;
  --text-dim-dark: rgba(235, 235, 245, 0.55);
  --text-dim-light: rgba(60, 60, 67, 0.55);
  --pill-bg-dark: rgba(58, 58, 60, 0.85);
  --pill-bg-light: rgba(220, 220, 225, 0.95);
}

/* ===== iPhone 通用外框 ===== */
.device {
  position: relative;
  flex-shrink: 0;
  background: linear-gradient(180deg, #3a3a3c 0%, #1c1c1e 100%);
  border-radius: 56px;
  padding: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 30px 80px rgba(0, 0, 0, 0.25),
    0 10px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.4s, background 0.3s;
}
.device-side {
  position: absolute;
  width: 3px;
  background: #2c2c2e;
  border-radius: 2px;
}
.device-side-left { left: -2px; top: 80px; bottom: 80px; }
.device-side-right { right: -2px; top: 100px; bottom: 100px; }

.device-frame {
  position: relative;
  background: #000;
  border-radius: 44px;
  overflow: hidden;
  /* 古典型机型用更窄 padding */
}

/* ===== 屏幕 ===== */
.device-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--screen-bg-dark);
  color: var(--text-dark);
  border-radius: 38px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", sans-serif;
  font-feature-settings: "ss01", "tnum";
}

/* ===== 浅色主题覆盖 ===== */
.device-light .device-screen {
  background: var(--screen-bg-light);
  color: var(--text-light);
}

/* ===== Dynamic Island ===== */
.island {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 36px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
  pointer-events: none;
}
.device-light .island { background: #000; }
.has-notch .island { display: none; }
.has-notch .device-screen::before {
  content: ''; position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 180px; height: 28px;
  background: #000;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
  z-index: 10;
}
.has-notch.has-homebtn .device-screen::before { display: none; }
.has-homebtn .island { display: none; }

/* ===== 状态栏 ===== */
.status-bar {
  height: 54px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  padding-top: 16px;
}
.has-notch .status-bar { padding-top: 0; height: 44px; }
.has-homebtn .status-bar { height: 22px; padding: 0 12px; font-size: 11px; }

.status-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-time {
  font-size: 17px;
  font-weight: 600;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.4px;
  line-height: 1;
  margin-top: -2px;  /* 视觉对齐 */
}
.has-homebtn .status-time { font-size: 11px; margin-top: 0; }

/* 勿扰模式月亮图标 */
.status-dnd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  opacity: 0.95;
}
.status-dnd svg {
  width: 14px; height: 14px;
  display: block;
}
.status-dnd.hidden { display: none; }
.has-homebtn .status-dnd { display: none; }

.status-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: inherit;
}
.status-signal svg,
.status-wifi svg {
  width: 18px; height: 12px;
  display: block;
}
.has-homebtn .status-signal svg,
.has-homebtn .status-wifi svg { width: 14px; height: 10px; }

/* 电池图标 */
.status-battery {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
}
.bat-body {
  position: relative;
  width: 24px; height: 12px;
  border: 1px solid currentColor;
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  padding: 1px;
}
.bat-fill {
  display: block;
  height: 100%;
  background: currentColor;
  border-radius: 1px;
}
.bat-cap {
  width: 2px; height: 5px;
  background: currentColor;
  border-radius: 0 1px 1px 0;
  opacity: 0.7;
  display: inline-block;
}
.bat-num {
  font-size: 14px;
  font-weight: 500;
  margin-left: 2px;
}
.has-homebtn .bat-body { width: 18px; height: 9px; }
.has-homebtn .bat-num { font-size: 11px; }

/* ===== 导航栏 ===== */
.nav-bar {
  height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  z-index: 4;
}
.nav-btn {
  width: 44px; height: 36px;
  border-radius: 18px;
  background: var(--pill-bg-dark);
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-share {
  width: 44px;
}
.nav-share svg {
  width: 18px; height: 18px;
}
.device-light .nav-btn {
  background: var(--pill-bg-light);
  color: var(--color-text-light, #1c1c1e);
}
.nav-right { display: flex; gap: 10px; align-items: flex-start; }
.nav-back svg { stroke-width: 3; }

/* 古典型（iPhone 4 风格）导航 */
.has-homebtn .nav-bar { height: 38px; padding: 4px 8px; }
.has-homebtn .nav-btn { background: transparent; color: inherit; border-radius: 4px; width: auto; height: auto; padding: 4px 6px; font-size: 14px; }

/* ===== 内容区 ===== */
.memo-scroll {
  flex: 1;
  overflow: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.memo-scroll::-webkit-scrollbar { display: none; }
.memo {
  /* 翻页通过 transform 平移切换 */
  transition: transform 0.25s ease;
  will-change: transform;
}

/* ===== 底部工具栏 ===== */
.bottom-toolbar {
  flex-shrink: 0;
  height: 78px;
  padding: 8px 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 4;
}
/* 左侧胶囊：内含 3 个图标 */
.bt-pill {
  display: inline-flex;
  align-items: center;
  background: var(--pill-bg-dark);
  border-radius: 22px;
  padding: 4px;
  gap: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.bt-pill .bt-btn {
  width: 40px; height: 40px;
  border-radius: 20px;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bt-pill .bt-btn:active { background: rgba(255, 255, 255, 0.1); }
.device-light .bt-pill .bt-btn:active { background: rgba(0, 0, 0, 0.08); }

/* 右侧独立编辑按钮 */
.bt-btn-edit {
  width: 48px; height: 48px;
  border-radius: 24px;
  background: var(--pill-bg-dark);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.bt-btn {
  width: 48px; height: 48px;
  border-radius: 24px;
  background: var(--pill-bg-dark);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.bt-btn svg { display: block; }
.device-light .bt-pill,
.device-light .bt-btn-edit {
  background: var(--pill-bg-light);
  color: #1c1c1e;
}
.has-homebtn .bottom-toolbar {
  height: 50px;
  padding: 6px 12px;
  border-top: 1px solid var(--color-line);
  background: rgba(248, 248, 248, 0.95);
}
.has-homebtn .bt-pill,
.has-homebtn .bt-btn-edit {
  background: transparent;
  color: inherit;
  border-radius: 6px;
  backdrop-filter: none;
}
.has-homebtn .bt-pill { padding: 0; }
.has-homebtn .bt-pill .bt-btn {
  width: 36px; height: 36px; border-radius: 6px; background: transparent;
}

/* ===== 各机型尺寸（屏幕宽×高，外框含 padding） ===== */
/* iPhone 15 Pro: 393×852（约 19.5:9），含 Dynamic Island */
.device-iphone-15-pro {
  width: 430px;
  height: 920px;
}
.device-iphone-15-pro .device-frame {
  width: 393px;
  height: 852px;
}

/* iPhone 15: 类似尺寸，铝金属外框 */
.device-iphone-15 {
  width: 430px;
  height: 920px;
}
.device-iphone-15 .device-frame {
  width: 393px;
  height: 852px;
}

/* iPhone 13 / 12: 刘海 */
.device-iphone-13 {
  width: 410px;
  height: 880px;
}
.device-iphone-13 .device-frame {
  width: 390px;
  height: 844px;
}

/* iPhone SE / 8: 无凹槽，Home 键 */
.device-iphone-se {
  width: 380px;
  height: 760px;
  border-radius: 38px;
}
.device-iphone-se .device-frame {
  width: 360px;
  height: 720px;
  border-radius: 26px;
  padding-top: 30px;
  padding-bottom: 30px;
}
.device-iphone-se .device-screen {
  border-radius: 4px;
  border: 2px solid #000;
}
.device-iphone-se .device-frame::after {
  content: '';
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  width: 50px; height: 50px;
  border: 2px solid #444;
  border-radius: 50%;
  background: #1c1c1e;
  z-index: 11;
}
.device-iphone-se .status-bar { background: transparent; }
.device-iphone-se.device-dark .device-screen { background: #000; }
.device-iphone-se.device-dark .nav-btn { color: #fff; }
.device-iphone-se.device-light .device-screen { background: #fafafa; }
.device-iphone-se.device-light .nav-btn { color: #1c1c1e; }
.device-iphone-se .memo-scroll { font-family: -apple-system, "PingFang SC", sans-serif; }

/* iPhone 4 / 复古 */
.device-iphone-4 {
  width: 360px;
  height: 700px;
  border-radius: 14px;
  background: linear-gradient(180deg, #2c2c2e 0%, #1c1c1e 100%);
  padding: 6px;
}
.device-iphone-4 .device-frame {
  width: 348px;
  height: 688px;
  border-radius: 8px;
  padding-top: 26px;
  padding-bottom: 26px;
}
.device-iphone-4 .device-screen {
  border-radius: 2px;
  border: 2px solid #000;
}
.device-iphone-4 .device-frame::after {
  content: '';
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 36px;
  border-radius: 4px;
  background: #444;
  z-index: 11;
}
.device-iphone-4 .memo-scroll {
  font-family: -apple-system, "PingFang SC", sans-serif;
}
