/* 风格选择页面 v4 专属样式 */

.theme-selector-main {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 20px 0 48px;
}

/* ── 页面标题 ── */
.theme-selector-hero {
  text-align: center;
  padding: 18px 0 24px;
}

.theme-selector-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 6px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple), var(--neon-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-selector-hero .subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
}

/* ── 主题卡片网格（3 列）── */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ── 主题卡片 ── */
.theme-card {
  background: var(--bg-card);
  border: 2px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 15px 15px 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.3s var(--ease-neon);
}

.theme-card:hover {
  border-color: var(--border-neon);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.1), 0 8px 28px rgba(0, 0, 0, 0.35);
  transform: translateY(-5px);
}

.theme-card.is-active {
  border-color: var(--border-neon-hover);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.16), inset 0 0 24px rgba(0, 240, 255, 0.04);
}

/* ── 当前激活徽章 ── */
.theme-card .active-badge {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 4px;
  padding: 3px 9px;
  pointer-events: none;
}

.theme-card:not(.is-active) .active-badge {
  display: none;
}

/* ═══════════════════════════════════════════
   微缩页面预览区
   ═══════════════════════════════════════════ */

.theme-preview {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  aspect-ratio: 16 / 12;
  display: flex;
  flex-direction: column;
}

/* 浏览器 chrome 伪装条 */
.preview-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.preview-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.preview-dot.d1 { background: #ff5f57; }
.preview-dot.d2 { background: #febc2e; }
.preview-dot.d3 { background: #28c840; }

.preview-url {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  margin-left: 4px;
  opacity: 0.3;
}

/* 预览内容区 */
.preview-body {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  overflow: hidden;
}

/* 预览中的迷你卡片 */
.preview-mini-card {
  padding: 8px 10px;
  line-height: 1.3;
}

.preview-mini-title {
  font-weight: 700;
  font-size: 0.68rem;
  margin-bottom: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.preview-mini-text {
  font-size: 0.56rem;
  opacity: 0.65;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 预览底部装饰条 */
.preview-accent-bar {
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
  margin: 0 4px 4px;
}

/* ── 卡片信息区 ── */
.theme-card .theme-name {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-card .theme-en {
  font-weight: 400;
  font-size: 0.64rem;
  color: var(--text-muted);
  margin-left: 5px;
}

.theme-card .theme-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 底部状态栏 ── */
.theme-selector-footer {
  text-align: center;
  margin-top: 26px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.theme-selector-footer span {
  color: var(--neon-cyan);
}

/* ── 响应式 ── */
@media (max-width: 980px) {
  .theme-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .theme-preview {
    aspect-ratio: 16 / 11;
  }
}

@media (max-width: 560px) {
  .theme-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .theme-preview {
    aspect-ratio: 16 / 10;
  }
}
