/* Landing: badges */
.badges{display:flex;gap:0.5rem;flex-wrap:wrap;margin:0.25rem 0 0.9rem}
.badge{display:inline-block;background:linear-gradient(90deg,var(--primary),var(--accent));color:#fff;border-radius:999px;padding:0.25rem 0.6rem;font-weight:700;font-size:0.82rem;box-shadow:var(--shadow)}
/* main.css - Shared styles and variables
   To change primary colors, edit --primary and --accent variables in :root
*/
:root{
  --bg: #ffffff;
  --bg-2: #eef2f7; /* subtle end color for background gradient */
  --text: #111827;
  --muted: #6b7280;
  --card: #f8fafc;
  --primary: #2563eb; /* change this to modify main brand color */
  --accent: #10b981;
  --border: rgba(0,0,0,0.06);
  --field-bg: #ffffff;
  --field-hover: rgba(0,0,0,0.02);
  --focus-ring: rgba(37, 99, 235, 0.28); /* blue-600 @ 28% */
  /* Background pattern (light) */
  --bg-pattern-dot: rgba(0,0,0,0.06);
  /* Button palette */
  --btn-primary: var(--primary);
  --btn-secondary: #4b5563; /* gray-600 for better contrast with white text */
  --btn-success: #10b981; /* green-500 */
  --btn-danger: #ef4444; /* red-500 */
  --btn-text: #ffffff;
  --btn-shadow: 0 4px 12px rgba(2,6,23,0.12), 0 2px 4px rgba(2,6,23,0.08);
  --btn-shadow-hover: 0 8px 24px rgba(2,6,23,0.15), 0 4px 8px rgba(2,6,23,0.10);
  --btn-shadow-active: 0 2px 8px rgba(2,6,23,0.20), inset 0 1px 2px rgba(2,6,23,0.10);
  --btn-ring: 0 0 0 3px var(--focus-ring);
  --btn-radius: 10px;
  --btn-minh: 40px; /* meets near the 44px target with padding */
  --radius: 12px;
  --shadow: 0 6px 18px rgba(2,6,23,0.08);
  --max-width: 980px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace, 'Source Code Pro';
  /* Spacing scale */
  --space-16: 1rem;
  --space-24: 1.5rem;
  --space-32: 2rem;
}
[data-theme="dark"]{
  --bg: #071022;
  --bg-2: #09162a; /* subtle end color for background gradient (dark) */
  --text: #e6eef8;
  --muted: #9aa7b2;
  --card: #0b1a2b;
  --primary: #60a5fa;
  --accent: #34d399;
  --border: rgba(255,255,255,0.14);
  --field-bg: #0e1c2e;
  --field-hover: rgba(255,255,255,0.04);
  --focus-ring: rgba(96, 165, 250, 0.32); /* blue-400 @ 32% */
  /* Background pattern (dark) */
  --bg-pattern-dot: rgba(255,255,255,0.06);
  /* Button palette (dark) */
  --btn-primary: var(--primary);
  --btn-secondary: #475569; /* slate-600 */
  --btn-success: #34d399; /* green-400 */
  --btn-danger: #f87171; /* red-400 */
  --shadow: 0 6px 18px rgba(0,0,0,0.6);
  --btn-shadow: 0 4px 12px rgba(0,0,0,0.25), 0 2px 4px rgba(0,0,0,0.15);
  --btn-shadow-hover: 0 8px 24px rgba(0,0,0,0.35), 0 4px 8px rgba(0,0,0,0.20);
  --btn-shadow-active: 0 2px 8px rgba(0,0,0,0.40), inset 0 1px 2px rgba(0,0,0,0.25);
}

/* Enhanced typography for dark theme */
[data-theme="dark"] h1 {
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  color: var(--text);
}

[data-theme="dark"] h2 {
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
  color: var(--text);
}

[data-theme="dark"] .container h1::after {
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .container h2::after {
  box-shadow: 0 1px 4px rgba(96, 165, 250, 0.2);
}

/* Enhanced select styling for dark theme */
[data-theme="dark"] select {
  background-image: 
    linear-gradient(45deg, transparent 50%, #e6eef8 50%),
    linear-gradient(135deg, #e6eef8 50%, transparent 50%);
}

[data-theme="dark"] select:focus-visible {
  background-image: 
    linear-gradient(45deg, transparent 50%, var(--primary) 50%),
    linear-gradient(135deg, var(--primary) 50%, transparent 50%);
}

[data-theme="dark"] select option {
  background: var(--card);
  color: var(--text);
}

/* Enhanced radio and checkbox styling for dark theme */
[data-theme="dark"] input[type="radio"]:checked::after {
  background: var(--card);
}

[data-theme="dark"] input[type="checkbox"]:checked::after {
  border-color: var(--card);
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:
  radial-gradient(circle at 1px 1px, var(--bg-pattern-dot) 1px, transparent 1px) 0 0 / 18px 18px,
  linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color:var(--text);
  /* Use fast, built-in system font stack to avoid webfont downloads */
  font-family:system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
  font-size:16px;
  font-optical-sizing:auto;
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0.85rem 1.5rem;
  background:linear-gradient(90deg,var(--card) 80%,var(--bg-2) 100%);
  border-bottom:none;
  border-radius:0 0 18px 18px;
  box-shadow:0 2px 12px rgba(37,99,235,0.06);
  margin-bottom:var(--space-16);
}

@media (max-width:700px) {
  .topbar {
    flex-direction:column;
    align-items:stretch;
    padding:0.7rem 0.5rem 0.7rem 0.5rem;
    border-radius:0 0 14px 14px;
    box-shadow:0 2px 10px rgba(37,99,235,0.08);
  }
  .brand {
    margin-bottom:0.5rem;
    font-size:1.3rem;
    text-align:left;
  }
  /* Mobile collapsible nav */
  body:not(.nav-open) #main-nav { display:none !important; }
  body.nav-open #main-nav { display:flex !important; }
  #main-nav {
    flex-direction:column;
    align-items:stretch;
    gap:var(--space-16);
    font-size:1rem;
    padding:var(--space-16);
    margin:var(--space-16) var(--space-16) 0;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:12px;
  }
  #main-nav a {
    padding:0.5rem 0.6rem;
    font-size:1rem;
  }
  .controls {
    justify-content:flex-end;
    margin-bottom:0.3rem;
  }
}
.brand{font-weight:700;text-decoration:none;background:linear-gradient(90deg,var(--primary),var(--accent));-webkit-background-clip:text;background-clip:text;color:transparent}
.brand:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
/* Global link styles for visibility (dark/light) */
a{color:var(--primary);text-decoration:underline;text-underline-offset:2px}
a:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
/* Keep topbar nav tidy */
#main-nav {
  display:flex;
  gap:1.1rem;
  align-items:center;
  font-weight:500;
  font-size:1.04rem;
}
#main-nav a{
  text-decoration:none;
  color:var(--primary);
  padding:0.4rem 0.7rem;
  border-radius:8px;
  border:1px solid transparent;
  transition:background 0.18s, color 0.18s, border-color 0.18s;
}
#main-nav a:hover, #main-nav a:focus-visible{
  background:var(--field-hover);
  color:var(--accent);
  border-color:var(--border);
  text-decoration:none;
}
/* Active state */
#main-nav a.active, #main-nav a[aria-current="page"]{
  background:var(--field-hover);
  color:var(--primary);
  border-color:var(--border);
  font-weight:600;
}

