/* ============================================================
   UUID 模式样式（嵌入 Password Studio 的 UUID Tab）
   ============================================================ */

/* ---------- 品牌色：琥珀（仅在 UUID 模式生效） ---------- */

body[data-mode="uuid"] {
  --accent: #b45309;
  --accent-ink: #92400e;
  --accent-solid: #92400e;
  --accent-hover: #7c2d12;
  --accent-soft: #fffbeb;
  --accent-border: #fcd34d;
  --on-accent: #ffffff;
}

html[data-theme="dark"] body[data-mode="uuid"] {
  --accent: #fbbf24;
  --accent-ink: #fcd34d;
  --accent-solid: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-soft: rgba(251, 191, 36, .13);
  --accent-border: rgba(251, 191, 36, .4);
  --on-accent: #451a03;
}

body[data-mode="uuid"]::before {
  background:
    radial-gradient(48% 60% at 18% 10%, rgba(217, 119, 6, .15), transparent 70%),
    radial-gradient(42% 55% at 82% 0%, rgba(234, 88, 12, .12), transparent 72%);
}

html[data-theme="dark"] body[data-mode="uuid"]::before {
  background:
    radial-gradient(48% 60% at 18% 10%, rgba(245, 158, 11, .17), transparent 70%),
    radial-gradient(42% 55% at 82% 0%, rgba(234, 88, 12, .14), transparent 72%);
}

body[data-mode="uuid"] .brand-mark {
  background: linear-gradient(140deg, #f59e0b, #b45309 70%);
  box-shadow: 0 6px 16px -6px rgba(180, 83, 9, .85);
}

html[data-theme="dark"] body[data-mode="uuid"] .brand-mark {
  background: linear-gradient(140deg, #fcd34d, #d97706 75%);
  color: #451a03;
  box-shadow: 0 6px 18px -6px rgba(245, 158, 11, .55);
}

body[data-mode="uuid"] .hero h1 {
  background: linear-gradient(115deg, var(--text) 15%, var(--accent-ink) 62%, #ea580c 112%);
  -webkit-background-clip: text;
  background-clip: text;
}

body[data-mode="uuid"] .btn-primary {
  box-shadow: 0 6px 16px -8px rgba(146, 64, 14, .85);
}

/* ---------- 生成结果 ---------- */

.uuid-panel {
  padding: 0;
  overflow: hidden;
}

.uuid-output {
  position: relative;
  padding: 18px 22px 16px;
  color: #f8fafc;
  background: radial-gradient(120% 150% at 12% 0%, #2a1a08 0%, #140d06 55%, #08060a 100%);
  border-bottom: 1px solid rgba(251, 191, 36, .16);
}

.uuid-output::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(251, 191, 36, .13) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: .42;
  pointer-events: none;
}

.uuid-output > * { position: relative; z-index: 1; }

.uuid-output-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
}

.uuid-output-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.uuid-output-title > span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #d6c7b4;
}

.uuid-count {
  padding: 2px 8px;
  border: 1px solid rgba(251, 191, 36, .25);
  border-radius: 999px;
  background: rgba(251, 191, 36, .1);
  color: #fcd34d;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.uuid-output-title small {
  font-size: 10.5px;
  color: #a8a29e;
  letter-spacing: .01em;
}

.uuid-output-actions {
  display: flex;
  gap: 6px;
  flex: none;
}

.uuid-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(251, 191, 36, .22);
  border-radius: 8px;
  background: rgba(251, 191, 36, .07);
  color: #fcd34d;
  font-size: 11.5px;
  font-weight: 500;
  transition: background .14s ease, border-color .14s ease;
}
.uuid-tool-btn:hover {
  background: rgba(251, 191, 36, .15);
  border-color: rgba(251, 191, 36, .42);
}
.uuid-tool-btn.icon-only { width: 30px; padding: 0; }

.uuid-list {
  list-style: none;
  max-height: 322px;
  margin: 12px 0 0;
  padding: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.uuid-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-bottom: 1px solid rgba(251, 191, 36, .1);
  border-radius: 6px;
}
.uuid-item:last-child { border-bottom: 0; }
.uuid-item:hover { background: rgba(251, 191, 36, .055); }

