/* 
 * ReadSix 右侧 Android 手机模拟器全套 UI 样式
 * 100% 纯代码像素级匹配自 ReadSix Android 源码 Compose UI 组件
 */

.sim-phone-wrapper {
  position: sticky;
  top: 90px;
  width: 340px;
  height: 690px; /* 模拟大致的手机屏幕高度 */
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-primary); /* 模拟器物理边框 */
  border-radius: 42px;
  box-shadow: var(--neo-shadow);
  padding: 8px; /* 模拟器物理边框厚度 */
  display: flex;
  flex-direction: column;
  user-select: none;
}

.sim-phone-screen {
  flex: 1;
  background: var(--color-background);
  border: 1px solid var(--color-primary);
  border-radius: 34px; /* 屏幕内角 */
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* 顶部 Android 状态栏 */
.sim-status-bar {
  height: 34px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-primary);
  z-index: 50;
  font-family: var(--font-family-sans);
}

.sim-notch {
  width: 14px;
  height: 14px;
  background: var(--color-primary);
  border-radius: 50%;
}

/* 屏幕主内容层 */
.sim-screen-layer {
  flex: 1;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-background);
  font-family: var(--font-family-sans);
}

.sim-scrollable {
  /* 隐藏滚动条但保留滚动功能 */
  scrollbar-width: none; 
}
.sim-scrollable::-webkit-scrollbar {
  display: none;
}

/* ==== 首页书架 (BookShelfContent) 样式 ==== */
.shelf-padding {
  padding: 16px;
}

.resume-reading-title {
  font-family: var(--font-family-sans);
  font-weight: 900; /* Black */
  font-size: 1rem;
  letter-spacing: -0.5px;
  color: var(--color-on-surface);
  margin-top: 16px;
  margin-bottom: 12px;
}

.resume-card {
  width: 100%;
  border: var(--neo-border);
  background: var(--color-surface-container-low);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.resume-card-top {
  display: flex;
  gap: 16px;
}

.resume-cover {
  flex: 1;
  aspect-ratio: 2/3;
  border: var(--neo-border);
  background-color: var(--color-surface-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(26,26,26,0.3);
  font-weight: 900;
  font-size: 32px;
  overflow: hidden;
}
.resume-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resume-info {
  flex: 2;
  display: flex;
  flex-direction: column;
}

.resume-chapter {
  color: var(--color-secondary);
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.resume-book-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resume-author {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-on-surface-variant);
  margin-top: 6px;
}

.resume-progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  font-size: 0.65rem;
  font-weight: bold;
}

.resume-progress-bar {
  width: 100%;
  height: 8px;
  border: var(--neo-border);
  background: var(--color-surface-container-highest);
  margin-top: 6px;
}

.resume-progress-fill {
  height: 100%;
  background: var(--color-primary-fixed);
}

.btn-continue {
  margin-top: 16px;
  width: 100%;
  border: var(--neo-border);
  background: var(--color-primary-fixed);
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.btn-continue span {
  color: var(--color-primary);
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

/* 分类 Tab */
.category-tabs {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--color-primary);
  padding-bottom: 8px;
}

.category-tab-items {
  display: flex;
  align-items: center;
  gap: 4px;
}

.category-tab-item {
  font-family: var(--font-family-sans);
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: -0.2px;
  color: rgba(74,74,74,0.4);
  cursor: pointer;
}

.category-tab-item.active {
  color: var(--color-on-surface);
}

.category-tab-divider {
  width: 1px;
  height: 16px;
  background: rgba(26,26,26,0.3);
}

.sort-btn {
  font-size: 0.65rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--color-primary);
}

/* 3 列图书网格 */
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px; /* 水平间距 */
  row-gap: 16px; /* 垂直间距 */
  margin-top: 12px;
}

.book-card-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  cursor: pointer;
}

.book-card-cover {
  width: 100%;
  aspect-ratio: 2/3;
  border: var(--neo-border);
  background: var(--color-surface-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.book-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-card-title {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-card-author {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-on-surface-variant);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 匹配 Compose BottomNavBar.kt 56.dp 源码风格 */
.app-bottom-nav {
  height: 56px;
  background: var(--color-background);
  border-top: 1px solid rgba(26, 26, 26, 0.08); /* 顶部微弱阴影/线 */
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  z-index: 50;
}

.app-nav-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  cursor: pointer;
}

.nav-icon-container {
  padding-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon-container svg {
  width: 24px;
  height: 24px;
  stroke: rgba(26, 26, 26, 0.6); /* 默认 primary alpha 0.6 */
  fill: none;
}

.app-nav-item.active .nav-icon-container svg {
  width: 26px; /* 稍微大一点 */
  height: 26px;
  stroke: var(--color-primary-fixed); /* 选中变黄 */
  fill: var(--color-primary-fixed);
}

.app-nav-item span {
  font-family: var(--font-family-sans);
  font-weight: bold;
  font-size: 0.7rem;
  color: rgba(26, 26, 26, 0.6);
  margin-top: 2px;
}

.app-nav-item.active span {
  color: var(--color-primary-fixed); /* 选中变黄 */
}

/* 底部三大金刚按键 (◀  ●  ■) */
.sim-key-bar {
  height: 38px;
  background: var(--color-background);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  border-top: 1px solid transparent;
}

.sim-key-btn {
  padding: 4px 16px;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--color-primary);
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* 其余弹窗模块 (AI, 排版) 保留基础底座，调整边框样式 */
.sim-modal {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--color-surface-container-low);
  border-top: var(--neo-border);
  border-radius: 20px 20px 0 0;
  padding: 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.12);
  z-index: 40;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  max-height: 85%;
  overflow-y: auto;
}

.sim-modal.active {
  transform: translateY(0);
}

.sim-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: var(--neo-border);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--color-primary);
}

/* 阅读器全屏页面 */
.sim-reader-layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--theme-sand-bg);
  z-index: 30;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.sim-reader-layer.active {
  transform: translateY(0);
}