.controls{
  display:flex;
  align-items:center;
  gap:0.5rem;
}
/* Menu toggle button (mobile only) */
#menu-toggle{display:none;background:var(--btn-secondary);color:#fff;border:none;border-radius:7px;padding:0.45rem 0.7rem;font-size:1.1rem;cursor:pointer}
#menu-toggle:hover, #menu-toggle:focus-visible{background:var(--btn-primary);color:#fff}
@media (max-width:700px){#menu-toggle{display:inline-block}}
#theme-toggle{ background:var(--btn-secondary); color:#fff; border:none; border-radius:7px; padding:0.45rem 0.7rem; font-size:1.1rem; cursor:pointer; transition:background 0.18s }
#theme-toggle:hover, #theme-toggle:focus-visible{ background:var(--btn-primary); color:#fff }
.container{max-width:var(--max-width);margin:var(--space-24) auto;padding:0 1rem}
.lead{
  color:var(--muted);
  font-size:1.1rem;
  line-height:1.5;
  margin-bottom:1.5rem;
  font-weight:400;
}
/* (optional) keep default card hover from earlier brand styles */
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:var(--space-16);margin:var(--space-16) 0}
.card{background:var(--card);padding:1rem;border-radius:12px;border:1px solid var(--border);box-shadow:var(--shadow)}
.container > .card{margin:var(--space-16) 0}
.card a{color:inherit;text-decoration:none}
.grid a.card{color:inherit;text-decoration:none}
.card h3{
  margin:0 0 0.45rem 0;
  font-size:1.22rem;
  font-weight:700;
  line-height:1.15;
  background:linear-gradient(90deg,var(--primary),var(--accent));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  letter-spacing:-0.5px;
  position:relative;
}
.card h3::after{
  content:"";
  position:relative;
  display:block;
  width:44px;
  height:3px;
  margin-top:6px;
  background:linear-gradient(90deg,var(--primary),var(--accent));
  border-radius:2px;
  opacity:0.7;
  transition:width .28s ease, opacity .28s ease;
}
.card:hover h3::after{width:64px;opacity:1}
@media (prefers-reduced-motion: reduce){
  .card h3::after{transition:none}
}
.site-footer{text-align:center;padding:var(--space-16);color:var(--muted)}
/* Typography: headings */
h1{
  font-size:clamp(1.9rem, 1.2rem + 2vw, 2.6rem);
  line-height:1.1;
  font-weight:900;
  letter-spacing:-0.02em;
  margin:0.5rem 0 var(--space-32);
  color:var(--text-primary);
  text-shadow:0 1px 2px rgba(0,0,0,0.1);
  word-spacing:0.05em;
}
h2{
  font-size:clamp(1.4rem, 1rem + 1vw, 1.8rem);
  line-height:1.25;
  font-weight:750;
  letter-spacing:-0.015em;
  margin:var(--space-24) 0 var(--space-16);
  color:var(--text-primary);
  text-shadow:0 1px 1px rgba(0,0,0,0.08);
}
h3{
  font-size:1.15rem;
  line-height:1.3;
  font-weight:650;
  letter-spacing:-0.01em;
  margin:var(--space-16) 0 0.5rem;
  color:var(--text-primary);
}
/* Gradient brand title utility for headings */
.brand-title{background:linear-gradient(90deg,var(--primary),var(--accent));-webkit-background-clip:text;background-clip:text;color:transparent}
/* Accent underlines for top-level section titles */
.container h1{
  position:relative;
  padding-bottom:0.5rem;
  margin-bottom:1.5rem;
}
.container h1::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-6px;
  height:5px;
  width:80px;
  border-radius:3px;
  background:linear-gradient(90deg,var(--primary),var(--accent));
  opacity:0.85;
  box-shadow:0 2px 4px rgba(0,0,0,0.1);
}
.container h2{
  position:relative;
  padding-bottom:0.4rem;
  margin-bottom:1.5rem;
}
.container h2::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-6px;
  height:3px;
  width:56px;
  border-radius:2px;
  background:linear-gradient(90deg,var(--primary),var(--accent));
  opacity:0.7;
  box-shadow:0 1px 2px rgba(0,0,0,0.08);
}
/* Optional small pre-title label */
.eyebrow{display:block;text-transform:uppercase;letter-spacing:0.08em;font-size:0.8rem;color:var(--muted);margin-bottom:0.25rem}
/* Form elements */
label{display:block;margin:var(--space-16) 0 calc(var(--space-16) / 2);font-weight:600}
.actions-inline{margin-top:var(--space-16);display:flex;gap:var(--space-16);flex-wrap:wrap}
textarea + .actions-inline,
input[type=text] + .actions-inline,
input[type=number] + .actions-inline,
input[type=password] + .actions-inline {
  margin-top:var(--space-16);
}
/* Enhanced Tailwind-style textarea styling */
textarea {
  /* Base styles */
  width: 100%;
  min-height: 160px; /* Default minimum height */
  padding: 0.875rem 1rem; /* py-3.5 px-4 */
  font-family: var(--mono);
  font-size: 0.95rem; /* text-sm for better readability */
  line-height: 1.6; /* leading-relaxed */
  color: var(--text);
  background-color: var(--field-bg);
  
  /* Border and visual styling */
  border: 1px solid var(--border);
  border-radius: 0.5rem; /* rounded-lg */
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); /* shadow-md */
  
  /* Resize and interaction */
  resize: vertical;
  scroll-padding: 0.5rem;
  
  /* Smooth transitions */
  transition: 
    border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.15s ease;
}

