/* uuidgenerate.com — global styles (dark default + light theme) */
:root {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-soft: #121a30;
  --panel: #161f38;
  --panel-2: #1b2745;
  --text: #e8edf7;
  --muted: #9aa7c2;
  --line: #25304f;
  --accent: #5b8cff;
  --accent-2: #38d39f;
  --danger: #ff7a7a;
  --radius: 14px;
  --maxw: 920px;
  --head-bg: rgba(11, 16, 32, 0.72);
  --glow: #15203c;
  --pre-bg: #0a0e1c;
  --pre-text: #d6e0f5;
  --btn-a: #5b8cff;
  --btn-b: #3f6fe0;
  --shadow: 0 18px 44px rgba(2, 6, 20, 0.55);
  --mark-a: #3b6bff;
  --mark-b: #6a2fd0;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fc;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #eef2fa;
  --text: #0f1830;
  --muted: #5a6784;
  --line: #dde3f0;
  --accent: #2f5fe0;
  --accent-2: #0d8f63;
  --danger: #cf3d3d;
  --head-bg: rgba(245, 247, 252, 0.85);
  --glow: #e4ebfa;
  --pre-bg: #f1f5fc;
  --pre-text: #1d2b48;
  --btn-a: #3f74f0;
  --btn-b: #2b56cc;
  --shadow: 0 18px 40px rgba(23, 37, 84, 0.14);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: radial-gradient(1200px 600px at 50% -10%, var(--glow) 0%, var(--bg) 55%);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ── header ───────────────────────────────────────────────────────────────── */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--head-bg);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 40;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; }
.brand { display: inline-flex; align-items: center; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(140deg, var(--mark-a) 0%, var(--mark-b) 100%);
  color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; padding-left: 0.06em;
  box-shadow: 0 6px 16px rgba(59, 107, 255, 0.32);
}
.head-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: none; padding: 0;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.iconbtn svg { width: 18px; height: 18px; display: block; }
.iconbtn:hover { border-color: var(--accent); color: var(--accent); }
/* dark mode shows a sun (click → light), light mode shows a moon (click → dark) */
.ico-moon { display: none; }
html[data-theme="light"] .ico-moon { display: block; }
html[data-theme="light"] .ico-sun { display: none; }

/* ── custom dropdown (replaces native <select> popups) ────────────────────── */
.dd { position: relative; display: inline-block; min-width: 0; max-width: 100%; }
/* legacy hidden <select>; also neutralise any stray native select inside .dd */
.dd-native, .dd select {
  position: absolute; width: 1px; height: 1px; min-width: 0; max-width: 1px;
  padding: 0; margin: 0; border: 0; opacity: 0; pointer-events: none;
  clip-path: inset(50%); -webkit-appearance: none; appearance: none;
}
/* keep every inline icon capped so a CSS failure can never blow it up */
.dd svg, header.site svg { flex: none; max-width: 24px; max-height: 24px; }
.dd-btn {
  display: inline-flex; align-items: center; gap: 8px;
  width: 100%; font: inherit; font-size: 13px; cursor: pointer;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px;
}
.dd-btn:hover { border-color: var(--accent); }
.dd-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dd-btn .dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.dd-btn .ico-globe { width: 16px; height: 16px; flex: none; }
.dd-btn .chev { width: 14px; height: 14px; flex: none; opacity: 0.7; margin-left: auto; }
.dd-menu {
  position: absolute; z-index: 70; top: calc(100% + 8px); left: 0;
  min-width: 100%; width: max-content; max-width: min(340px, 88vw);
  max-height: min(340px, 60vh); overflow: auto;
  margin: 0; padding: 6px; list-style: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
}
.dd-menu.is-up { top: auto; bottom: calc(100% + 8px); }
.dd-menu.is-right { left: auto; right: 0; }
.dd-menu[hidden] { display: none; }
.dd-lang .dd-menu { left: auto; right: 0; }
.dd-menu li {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 8px 10px; border-radius: 8px; font-size: 13px; cursor: pointer;
  color: var(--text); white-space: nowrap;
}
.dd-menu li:hover, .dd-menu li.is-cursor { background: var(--bg-soft); }
.dd-menu li[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.dd-menu li .tick { width: 14px; height: 14px; flex: none; opacity: 0; }
.dd-menu li[aria-selected="true"] .tick { opacity: 1; }
/* no-JS fallback: plain inline list of language links */
.lang-list { display: inline-flex; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; }
.lang-list a { color: var(--muted); }

/* ── new header layout: left / center / right ───────────────────────────────── */
header.site .wrap.head-wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.head-center { text-align: center; min-width: 0; }
.head-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.site-title { font-family: var(--mono); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; }
.site-title:hover { text-decoration: none; color: var(--accent); }
.menu-btn { width: auto; padding: 0 12px; gap: 7px; }
.menu-label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; }
/* lang pill shows the current code (EN); keep it from overflowing */
.dd-lang .dd-btn { width: auto; }
.dd-lang .dd-label { max-width: 80px; }

/* ── off-canvas drawer ──────────────────────────────────────────────────────── */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(8,11,20,0.5); z-index: 80; }
.drawer { position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh; width: min(320px, 84vw); background: var(--panel); border-right: 1px solid var(--line); z-index: 90; transform: translateX(-100%); transition: transform .22s ease; display: flex; flex-direction: column; overflow: hidden; }
.drawer[aria-hidden="false"] { transform: translateX(0); }
.drawer[aria-hidden="true"] { pointer-events: none; }
body.drawer-open { overflow: hidden; }
.drawer-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.drawer-nav { flex: 1 1 auto; min-height: 0; padding: 12px 16px 28px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.drawer-home { display: block; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--bg-soft); font-weight: 600; }
.drawer-group { margin: 16px 4px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.drawer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.drawer-links a { padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--text); border: 1px solid transparent; }
.drawer-links a:hover { border-color: var(--line); background: var(--bg-soft); text-decoration: none; }

