/* 手机外壳与原型主控台样式 */

.prototype-workspace {
  display: flex;
  min-height: 100vh;
  background-color: #0b1528; /* 深色沉浸式底色，突出浅色手机 */
  color: #cdd6f4;
  font-family: 'Hanken Grotesk', -apple-system, sans-serif;
  overflow: hidden;
}

/* 左侧控制面板 */
.control-sidebar {
  width: 320px;
  background-color: #0f1c34;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-subtitle {
  font-size: 13px;
  color: #7a90b5;
  margin-bottom: 24px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #567098;
  margin: 16px 0 8px 0;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #a5b9d7;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.nav-btn.active {
  background-color: #d15656;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(209, 86, 86, 0.3);
}

.nav-btn .page-code {
  font-family: monospace;
  font-size: 10px;
  opacity: 0.6;
}

/* 控制面板底部项目信息 */
.project-info {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #567098;
  line-height: 1.6;
}

.project-info a {
  color: #ffffff;
  text-decoration: none;
}

/* 核心演练区 (居中展示手机) */
.preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px;
}

/* 高保真拟物 iPhone 外壳 */
.iphone-frame {
  width: 395px;
  height: 820px;
  background-color: #2e3033; /* 手机框暗哑金属色 */
  border-radius: 50px;
  padding: 13px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5), 
    inset 0 0 3px 2px rgba(255, 255, 255, 0.1),
    0 0 0 4px #1c1d1f;
  position: relative;
  transition: all 0.3s ease;
}

/* iPhone 内侧黑边 */
.iphone-screen-container {
  width: 100%;
  height: 100%;
  background-color: #000;
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 灵动岛 (Dynamic Island) */
.dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 105px;
  height: 28px;
  background-color: #000000;
  border-radius: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 1px 1px rgba(255, 255, 255, 0.05);
}

.dynamic-island .camera {
  width: 11px;
  height: 11px;
  background-color: #111122;
  border-radius: 50%;
  box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.5);
  position: relative;
}

.dynamic-island .camera::after {
  content: '';
  width: 4px;
  height: 4px;
  background-color: #0b1528;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
}

.dynamic-island .sensor {
  width: 6px;
  height: 6px;
  background-color: #0d0d0d;
  border-radius: 50%;
}

/* 小程序 iframe 窗口 */
.miniprogram-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: #f9f9f9;
  display: block;
}

/* 物理按键 */
.side-button {
  position: absolute;
  background-color: #1c1d1f;
  border-radius: 2px;
  left: -4px;
}
.side-button.silent {
  top: 140px;
  width: 4px;
  height: 30px;
}
.side-button.vol-up {
  top: 190px;
  width: 4px;
  height: 55px;
}
.side-button.vol-down {
  top: 260px;
  width: 4px;
  height: 55px;
}
.side-button.power {
  left: auto;
  right: -4px;
  top: 220px;
  width: 4px;
  height: 80px;
}

/* 屏幕下方指示条 */
.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 5px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  z-index: 999;
  pointer-events: none;
}

/* 操作说明面板 (右侧) */
.readme-sidebar {
  width: 340px;
  background-color: #0f1c34;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
  flex-shrink: 0;
}

.readme-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.readme-content {
  font-size: 13px;
  color: #a5b9d7;
  line-height: 1.6;
}

.readme-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}

.readme-card strong {
  color: #ffffff;
}

.readme-card ul {
  padding-left: 16px;
  margin-top: 6px;
}

/* 顶部标题区，支持复位清除本地缓存 */
.reset-cache-btn {
  margin-top: 12px;
  background: rgba(209, 86, 86, 0.1);
  border: 1px solid rgba(209, 86, 86, 0.3);
  color: #ff9e9e;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.reset-cache-btn:hover {
  background: rgba(209, 86, 86, 0.2);
  color: #ffffff;
}