/* Text selection styling for textareas */
textarea::selection {
  background-color: rgba(37, 99, 235, 0.2);
  color: inherit;
}

/* Textarea size variants */
.textarea-sm {
  min-height: 120px;
  padding: 0.625rem 0.75rem; /* py-2.5 px-3 */
  font-size: 0.875rem; /* text-sm */
  line-height: 1.5;
}

.textarea-lg {
  min-height: 200px;
  padding: 1rem 1.25rem; /* py-4 px-5 */
  font-size: 1rem; /* text-base */
  line-height: 1.7;
}

.textarea-xl {
  min-height: 300px;
  padding: 1.25rem 1.5rem; /* py-5 px-6 */
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Textarea style variants */
.textarea-bordered {
  border-width: 2px;
  border-style: solid;
}

.textarea-ghost {
  background-color: transparent;
  border: 1px dashed var(--border);
  box-shadow: none;
}

.textarea-code {
  font-family: var(--mono);
  background-color: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.1);
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
  tab-size: 2;
}

/* Dark mode code textarea */
[data-theme="dark"] .textarea-code {
  background-color: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Hover states */
textarea:hover {
  background-color: var(--field-hover);
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1), 0 1px 3px 0 rgba(0, 0, 0, 0.08);
}

.textarea-ghost:hover {
  background-color: var(--field-hover);
  border-style: solid;
  border-color: var(--border);
}

/* Focus states with enhanced visual feedback */
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--field-bg);
  box-shadow: 
    0 0 0 3px var(--focus-ring),
    0 2px 8px 0 rgba(37, 99, 235, 0.15);
  transform: translateY(-1px); /* Subtle lift effect */
}

textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
  box-shadow: 
    0 0 0 3px var(--focus-ring),
    0 4px 12px 0 rgba(37, 99, 235, 0.2);
}

/* Read-only styling */
textarea:read-only {
  background-color: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text);
  cursor: default;
  user-select: text; /* Still allow text selection for copying */
}

textarea:read-only:hover {
  background-color: rgba(0, 0, 0, 0.04);
  transform: none; /* No hover lift for readonly */
}

/* Disabled state */
textarea:disabled {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.4);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Invalid/error state */
textarea:invalid,
textarea.is-invalid {
  border-color: var(--btn-danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

textarea:invalid:focus {
  box-shadow: 
    0 0 0 3px rgba(239, 68, 68, 0.2),
    0 2px 8px 0 rgba(239, 68, 68, 0.15);
}

/* Valid state */
textarea.is-valid {
  border-color: var(--btn-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Enhanced placeholder styling */
textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
  font-style: italic;
  transition: opacity 0.2s ease;
}

textarea:focus::placeholder {
  opacity: 0.5;
  transform: translateY(-2px);
}

/* Scrollbar styling for webkit browsers */
textarea::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

textarea::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: background 0.2s ease;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Dark mode scrollbar */
[data-theme="dark"] textarea::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] textarea::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Special styling for output textareas */
textarea#output,
textarea[readonly] {
  background: linear-gradient(145deg, var(--field-bg) 0%, rgba(0, 0, 0, 0.01) 100%);
  border-style: dashed;
  cursor: text; /* Allow text selection */
}

textarea#output:focus {
  transform: none; /* No lift effect for output */
  box-shadow: 0 0 0 2px var(--primary), 0 0 0 4px var(--focus-ring);
}

/* Textarea with line numbers (utility class) */
.textarea-with-numbers {
  position: relative;
  padding-left: 3rem;
}

.textarea-with-numbers::before {
  content: counter(line);
  position: absolute;
  left: 0.5rem;
  top: 0.875rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
  pointer-events: none;
  user-select: none;
}

/* Textarea utility classes */
.textarea-auto-resize {
  resize: none;
  overflow: hidden;
  min-height: auto;
}

.textarea-no-resize {
  resize: none;
}

.textarea-horizontal {
  resize: horizontal;
}

.textarea-both {
  resize: both;
}

/* Improved textarea focus behavior */
.textarea-focus-ring:focus {
  box-shadow: 
    0 0 0 3px var(--focus-ring),
    0 4px 16px 0 rgba(37, 99, 235, 0.12),
    0 2px 8px 0 rgba(0, 0, 0, 0.1);
}

/* Character count styling */
.textarea-container {
  position: relative;
}

.textarea-count {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* Textarea with syntax highlighting appearance */
.textarea-syntax {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  background: linear-gradient(145deg, #fafbfc 0%, #f6f8fa 100%);
  border: 1px solid #d1d9e0;
  tab-size: 2;
  -moz-tab-size: 2;
}

[data-theme="dark"] .textarea-syntax {
  background: linear-gradient(145deg, #161b22 0%, #0d1117 100%);
  border-color: #30363d;
  color: #f0f6fc;
}
input[type=text],input[type=number],input[type=search],input[type=url],input[type=email],input[type=password],select{width:100%;padding:var(--space-16);border-radius:10px;border:1px solid var(--border);background:var(--field-bg);color:inherit;transition:border-color .15s ease, box-shadow .15s ease, background-color .15s ease}
/* Mono font for code-like elements */
code, pre, kbd, samp{font-family:var(--mono)}
/* Many tools use #output for results; ensure mono for input#output (password page) */
input#output{font-family:var(--mono)}
textarea:hover,
input[type=text]:hover,input[type=number]:hover,input[type=search]:hover,input[type=url]:hover,input[type=email]:hover,input[type=password]:hover,select:hover{background-color:var(--field-hover)}
textarea:focus-visible,
input[type=text]:focus-visible,input[type=number]:focus-visible,input[type=search]:focus-visible,input[type=url]:focus-visible,input[type=email]:focus-visible,input[type=password]:focus-visible,select:focus-visible{outline:2px solid var(--primary);outline-offset:1px;border-color:var(--primary);box-shadow:0 0 0 3px var(--focus-ring)}
textarea::placeholder,
input::placeholder{color:var(--muted);opacity:0.9}
textarea, input, select{caret-color:var(--primary)}

/* Enhanced Radio Buttons and Checkboxes */
input[type="radio"],
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 1.2em;
  height: 1.2em;
  border: 2px solid var(--border);
  background: var(--field-bg);
  margin-right: 0.5em;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

input[type="radio"]:hover,
input[type="checkbox"]:hover {
  border-color: var(--primary);
  background: var(--field-hover);
}

input[type="radio"]:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Radio button specific styling */
input[type="radio"] {
  border-radius: 50%;
}

input[type="radio"]:checked {
  border-color: var(--primary);
  background: var(--primary);
}

input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.4em;
  height: 0.4em;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%);
}

/* Checkbox specific styling */
input[type="checkbox"] {
  border-radius: 0.25em;
}

input[type="checkbox"]:checked {
  border-color: var(--primary);
  background: var(--primary);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.3em;
  height: 0.6em;
  border: solid white;
  border-width: 0 0.15em 0.15em 0;
  transform: translate(-50%, -60%) rotate(45deg);
}

/* Disabled states */
input[type="radio"]:disabled,
input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input[type="radio"]:disabled:hover,
input[type="checkbox"]:disabled:hover {
  border-color: var(--border);
  background: var(--field-bg);
}

/* Label styling for radio and checkbox */
label:has(input[type="radio"]),
label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  user-select: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.15s ease;
}

label:has(input[type="radio"]):hover,
label:has(input[type="checkbox"]):hover {
  background: var(--field-hover);
}

/* Enhanced Select Controls */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: 
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: 
    right 20px center,
    right 16px center;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
  cursor: pointer;
  font-weight: 500;
}