.uuid-index {
  font-family: var(--mono);
  font-size: 10px;
  color: #78716c;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.uuid-value {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .01em;
  color: #f8fafc;
  word-break: break-all;
}

.uuid-copy {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #a8a29e;
}
.uuid-copy:hover { background: rgba(251, 191, 36, .13); color: #fcd34d; }
.uuid-copy svg { width: 14px; height: 14px; }

.uuid-list.is-single .uuid-value {
  font-size: clamp(1.05rem, 2.3vw, 1.4rem);
  letter-spacing: .02em;
}
.uuid-list.is-single .uuid-item { padding: 14px 8px; }

.uuid-empty {
  padding: 24px 10px;
  text-align: center;
  font-size: 12.5px;
  color: #a8a29e;
  list-style: none;
}

/* ---------- 设置区 ---------- */

.uuid-body { padding: 20px 22px 22px; }

.uuid-field + .uuid-field { margin-top: 20px; }

.uuid-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.uuid-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.uuid-hint {
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
}

.uuid-panel .segmented {
  display: flex;
  width: 100%;
  margin-top: 10px;
}
.uuid-panel .segmented button {
  flex: 1 1 0;
  font-size: 12.5px;
  padding: 8px 10px;
}
.uuid-panel .segmented button.is-active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.uuid-desc {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted-2);
}

.count-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.count-chip {
  min-width: 43px;
  height: 33px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  transition: border-color .13s ease, background .13s ease, color .13s ease;
}
.count-chip:hover { border-color: var(--accent-border); color: var(--text); }
.count-chip.is-active {
  border-color: transparent;
  background: var(--accent-solid);
  color: var(--on-accent);
  font-weight: 700;
}

.format-field {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.format-field legend {
  padding: 0;
  margin-bottom: 9px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.format-card { position: relative; display: block; cursor: pointer; }

.format-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.format-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color .15s ease, background .15s ease;
}

.format-card-body::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.format-card:hover .format-card-body { border-color: var(--accent-border); }

.format-card input:checked + .format-card-body {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.format-card input:checked + .format-card-body::after {
  border-color: var(--accent-solid);
  background: var(--accent-solid);
  box-shadow: inset 0 0 0 3px var(--surface);
}

.format-card input:focus-visible + .format-card-body {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.format-card-body b {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.format-card-body code {
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
}

.format-card input:checked + .format-card-body b { color: var(--accent-ink); }
.format-card input:checked + .format-card-body code { color: var(--accent-ink); }

.uuid-note {
  margin: 9px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-2);
}

.uuid-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.uuid-actions-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted-2);
}

.uuid-actions-note code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface-2);
  font-size: 10px;
}

/* ---------- 侧栏 ---------- */

.version-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.version-list li {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.version-list b {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.tips-list li {
  position: relative;
  padding-left: 15px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.tips-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- 文章 ---------- */

.callout {
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--accent-soft);
  color: var(--text) !important;
  font-size: 13px !important;
}

/* ---------- 响应式 ---------- */

@media (max-width: 720px) {
  .uuid-output { padding: 15px 16px 13px; }
  .uuid-body { padding: 16px; }
  .uuid-value { font-size: 12px; }
  .uuid-list { max-height: 282px; }
  .uuid-list.is-single .uuid-value { font-size: 1.05rem; }
  .uuid-actions { gap: 8px; }
  .uuid-actions .btn { flex: 1 1 auto; }
  .uuid-actions-note { flex: 1 1 100%; }
}

@media (max-width: 520px) {
  .uuid-output-head { align-items: center; }
  .uuid-output-title small { display: none; }
  .uuid-tool-btn { height: 29px; }
  .uuid-tool-btn span { display: none; }
  .format-card-body code { display: none; }
  .uuid-list.is-single .uuid-item { padding: 12px 6px; }
}

@media (max-width: 380px) {
  .uuid-index { display: none; }
  .uuid-item { grid-template-columns: minmax(0, 1fr) 28px; }
  .uuid-list.is-single .uuid-value { font-size: 1rem; }
  .count-chip { min-width: 39px; padding: 0 9px; }
}
