:root {
  --bg: #0F0F11;
  --surface: #1A1A1E;
  --surface2: #242428;
  --border: #2E2E34;
  --border2: #3E3E46;
  --text: #F0EFF4;
  --text2: #9895A4;
  --text3: #5E5C6B;
  --accent: #7C6FF7;
  --accent2: #A99DF7;
  --radius: 12px;
  --radius-sm: 8px;
  --mono: 'Courier New', Courier, monospace;
}

html { height: 100%; }
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.header-eyebrow {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
  white-space: nowrap;
}
.header h1 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
}
.header p {
  color: var(--text2);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
}

.picker-panel {
  width: 420px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}
.picker-panel::-webkit-scrollbar { width: 4px; }
.picker-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.style-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  margin-bottom: 4px;
  padding-left: 2px;
}

.style-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.style-item:hover { border-color: var(--border2); background: var(--surface2); }
.style-item.active { border-color: var(--accent); background: rgba(124,111,247,0.08); }

.item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.item-info { flex: 1; min-width: 0; }
.item-name { font-size: 13px; font-weight: 600; color: var(--text); }
.item-sub { font-size: 12px; color: var(--text2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
  flex-shrink: 0;
}

.detail-panel {
  padding: 16px;
}

.demo-panel {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
}
.demo-panel iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg);
}
.demo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text2);
  text-align: center;
}

.detail-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}
.detail-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.detail-title { font-size: 18px; font-weight: 600; color: var(--text); }
.detail-tagline { font-size: 13px; color: var(--text2); margin-top: 2px; }

.detail-body { padding: 20px 24px; }

.preview-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.preview-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  margin-bottom: 12px;
}
.preview-container {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
}
.preview-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.preview-label-small {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.preview-demo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  width: 100%;
}

.desc-box {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  border-left: 3px solid var(--accent);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.desc-box p { font-size: 13px; color: var(--text2); line-height: 1.7; }

.props-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.prop-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.prop-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); margin-bottom: 4px; }
.prop-value { font-size: 12px; color: var(--text); line-height: 1.5; }

.tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border2);
  color: var(--text2);
  background: var(--surface2);
}

.prompt-section { margin-top: 4px; }
.prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.prompt-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); }
.copy-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.15s;
}
.copy-btn:hover { opacity: 0.85; }
.copy-btn.copied { background: #1D9E75; }

.prompt-box {
  background: #0A0A0C;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: #B4B0CC;
  white-space: pre-wrap;
  line-height: 1.8;
  max-height: 300px;
  overflow-y: auto;
}
.prompt-box::-webkit-scrollbar { width: 4px; }
.prompt-box::-webkit-scrollbar-track { background: transparent; }
.prompt-box::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.tip-box {
  margin-top: 16px;
  background: rgba(124,111,247,0.06);
  border: 1px solid rgba(124,111,247,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
}
.tip-box strong { color: var(--accent2); }

.empty-state {
  padding: 80px 32px;
  text-align: center;
  color: var(--text2);
}
.big-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.7;
}

@media (max-width: 900px) {
  body { height: auto; overflow: auto; }
  .main { flex-direction: column; flex: auto; }
  .picker-panel { width: 100%; max-height: 45vh; border-right: none; border-bottom: 1px solid var(--border); }
  .demo-panel { flex: auto; height: 55vh; }
  .demo-panel iframe { position: static; min-height: 400px; }
  .header p { display: none; }
  .props-grid { grid-template-columns: 1fr; }
  .preview-container { grid-template-columns: 1fr 1fr; }
}