select:hover {
  background-color: var(--field-hover);
  border-color: var(--primary);
}

select:focus-visible {
  background-image: 
    linear-gradient(45deg, transparent 50%, var(--primary) 50%),
    linear-gradient(135deg, var(--primary) 50%, transparent 50%);
}

select option {
  background: var(--field-bg);
  color: var(--text);
  padding: 0.5rem;
  font-weight: 500;
}

/* Select size variants */
select.select-sm {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.9rem;
}

select.select-lg {
  padding: 1.25rem 3rem 1.25rem 1.25rem;
  font-size: 1.1rem;
  background-position: 
    right 24px center,
    right 20px center;
}

/* Disabled state */
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--field-bg);
}

select:disabled:hover {
  border-color: var(--border);
  background-color: var(--field-bg);
}
input[type=file]{display:inline-block}
/* Enhanced Tailwind-inspired Dropzone styling */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 2rem 1.5rem;
  border: 2px dashed var(--border);
  border-radius: 0.75rem; /* rounded-xl */
  background: linear-gradient(145deg, var(--field-bg) 0%, rgba(0, 0, 0, 0.01) 100%);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  overflow: hidden;
}

/* Dropzone hover state */
.dropzone:hover {
  border-color: var(--primary);
  background: linear-gradient(145deg, var(--field-hover) 0%, rgba(37, 99, 235, 0.02) 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(37, 99, 235, 0.08);
}

/* Active drag state */
.dropzone.dragover {
  border-color: var(--primary);
  border-style: solid;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 
    0 8px 24px rgba(37, 99, 235, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Pulse animation for active state */
.dropzone.dragover::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  border-radius: inherit;
  z-index: -1;
  animation: dropzone-pulse 1.5s ease-in-out infinite;
}

@keyframes dropzone-pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.01);
  }
}

/* File input within dropzone */
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

/* Dropzone content styling */
.dropzone-content {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 1;
}

.dropzone-icon {
  font-size: 2.5rem;
  color: var(--muted);
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
}

.dropzone:hover .dropzone-icon {
  color: var(--primary);
  transform: translateY(-2px);
}

.dropzone.dragover .dropzone-icon {
  color: var(--primary);
  transform: translateY(-4px) scale(1.1);
  filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.3));
}

.dropzone-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 0.25rem;
}

.dropzone-subtext {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.4;
}

.dropzone:hover .dropzone-text {
  color: var(--primary);
}

.dropzone.dragover .dropzone-text {
  color: var(--primary);
  font-weight: 600;
}

/* Error state */
.dropzone.error {
  border-color: var(--btn-danger);
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.01) 100%);
  animation: dropzone-shake 0.5s ease-in-out;
}

@keyframes dropzone-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.dropzone.error .dropzone-icon {
  color: var(--btn-danger);
}

.dropzone.error .dropzone-text {
  color: var(--btn-danger);
}

/* Success state */
.dropzone.success {
  border-color: var(--btn-success);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.01) 100%);
}

.dropzone.success .dropzone-icon {
  color: var(--btn-success);
}

.dropzone.success .dropzone-text {
  color: var(--btn-success);
}

/* Compact dropzone variant */
.dropzone-compact {
  min-height: 80px;
  padding: 1rem;
  flex-direction: row;
  gap: 1rem;
}

.dropzone-compact .dropzone-icon {
  font-size: 1.5rem;
  margin-bottom: 0;
}

.dropzone-compact .dropzone-content {
  flex-direction: row;
  text-align: left;
}

/* Large dropzone variant */
.dropzone-large {
  min-height: 180px;
  padding: 3rem 2rem;
}

.dropzone-large .dropzone-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.dropzone-large .dropzone-text {
  font-size: 1.125rem;
}

/* File preview within dropzone */
.dropzone-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0.5rem;
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  max-width: 100%;
}

.dropzone-preview-icon {
  font-size: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
}

.dropzone-preview-info {
  flex: 1;
  min-width: 0;
}

