/* ===== 响应式面板生成器 样式 ===== */

:root {
  --bg: #0f0f0f;
  --panel-bg: #1a1a1a;
  --border: #333;
  --text: #e0e0e0;
  --text-dim: #888;
  --accent: #c9a96e;
  --accent-hover: #dbb87a;
  --input-bg: #222;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ===== 顶部工具栏 ===== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.toolbar h1 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.toolbar h1 .hl {
  color: var(--accent);
}

.toolbar .spacer { flex: 1; }

.toolbar select,
.toolbar button {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.toolbar select:hover,
.toolbar button:hover {
  border-color: var(--accent);
}

.toolbar button.primary {
  background: var(--accent);
  color: #1a1a1a;
  border-color: var(--accent);
  font-weight: 600;
}

.toolbar button.primary:hover {
  background: var(--accent-hover);
}

/* ===== 主区域 ===== */
.main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ===== 侧栏 ===== */
.sidebar {
  width: 320px;
  flex-shrink: 0;
  background: var(--panel-bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px;
}

.group {
  margin-bottom: 20px;
}

.group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.field {
  margin-bottom: 12px;
}

.field:last-child { margin-bottom: 0; }

.field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.field label .val {
  color: var(--accent);
  font-weight: 600;
  font-family: 'Roboto Mono', monospace;
}

.field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.field input[type="text"] {
  width: 100%;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color .15s;
}

.field input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* 列表项编辑 */
.items-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.item-row .item-name {
  flex: 1;
  min-width: 0;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
  font-family: inherit;
}

.item-row .item-name:focus {
  outline: none;
  border-color: var(--accent);
}

.item-row .item-value {
  width: 60px;
  flex-shrink: 0;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
  font-family: 'Roboto Mono', monospace;
  text-align: right;
}

.item-row .item-value:focus {
  outline: none;
  border-color: var(--accent);
}

.item-row .item-del {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color .15s, border-color .15s;
}

.item-row .item-del:hover {
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.add-row-btn {
  width: 100%;
  background: transparent;
  color: var(--text-dim);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  margin-top: 6px;
}

.add-row-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* 尺寸显示 */
.size-display {
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  padding: 8px;
  background: var(--input-bg);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.size-display b {
  color: var(--accent);
}

/* ===== 预览区 ===== */
.preview {
  flex: 1;
  position: relative;
  background: #0a0a0a;
  overflow: auto;
  min-width: 0;
}

.preview.light-bg {
  background: #f0f0f0;
}

.preview svg {
  display: block;
}

/* 预览区提示 */
.preview-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-dim);
  font-family: 'Roboto Mono', monospace;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
  pointer-events: none;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: #1a1a1a;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== 滚动条 ===== */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ===== 底部常驻浮条：联系方式区 + 双备案号（全屏布局下不占用主体高度） ===== */
.rp-footbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: calc(100vw - 360px);
  padding: 3px 14px 4px;
  background: rgba(26, 26, 26, .92);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  backdrop-filter: blur(6px);
  font-size: 11px;
  color: var(--text-dim);
  pointer-events: none;
}
.rp-footbar a, .rp-footbar button { pointer-events: auto; }
.rp-footbar .f-contact-shared { margin-top: 0; gap: 6px; }
.rp-footbar .f-contact-shared .f-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--text);
  font-size: 11px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.rp-footbar .f-contact-shared .f-chip:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .32); }
.rp-footbar .f-contact-shared .f-chip svg { width: 11px; height: 11px; }
.rp-footbar .rp-sep { width: 1px; height: 12px; background: var(--border); }
.rp-footbar .rp-beian {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  font-family: 'Roboto Mono', ui-monospace, Menlo, monospace;
  opacity: .85;
}
.rp-footbar .rp-beian a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.rp-footbar .rp-beian a:hover { text-decoration: underline; }
@media (max-width: 1100px) {
  .rp-footbar .f-contact-shared, .rp-footbar .rp-sep { display: none; }
}