/* ── version matrix table ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 8px 0 4px; }
table.vmatrix { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14px; }
table.vmatrix caption { text-align: left; font-weight: 600; margin-bottom: 8px; color: var(--text); }
table.vmatrix th, table.vmatrix td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.vmatrix thead th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
table.vmatrix tbody tr:hover { background: var(--bg-soft); }
.table-note { margin-top: 10px; font-size: 13px; color: var(--muted); }

.hero { padding: 40px 0 8px; }
.eyebrow { color: var(--accent-2); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; margin: 6px 0 10px; letter-spacing: -0.02em; }
.lede { color: var(--muted); font-size: 17px; max-width: 640px; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.badge { font-size: 13px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.badge::before { content: "✓ "; color: var(--accent-2); }

.generator { background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 24px 0; }
.gen-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12px; color: var(--muted); }
.field .dd { min-width: 210px; }
.field .dd-btn { border-radius: 10px; justify-content: flex-start; min-height: 40px; }
.field .dd-btn .chev { margin-left: auto; }
.field .dd-menu { min-width: 100%; }
select, input[type="text"], input[type="number"] {
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; font: inherit; min-width: 150px;
}
input[type="checkbox"] { accent-color: var(--accent); }
.toggles { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.toggles label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.btn {
  background: linear-gradient(180deg, var(--btn-a) 0%, var(--btn-b) 100%); color: #fff; border: none;
  border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 700; cursor: pointer;
}
.btn:hover { filter: brightness(1.07); }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.results { margin-top: 16px; }
.results textarea {
  width: 100%; min-height: 120px; background: var(--bg); color: var(--mono); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; font: 13px/1.6 var(--mono); resize: vertical;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.priv { color: var(--muted); font-size: 12px; margin-top: 8px; }
.empty { color: var(--muted); font-family: var(--mono); font-size: 13px; }

section { padding: 26px 0; border-top: 1px solid var(--line); }
h2 { font-size: 24px; margin: 0 0 14px; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 18px 0 6px; }
p { color: var(--text); }
.muted { color: var(--muted); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 680px){ .cols { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.card h3 { margin-top: 0; }

ul.ticks { list-style: none; padding: 0; margin: 0; }
ul.ticks li { padding: 6px 0 6px 24px; position: relative; }
ul.ticks li::before { content: "✓"; color: var(--accent-2); position: absolute; left: 0; }
ol.steps { padding-left: 20px; margin: 0; }
ol.steps li { padding: 6px 0; }

table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
td code, p code, li code { font-family: var(--mono); background: var(--bg-soft); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }

pre { background: var(--pre-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow:auto; }
pre code { font-family: var(--mono); font-size: 13px; color: var(--pre-text); white-space: pre; }
.codeblock { margin: 10px 0; }
.codeblock .lang { color: var(--muted); font-size: 12px; margin-bottom: 4px; }

details.faq { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; background: var(--panel); }
details.faq summary { cursor: pointer; padding: 12px 14px; font-weight: 600; }
details.faq[open] summary { border-bottom: 1px solid var(--line); }
details.faq div { padding: 4px 14px 14px; color: var(--muted); }

.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 10px; }
.linkgrid a { display: block; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-size: 14px; }
.linkgrid a:hover { border-color: var(--accent); text-decoration: none; }
.linkgrid a span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

footer.site { border-top: 1px solid var(--line); padding: 26px 0 50px; color: var(--muted); font-size: 13px; margin-top: 20px; }
footer.site a { color: var(--muted); }

noscript .note { background: var(--panel); border: 1px solid var(--danger); color: var(--text); padding: 12px 14px; border-radius: 10px; }
.breadcrumb { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.breadcrumb a { color: var(--muted); }
.kind { display:inline-block; font-size:12px; color: var(--accent-2); border:1px solid var(--line); border-radius:999px; padding:3px 10px; margin-bottom:8px; }

@media (max-width: 640px) {
  header.site .wrap { height: 56px; gap: 8px; }
  .brand .mark { width: 34px; height: 34px; font-size: 10px; }
  .head-actions { gap: 8px; }
  header.site .wrap.head-wrap { gap: 8px; }
  .menu-label { display: none; }
  .site-title { font-size: 15px; }
  .head-left { gap: 6px; }
  .head-right { gap: 6px; }
  .drawer-links { grid-template-columns: 1fr; }
  .dd-btn { min-height: 36px; padding: 7px 11px; }
  .dd-btn .dd-label { max-width: 80px; }
  .dd-lang .dd-btn .dd-label { max-width: 64px; }
  .dd-menu { max-width: calc(100vw - 28px); max-height: 62vh; }
  .hero { padding: 28px 0 4px; }
  h1 { font-size: clamp(26px, 8vw, 34px); }
  .lede { font-size: 15px; }
  .generator { padding: 16px; margin: 18px 0; }
  .gen-row { gap: 10px; }
  .field, .field .dd { flex: 1 1 100%; width: 100%; min-width: 0; }
  .field .dd-btn { border-radius: 10px; }
  .btn { min-height: 42px; }
  #g-go { width: 100%; }
  .results textarea { min-height: 150px; }
  .actions { gap: 8px; }
  .actions .btn { flex: 1 1 auto; }
  .linkgrid { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  pre { font-size: 12px; }
  .cols { grid-template-columns: 1fr; }
  footer.site { padding: 22px 0 40px; }
}