.dropzone-preview-name {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropzone-preview-size {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.125rem;
}

.dropzone-preview-remove {
  background: var(--btn-danger);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.dropzone-preview-remove:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* Progress bar for file uploads */
.dropzone-progress {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.dropzone-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width 0.3s ease;
  transform-origin: left;
}

/* Dark mode adjustments */
[data-theme="dark"] .dropzone {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.005) 100%);
}

[data-theme="dark"] .dropzone:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
}

[data-theme="dark"] .dropzone-preview {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dropzone-progress {
  background: rgba(255, 255, 255, 0.1);
}
.limit{font-size:0.9rem;color:var(--muted)}
.limit-row{display:flex;justify-content:space-between;align-items:center;margin-top:0.5rem}
.actions-inline button, .actions-inline .button{margin-left:0}
/* History list UI improvements */
.history ol{padding-left:0;margin:0;list-style:none}
.history ol li{
  padding:var(--space-16);
  border-bottom:1px solid var(--border);
  font-size:0.98rem;
  background:transparent;
  transition:background 0.15s;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:0.75rem;
}
.history ol li:last-child{border-bottom:none}
.history ol li:hover{background:var(--field-hover)}
.history-item-content{flex:1;min-width:0}
.history-item-actions{flex-shrink:0;display:flex;gap:0.5rem;align-items:center}
/* Spacing between history list and clear button */
.history #history-list + button,
.history ol + .actions-inline,
.history ol + button{
  margin-top: var(--space-16);
}
/* Empty state for history lists */
.history ol li.empty,
.history ol li .history-empty{
  text-align:center;
  color:var(--muted);
}
/* History row layout (for tools using history-row class) */
.history-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:0.75rem;
  padding:var(--space-16);
  border-bottom:1px solid var(--border);
  font-size:0.98rem;
  background:transparent;
  transition:background 0.15s;
}
.history-row:last-child{border-bottom:none}
.history-row:hover{background:var(--field-hover)}
.history-item-meta{color:var(--muted);font-size:0.9rem;margin:0.25rem 0}
.history-item-preview{font-family:var(--mono);font-size:0.9rem;margin:0.25rem 0;word-break:break-all}
.history-item-preview .label{color:var(--muted);font-weight:600;font-family:inherit}

/* Consistent styling for different history item variants across tools */
.history-item-timestamp {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.history-item-mode {
  font-weight: 600;
  margin: 0.25rem 0;
}

.history-item-input,
.history-item-output {
  font-family: var(--mono);
  font-size: 0.9rem;
  margin: 0.25rem 0;
  word-break: break-all;
}

.history-item-input strong,
.history-item-output strong {
  color: var(--muted);
  font-weight: 600;
  font-family: inherit;
}

.history-input-value,
.history-output-value {
  color: var(--text);
  font-family: var(--mono);
}

/* Additional consistency for specialized history items */
.history-item-details {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.history-item-info {
  font-size: 0.9rem;
  margin: 0.25rem 0;
}
.muted{color:var(--muted);font-size:0.9rem}
/* Buttons: shared base (applied to existing classes for backward-compat) */
button,
a.button,
.btn,
.btn-primary,.btn-secondary,.btn-success,.btn-danger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0.5rem;
  background:var(--btn-primary);
  color:var(--btn-text);
  border:1px solid rgba(255, 255, 255, 0.1);
  border-radius:var(--btn-radius);
  padding:0.55rem 0.9rem;
  min-height:var(--btn-minh);
  line-height:1.2;
  font-weight:600;
  cursor:pointer;
  box-shadow:var(--btn-shadow);
  backdrop-filter:blur(10px);
  position:relative;
  overflow:hidden;
  transition:all .2s cubic-bezier(0.4, 0.0, 0.2, 1);
  text-decoration:none;
}

/* Glass effect overlay */
.btn::before, .btn-primary::before, .btn-secondary::before, .btn-success::before, .btn-danger::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 100%);
  border-radius: inherit;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
