/* ===== 绘本导演 1-2 ===== */
.picture-book-page {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 背景 */
.pb-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.pb-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
}

.pb-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 50% 0%, transparent 0%, rgba(10, 12, 46, 0.25) 60%, rgba(10, 12, 46, 0.55) 100%),
    linear-gradient(180deg, rgba(10, 12, 46, 0.2) 0%, transparent 35%, rgba(10, 12, 46, 0.45) 100%);
  pointer-events: none;
}

/* 内容容器 */
.pb-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 24px 14px;
  overflow-y: auto;
  gap: 12px;
}

/* 顶部标题 */
.pb-header {
  text-align: center;
  margin-bottom: 2px;
}

.pb-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 46px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 4px;
  text-shadow:
    0 0 20px rgba(123, 108, 219, 0.7),
    0 0 40px rgba(123, 108, 219, 0.45),
    0 4px 16px rgba(0, 0, 0, 0.35);
  margin-bottom: 6px;
}

.pb-title-star {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 8px rgba(255, 209, 102, 0.9));
  margin-left: -4px;
  flex-shrink: 0;
}

.pb-subtitle {
  font-size: 16px;
  color: #FFF5C8;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 8px rgba(244, 197, 66, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* 主工作区 */
.pb-main {
  display: flex;
  align-items: stretch;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

/* 玻璃面板公共样式 */
.pb-glass-panel {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(32, 40, 115, 0.72) 0%, rgba(18, 24, 80, 0.72) 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.pb-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pb-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.pb-panel-title .icon {
  font-size: 18px;
}

.pb-panel-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.25s ease;
}

.pb-panel-more:hover {
  color: var(--primary-gold-light);
}

/* 左侧工作台 */
.pb-workbench {
  width: 33%;
  min-width: 310px;
  max-width: 370px;
  padding: 14px 16px 12px;
  gap: 8px;
  flex-shrink: 0;
}

.pb-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.pb-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.25s ease;
}

.pb-option:hover,
.pb-option.active {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 209, 102, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.pb-option-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pb-option-label {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
}

.pb-option-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.pb-option-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.pb-option-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  padding: 3px 7px;
  border-radius: 10px;
  background: linear-gradient(180deg, #FF6B6B 0%, #EE5253 100%);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(238, 82, 83, 0.45);
}

.pb-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.pb-btn-primary,
.pb-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
}

.pb-btn-primary {
  height: 50px;
  border-radius: 26px;
  color: #5C3D05;
  background: linear-gradient(180deg, #FFECB3 0%, #FFD166 35%, #F4C542 65%, #E8A838 100%);
  box-shadow:
    0 5px 0 #C97D20,
    0 8px 22px rgba(244, 197, 66, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.pb-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 7px 0 #C97D20,
    0 12px 28px rgba(244, 197, 66, 0.55);
}

.pb-btn-secondary {
  height: 44px;
  border-radius: 24px;
  color: #FFFFFF;
  background: linear-gradient(180deg, rgba(110, 140, 245, 0.82) 0%, rgba(75, 105, 220, 0.88) 50%, rgba(55, 85, 195, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 5px 0 rgba(35, 60, 150, 0.9),
    0 8px 22px rgba(60, 90, 200, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.pb-btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 7px 0 rgba(35, 60, 150, 0.9),
    0 12px 28px rgba(60, 90, 200, 0.5);
}

/* 右侧预览 */
.pb-preview {
  flex: 1;
  padding: 12px 14px 10px;
  gap: 8px;
  min-width: 0;
}

.pb-enlarge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.pb-enlarge:hover {
  background: rgba(255, 255, 255, 0.18);
}

.pb-book-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  gap: 8px;
}

.pb-nav {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 26, 80, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pb-nav:hover {
  background: rgba(40, 48, 120, 0.75);
  transform: scale(1.1);
}

.pb-book {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 245, 210, 0.16) 0%, rgba(255, 235, 190, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
}

.pb-book::before {
  content: '';
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.18) 20%, rgba(255, 255, 255, 0.18) 80%, transparent 100%);
  transform: translateX(-50%);
  pointer-events: none;
}

.pb-page {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.pb-page-visual {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  background: rgba(0, 0, 0, 0.15);
}

.pb-page-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.pb-page-caption {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  line-height: 1.4;
  max-width: 95%;
}

.pb-page-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
}

.pb-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.pb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.25s ease;
}

.pb-dot.active {
  background: #FFFFFF;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* 底部区域 */
.pb-bottom {
  display: flex;
  gap: 14px;
  min-height: 220px;
  height: auto;
}

.pb-recent {
  flex: 1.15;
  padding: 16px 18px;
  gap: 12px;
}

.pb-recent-list {
  display: flex;
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.pb-recent-card {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.pb-recent-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.pb-recent-cover {
  width: 56px;
  height: 74px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.pb-recent-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding-top: 4px;
}

.pb-recent-title {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.35;
}

.pb-recent-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.pb-styles {
  flex: 1;
  padding: 16px 18px;
  gap: 12px;
}

.pb-style-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
  min-height: 0;
  max-height: 180px;
  overflow-y: auto;
}

.pb-style-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.pb-style-chip strong { font-size: 13px; }
.pb-style-chip em { font-style: normal; font-size: 11px; line-height: 1.4; color: rgba(255,255,255,.72); }
.pb-style-chip span { font-size: 11px; color: #FFD166; }
.pb-style-chip:hover,
.pb-style-chip.active {
  transform: translateY(-2px);
  border-color: rgba(255, 209, 102, 0.55);
  background: rgba(255, 209, 102, 0.14);
}

.pb-style-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 10, 32, 0.72);
}
.pb-style-modal[hidden] { display: none; }
.pb-style-modal-panel {
  width: min(920px, 100%);
  max-height: 86vh;
  overflow: auto;
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(160deg, #1a2158, #12163c);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.pb-style-modal-panel header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.pb-style-modal-panel h3 { margin: 0 0 6px; color: #fff; font-size: 22px; }
.pb-style-modal-panel p { margin: 0; color: rgba(255,255,255,.7); font-size: 13px; }
.pb-style-modal-panel header button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.pb-style-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 52vh;
  overflow-y: auto;
  margin-bottom: 16px;
}

.pb-style-card {
  flex: 1;
  min-width: 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
}

.pb-style-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

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

.pb-style-label {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 8px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, transparent 0%, rgba(60, 45, 120, 0.85) 100%);
}

/* 滚动条 */
.pb-content::-webkit-scrollbar {
  width: 5px;
}

.pb-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