/* Color variants with gradients */
.btn-primary, button.btn-primary, a.button.btn-primary{ 
  background: linear-gradient(135deg, var(--btn-primary) 0%, color-mix(in srgb, var(--btn-primary) 85%, #000) 100%);
  color: var(--btn-text);
  border-color: color-mix(in srgb, var(--btn-primary) 80%, transparent);
}
.btn-secondary, button.btn-secondary, a.button.btn-secondary{ 
  background: linear-gradient(135deg, var(--btn-secondary) 0%, color-mix(in srgb, var(--btn-secondary) 85%, #000) 100%);
  color: var(--btn-text);
  border-color: color-mix(in srgb, var(--btn-secondary) 80%, transparent);
}
.btn-success, button.btn-success, a.button.btn-success{ 
  background: linear-gradient(135deg, var(--btn-success) 0%, color-mix(in srgb, var(--btn-success) 85%, #000) 100%);
  color: var(--btn-text);
  border-color: color-mix(in srgb, var(--btn-success) 80%, transparent);
}
.btn-danger, button.btn-danger, a.button.btn-danger{ 
  background: linear-gradient(135deg, var(--btn-danger) 0%, color-mix(in srgb, var(--btn-danger) 85%, #000) 100%);
  color: var(--btn-text);
  border-color: color-mix(in srgb, var(--btn-danger) 80%, transparent);
}

/* Hover/active/focus with glass effects */
button:hover, a.button:hover,
.btn:hover,.btn-primary:hover,.btn-secondary:hover,.btn-success:hover,.btn-danger:hover{
  transform:translateY(-2px);
  box-shadow:var(--btn-shadow-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn:hover::before, .btn-primary:hover::before, .btn-secondary:hover::before, .btn-success:hover::before, .btn-danger:hover::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.02) 100%);
}

button:active, a.button:active,
.btn:active,.btn-primary:active,.btn-secondary:active,.btn-success:active,.btn-danger:active{
  transform:translateY(0) scale(0.98);
  box-shadow:var(--btn-shadow-active);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn:active::before, .btn-primary:active::before, .btn-secondary:active::before, .btn-success:active::before, .btn-danger:active::before {
  opacity: 0.5;
}
button:focus-visible, a.button:focus-visible,
.btn:focus-visible,.btn-primary:focus-visible,.btn-secondary:focus-visible,.btn-success:focus-visible,.btn-danger:focus-visible{
  outline:none;
  box-shadow:var(--btn-ring), var(--btn-shadow);
}

/* Disabled */
button[disabled], .btn[disabled], .btn.is-disabled, a.button[aria-disabled="true"]{
  opacity:0.6;
  cursor:not-allowed;
  transform:none !important;
  box-shadow:var(--btn-shadow) !important;
  filter:none !important;
}

/* Size variants */
.btn-sm{ padding:0.4rem 0.7rem; min-height:34px; font-weight:600 }
.btn-lg{ padding:0.75rem 1.1rem; min-height:46px; font-size:1.05rem }
.btn-block{ display:inline-flex; width:100% }

/* Copy feedback animation */
.btn.copied{
  background:var(--btn-success) !important;
  transform:scale(0.95);
  transition:all 0.15s ease;
}

/* Icon button */
.btn-icon{ width:40px; height:40px; padding:0; border-radius:10px }
.btn > .icon, .btn-primary > .icon, .btn-secondary > .icon, .btn-success > .icon, .btn-danger > .icon{ width:1em; height:1em }
.btn .icon + span{ margin-left:0.35rem }

/* Outline and ghost variants */
.btn-outline{ background:transparent; color:var(--btn-primary); border-color:currentColor }
.btn-outline:hover{ background:var(--field-hover) }
.btn-ghost{ background:transparent; color:var(--btn-primary) }
.btn-ghost:hover{ background:var(--field-hover) }

/* Loading state */
.is-loading{ position:relative; pointer-events:none }
.is-loading::after{
  content:"";
  position:absolute; right:10px; width:16px; height:16px; border-radius:50%;
  border:2px solid rgba(255,255,255,0.5); border-top-color:#fff; animation:btn-spin .8s linear infinite;
}
@keyframes btn-spin{ to{ transform:rotate(360deg) } }
@media (max-width:640px){
  .topbar{flex-wrap:wrap}
  .limit-row{flex-direction:column;align-items:flex-start}
  .actions-inline{margin-top:var(--space-16)}
  
  /* Responsive history items */
  .history ol li,
  .history-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .history-item-content {
    min-width: auto;
    width: 100%;
  }
  
  .history-item-actions {
    flex-shrink: 1;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .history-item-actions button,
  .history-item-actions .button {
    flex: 1;
    min-width: 0;
    justify-content: center;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }
  
  /* Better mobile spacing */
  .history ol li {
    padding: 1rem;
  }
  
  .history-row {
    padding: 1rem;
  }
}

/* Extra small screens - stack history buttons vertically */
@media (max-width:480px) {
  .history-item-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .history-item-actions button,
  .history-item-actions .button {
    flex: none;
    width: 100%;
    font-size: 0.875rem;
  }
  
  /* Compact history content on very small screens */
  .history-item-meta,
  .history-item-preview {
    font-size: 0.8rem;
    margin: 0.125rem 0;
  }
  
  .history ol li,
  .history-row {
    padding: 0.75rem;
  }
  
  /* Better text wrapping */
  .history-item-preview {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

/* Medium screens - tablet adjustments */
@media (max-width:768px) and (min-width:641px) {
  .history-item-actions {
    gap: 0.5rem;
  }
  
  .history-item-actions button,
  .history-item-actions .button {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
  }
  
  /* Reduce gap between content and actions */
  .history ol li,
  .history-row {
    gap: 1rem;
  }
}

/* History modal */
#history-modal{position:fixed;inset:0;display:none;z-index:1000;font-family:inherit}
#history-modal.open{display:block}
#history-modal .history-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,0.45);backdrop-filter:blur(2px)}
#history-modal .history-modal-dialog{position:relative;max-width:760px;width:calc(100% - 2rem);margin:4vh auto;background:var(--card);border-radius:16px;box-shadow:0 12px 32px rgba(0,0,0,0.25);padding:1rem 1.1rem 1.25rem;display:flex;flex-direction:column;max-height:92vh;overflow:auto}
#history-modal .history-modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem}
#history-modal .modal-close{background:var(--btn-secondary);color:#fff;border:none;font-size:1.1rem;line-height:1;border-radius:8px;padding:0.4rem 0.65rem;cursor:pointer}
#history-modal .modal-close:hover{background:var(--btn-primary)}
#history-modal textarea{min-height:120px}
#history-modal .history-meta{font-size:0.85rem;color:var(--muted);margin:0 0 0.75rem;word-break:break-all}

/* Tutorial UX helpers */
/* Reading progress bar */
#tutorial-progress{position:fixed;top:0;left:0;height:3px;width:0;background:linear-gradient(90deg,var(--primary),var(--accent));z-index:9999;border-radius:0 2px 2px 0}
/* TOC styles */
.tutorial-toc{margin-bottom:var(--space-16)}
.tutorial-toc .toc-list{list-style:none;margin:0;padding:0}
.tutorial-toc .toc-list li{margin:0.35rem 0}
.tutorial-toc .toc-list li.h3{margin-left:1rem;font-size:0.95rem}
.tutorial-toc .toc-list a{text-decoration:none;color:var(--primary)}
.tutorial-toc .toc-list a:hover{text-decoration:underline}
/* Heading anchor links */
.h-anchor{margin-left:0.5rem;opacity:0.0;font-weight:700;text-decoration:none;color:var(--muted)}
h2:hover .h-anchor, h3:hover .h-anchor{opacity:1.0}
/* Copy button on code blocks */
.code-wrap{position:relative}
.code-wrap .copy-btn{position:absolute;top:8px;right:8px}
/* Tutorial helpers spacing */
.tutorial-readingtime{margin:0.25rem 0 var(--space-16)}
.tutorial-cta{margin:0.75rem 0}
/* Tool pages: tutorial actions under H1 */
.tutorial-actions{display:flex;align-items:center;gap:0.6rem;margin:0.25rem 0 0.9rem}
.tutorial-actions .kbd-hint{color:var(--muted);font-size:0.9rem}
/* Fallback styling so existing tutorial links look like buttons even without JS */
a.tutorial-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--btn-secondary);
  color:var(--btn-text);
  border:1px solid transparent;
  border-radius:var(--btn-radius);
  padding:0.4rem 0.7rem;
  min-height:34px;
  text-decoration:none;
  box-shadow:var(--btn-shadow);
  font-weight:600;
}
a.tutorial-link:hover{filter:brightness(1.02);box-shadow:var(--btn-shadow-hover)}

/* Enhanced Number Input for Password Length */
.number-input-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--field-bg);
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
  max-width: 160px;
  width: fit-content;
  margin-bottom: 1rem;
}

.number-input-group:hover {
  border-color: var(--primary);
}

.number-input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.number-input-group input[type="number"] {
  border: none;
  background: transparent;
  width: 60px;
  flex: 1;
  text-align: center;
  padding: 0.75rem 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  outline: none;
  box-shadow: none;
}

.number-input-group input[type="number"]:focus {
  outline: none;
  box-shadow: none;
  border: none;
}

.number-btn {
  background: var(--field-bg);
  border: none;
  padding: 0.75rem 0.75rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  width: 36px;
  height: 100%;
  flex-shrink: 0;
  /* Override button glass effects */
  backdrop-filter: none;
  position: static;
  overflow: visible;
  box-shadow: none;
  border-radius: 0;
}

.number-btn::before {
  display: none;
}

.number-btn:hover {
  background: var(--primary);
  color: white;
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.number-btn:hover::before {
  display: none;
}

.number-btn:active {
  transform: scale(0.95);
  box-shadow: none;
  border-color: transparent;
}

.number-btn:active::before {
  display: none;
}

.number-btn.plus {
  border-left: 1px solid var(--border);
}

.number-btn.minus {
  border-right: 1px solid var(--border);
}

.length-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  margin: 0.5rem 0;
  cursor: pointer;
  -webkit-appearance: none;
}

.length-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: transform .15s ease;
}

.length-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.length-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: transform .15s ease;
}

.length-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.length-current {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}

/* Hide default number input arrows */
.number-input-group input[type="number"]::-webkit-outer-spin-button,
.number-input-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.number-input-group input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* UUID-specific styling */
.count-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  margin: 0.5rem 0;
  cursor: pointer;
  -webkit-appearance: none;
}

.count-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: transform .15s ease;
}

.count-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.count-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: transform .15s ease;
}

.count-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.count-current {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}
