/* ============================================================
   CryptoWave — Redesigned Stylesheet
   Aesthetic: Warm Obsidian · Premium Amber · Editorial
   Fonts: Outfit (display) · Plus Jakarta Sans (body) · Geist Mono (code)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Geist+Mono:wght@300;400;500;600&display=swap');

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  --bg-base:        #0e0c0a;
  --bg-surface:     #161310;
  --bg-card:        #1c1815;
  --bg-card-hover:  #221f1b;
  --bg-input:       #191613;
  --bg-overlay:     rgba(14,12,10,0.88);

  --border:         #2e2820;
  --border-subtle:  #211d18;
  --border-focus:   #f59e0b;
  --border-strong:  #3d3529;

  --accent:         #f59e0b;
  --accent-light:   #fbbf24;
  --accent-dim:     rgba(245,158,11,0.10);
  --accent-glow:    rgba(245,158,11,0.22);
  --accent-border:  rgba(245,158,11,0.28);

  --green:          #4ade80;
  --green-dim:      rgba(74,222,128,0.09);
  --green-border:   rgba(74,222,128,0.24);
  --green-text:     #86efac;

  --red:            #f87171;
  --red-dim:        rgba(248,113,113,0.09);
  --red-border:     rgba(248,113,113,0.24);

  --orange:         #fb923c;
  --orange-dim:     rgba(251,146,60,0.09);
  --orange-border:  rgba(251,146,60,0.24);

  --text-primary:   #f5f0e8;
  --text-secondary: #9e9288;
  --text-muted:     #57504a;
  --text-inverse:   #1a1200;

  --font-head: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow:      0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:   0 12px 40px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 0 1px var(--accent-border), 0 4px 24px var(--accent-glow);
  --shadow-card: 0 0 0 1px var(--border);

  --transition:      0.18s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.32s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 15px;
}

body::after {
  content: '';
  position: fixed;
  top: -40vh; left: 50%;
  transform: translateX(-50%);
  width: 100vw; height: 80vh;
  background: radial-gradient(ellipse at center,
    rgba(245,158,11,0.055) 0%,
    rgba(245,158,11,0.018) 40%,
    transparent 68%);
  pointer-events: none; z-index: 0;
}

/* ─── Layout ─────────────────────────────────────────────── */
.container         { max-width: 1200px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
.container--narrow { max-width: 860px; }
.container--wide   { max-width: 1400px; }

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-overlay);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}
.navbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; max-width: 1400px; margin: 0 auto; padding: 0 28px;
}
.navbar__brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--font-head);
  font-weight: 800; font-size: 1.2rem; letter-spacing: -0.025em;
  color: var(--text-primary);
}
.navbar__brand-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 15px;
  box-shadow: 0 2px 10px rgba(245,158,11,0.45);
}
.navbar__brand span { color: var(--accent); }
.navbar__nav { display: flex; align-items: center; gap: 2px; list-style: none; }
.navbar__nav a {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: var(--radius);
  text-decoration: none; font-size: 0.84rem; font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.navbar__nav a:hover { color: var(--text-primary); background: rgba(245,158,11,0.07); }
.navbar__nav a.active { color: var(--accent); background: var(--accent-dim); }
.navbar__badge {
  font-size: 9px; font-weight: 700;
  background: var(--accent); color: var(--text-inverse);
  padding: 2px 6px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; border: none; background: none; }
.hamburger span { display: block; width: 20px; height: 1.5px; background: var(--text-secondary); border-radius: 2px; transition: var(--transition); }

/* ─── Hero ───────────────────────────────────────────────── */
.hero { padding: 88px 0 72px; text-align: center; position: relative; z-index: 1; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  color: var(--accent); font-family: var(--font-mono);
  font-size: 0.6875rem; font-weight: 500;
  padding: 6px 14px; border-radius: 99px; margin-bottom: 28px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.hero__badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
  animation: pulse 2.5s ease infinite;
}
.hero__title {
  font-family: var(--font-head);
  font-size: clamp(2.6rem,5.5vw,4.25rem);
  font-weight: 900; line-height: 1.05;
  letter-spacing: -0.04em; margin-bottom: 22px;
}
.hero__title span {
  background: linear-gradient(135deg,#f59e0b 0%,#fbbf24 50%,#d97706 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero__subtitle {
  max-width: 500px; margin: 0 auto 44px;
  font-size: 1rem; color: var(--text-secondary); line-height: 1.75;
}
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hero__tag {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: 0.8rem; font-weight: 500; color: var(--text-secondary);
  font-family: var(--font-mono);
  transition: border-color var(--transition), color var(--transition);
}
.hero__tag:hover { border-color: var(--border-strong); color: var(--text-primary); }
.hero__tag-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

/* ─── Section Header ──────────────────────────────────────── */
.section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.section-head__title {
  font-family: var(--font-head); font-size: 0.9rem; font-weight: 700;
  color: var(--text-secondary); letter-spacing: 0.04em;
  text-transform: uppercase; white-space: nowrap;
}
.section-head__title span { color: var(--accent); }
.section-head__line { flex: 1; height: 1px; background: linear-gradient(to right, var(--border), transparent); }

/* ─── Tools Grid ──────────────────────────────────────────── */
.tools-section { padding-bottom: 80px; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(270px,1fr)); gap: 12px; }

.tool-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 26px;
  text-decoration: none; color: var(--text-primary);
  transition: all var(--transition); position: relative; overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg,rgba(245,158,11,0.05) 0%,transparent 60%);
  opacity: 0; transition: opacity var(--transition);
}
.tool-card:hover {
  border-color: var(--border-strong); background: var(--bg-card-hover);
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
}
.tool-card:hover::before { opacity: 1; }
.tool-card__icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 18px;
  background: var(--bg-input); border: 1px solid var(--border);
  transition: all var(--transition);
}
.tool-card:hover .tool-card__icon { border-color: var(--accent-border); background: var(--accent-dim); box-shadow: 0 0 16px var(--accent-glow); }
.tool-card__name { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; margin-bottom: 9px; letter-spacing: -0.02em; }
.tool-card__desc { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.6; flex: 1; }
.tool-card__meta { display: flex; align-items: center; gap: 7px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.tool-card__tag {
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  padding: 3px 8px; border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-muted); border: 1px solid var(--border);
}
.tool-card__tag--accent { color: var(--accent); border-color: var(--accent-border); background: var(--accent-dim); }
.tool-card__tag--green  { color: var(--green-text); border-color: var(--green-border); background: var(--green-dim); }
.tool-card__arrow { margin-left: auto; color: var(--text-muted); font-size: 15px; transition: color var(--transition),transform var(--transition); }
.tool-card:hover .tool-card__arrow { color: var(--accent); transform: translateX(5px); }

/* ─── Tool Page ──────────────────────────────────────────── */
.tool-page { padding: 44px 0 80px; }
.tool-header { margin-bottom: 36px; }
.tool-header__back {
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; color: var(--text-muted);
  font-size: 0.84rem; font-weight: 500; margin-bottom: 22px;
  transition: color var(--transition);
}
.tool-header__back:hover { color: var(--accent); }
.tool-header__title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem,3vw,2.6rem);
  font-weight: 900; letter-spacing: -0.035em; margin-bottom: 10px; line-height: 1.1;
}
.tool-header__title span {
  background: linear-gradient(135deg,#f59e0b,#fbbf24);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.tool-header__sub { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.6; }

/* ─── Panel ──────────────────────────────────────────────── */
.panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 28px; box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 14px; }
.panel__head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.panel__head-icon {
  width: 30px; height: 30px; background: var(--accent-dim);
  border: 1px solid var(--accent-border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.panel__head-title { font-family: var(--font-head); font-size: 0.9375rem; font-weight: 700; letter-spacing: -0.01em; }
.panel__head-badge {
  margin-left: auto; font-family: var(--font-mono);
  font-size: 0.6875rem; font-weight: 500;
  padding: 3px 9px; border-radius: var(--radius-sm);
  background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border);
}

/* ─── Form Controls ──────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 14px; margin-bottom: 18px; }

label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 8px;
  font-family: var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase;
}
label .required { color: var(--red); margin-left: 3px; }

input[type="text"], input[type="password"], input[type="number"],
input[type="email"], textarea, select {
  width: 100%; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 13px; color: var(--text-primary);
  font-family: var(--font-mono); font-size: 0.875rem;
  outline: none; -webkit-appearance: none; line-height: 1.5;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); font-style: italic; }
input:focus, textarea:focus, select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); background: var(--bg-surface);
}
input:hover:not(:focus), textarea:hover:not(:focus), select:hover:not(:focus) { border-color: var(--border-strong); }
textarea { resize: vertical; min-height: 120px; line-height: 1.65; }
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5' viewBox='0 0 10 5'%3E%3Cpath d='M0 0l5 5 5-5z' fill='%239e9288'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}

.input-with-btn { position: relative; display: flex; align-items: stretch; }
.input-with-btn input { border-radius: var(--radius) 0 0 var(--radius); }
.input-with-btn .btn--icon { border-radius: 0 var(--radius) var(--radius) 0; border-left: none; flex-shrink: 0; }
.char-count { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-muted); text-align: right; margin-top: 6px; }

/* ─── Checkbox ───────────────────────────────────────────── */
.check-group { display: flex; flex-wrap: wrap; gap: 10px; }
.check-item { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.875rem; color: var(--text-secondary); user-select: none; }
.check-item input { display: none; }
.check-item__box {
  width: 17px; height: 17px; border: 1px solid var(--border-strong);
  border-radius: 5px; background: var(--bg-input);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all var(--transition);
}
.check-item:hover .check-item__box { border-color: var(--accent); }
.check-item input:checked + .check-item__box { background: var(--accent); border-color: var(--accent); }
.check-item input:checked + .check-item__box::after { content: '✓'; color: var(--text-inverse); font-size: 10px; font-weight: 800; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 600;
  cursor: pointer; text-decoration: none; border: 1px solid transparent;
  transition: all var(--transition); white-space: nowrap;
  letter-spacing: -0.01em; line-height: 1;
}
.btn--primary {
  background: var(--accent); color: var(--text-inverse); border-color: var(--accent); font-weight: 700;
  box-shadow: 0 1px 3px rgba(245,158,11,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn--primary:hover {
  background: var(--accent-light); border-color: var(--accent-light);
  box-shadow: 0 4px 18px rgba(245,158,11,0.38); transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }
.btn--secondary { background: var(--bg-input); color: var(--text-secondary); border-color: var(--border); }
.btn--secondary:hover { border-color: var(--border-strong); color: var(--text-primary); background: var(--bg-surface); }
.btn--ghost { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--border-strong); color: var(--text-primary); background: var(--bg-card); }
.btn--danger { background: var(--red-dim); color: var(--red); border-color: var(--red-border); }
.btn--danger:hover { background: rgba(248,113,113,0.15); }
.btn--success { background: var(--green-dim); color: var(--green-text); border-color: var(--green-border); }
.btn--success:hover { background: rgba(74,222,128,0.15); }
.btn--sm  { padding: 6px 13px; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.btn--lg  { padding: 13px 26px; font-size: 0.9375rem; border-radius: var(--radius-lg); }
.btn--icon { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-secondary); padding: 9px 13px; border-radius: var(--radius); }
.btn--icon:hover { border-color: var(--border-strong); color: var(--accent); background: var(--accent-dim); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; pointer-events: none; }

/* ─── Tabs ───────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 3px; flex-wrap: wrap;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 4px; margin-bottom: 22px;
}
.tab-btn {
  padding: 7px 16px; border-radius: 9px; font-size: 0.84rem; font-weight: 600;
  cursor: pointer; border: none; background: transparent; color: var(--text-muted);
  transition: all var(--transition); font-family: var(--font-body); letter-spacing: -0.01em;
}
.tab-btn:hover { color: var(--text-secondary); background: var(--bg-card); }
.tab-btn.active { background: var(--bg-card); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.22s ease; }

/* ─── Output Box ─────────────────────────────────────────── */
.output-box {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  font-family: var(--font-mono); font-size: 0.8125rem;
  color: var(--text-primary); word-break: break-all;
  min-height: 90px; line-height: 1.7; white-space: pre-wrap;
  transition: border-color var(--transition), background var(--transition);
}
.output-box--large  { min-height: 160px; }
.output-box--success { border-color: var(--green-border); background: var(--green-dim); color: var(--green-text); }
.output-box--error   { border-color: var(--red-border); background: var(--red-dim); color: var(--red); }
.output-box .placeholder { color: var(--text-muted); font-style: italic; font-family: var(--font-body); font-size: 0.875rem; }
.output-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.output-label { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ─── Alert ──────────────────────────────────────────────── */
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 16px; border-radius: var(--radius-lg);
  font-size: 0.84rem; line-height: 1.6; margin-bottom: 16px;
}
.alert--info    { background: var(--accent-dim); border: 1px solid var(--accent-border); color: #f5dec8; }
.alert--info    strong { color: var(--accent); }
.alert--warning { background: var(--orange-dim); border: 1px solid var(--orange-border); color: #fddcc5; }
.alert--warning strong { color: var(--orange); }
.alert--success { background: var(--green-dim); border: 1px solid var(--green-border); color: var(--green-text); }
.alert__icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; opacity: 0.8; }

/* ─── Key Grid ───────────────────────────────────────────── */
.key-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .key-grid { grid-template-columns: 1fr; } }
.key-box { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.key-box__head { padding: 10px 14px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; background: var(--bg-surface); }
.key-box__label { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.key-box__textarea { width: 100%; background: transparent; border: none; outline: none; padding: 14px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-primary); resize: vertical; min-height: 140px; line-height: 1.6; }

/* ─── Drop Zone ──────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-xl);
  padding: 52px 24px; text-align: center; cursor: pointer;
  background: var(--bg-card); transition: all var(--transition-slow);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent); background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent-border), 0 8px 32px var(--accent-glow);
}
.drop-zone__icon { font-size: 2.75rem; margin-bottom: 14px; display: block; }
.drop-zone__title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em; }
.drop-zone__sub { font-size: 0.875rem; color: var(--text-secondary); }
.drop-zone__formats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 20px; }

.format-badge { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; padding: 3px 9px; border-radius: var(--radius-sm); background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-muted); }

.file-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.file-item { display: flex; align-items: center; gap: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 16px; transition: border-color var(--transition); }
.file-item:hover { border-color: var(--border-strong); }
.file-item__icon { font-size: 20px; flex-shrink: 0; }
.file-item__info { flex: 1; overflow: hidden; min-width: 0; }
.file-item__name { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item__size { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.file-item__remove { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 16px; transition: color var(--transition); padding: 4px 6px; border-radius: var(--radius-sm); }
.file-item__remove:hover { color: var(--red); background: var(--red-dim); }

.progress-bar { width: 100%; height: 3px; background: var(--border); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress-bar__fill { height: 100%; background: linear-gradient(90deg,var(--accent),#fbbf24); border-radius: 99px; transition: width 0.3s ease; }

.convert-result { display: flex; align-items: center; gap: 12px; background: var(--green-dim); border: 1px solid var(--green-border); border-radius: var(--radius-lg); padding: 14px 16px; margin-top: 10px; }
.convert-result__icon { font-size: 18px; }
.convert-result__info { flex: 1; }
.convert-result__name { font-size: 0.875rem; font-weight: 600; color: var(--green-text); }
.convert-result__meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }

.options-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); gap: 14px; margin-bottom: 18px; }

/* ─── Security Note ──────────────────────────────────────── */
.security-note {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  color: var(--green-text); background: var(--green-dim);
  border: 1px solid var(--green-border); padding: 6px 12px; border-radius: var(--radius);
}

/* ─── Utils ──────────────────────────────────────────────── */
.text-mono { font-family: var(--font-mono); }
.text-sm   { font-size: 0.875rem; }
.text-xs   { font-size: 0.75rem; }
.text-muted   { color: var(--text-muted); }
.text-accent  { color: var(--accent); }
.text-green   { color: var(--green-text); }
.text-center  { text-align: center; }
.mt-2 { margin-top: 8px; }  .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; } .items-center { align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .split { grid-template-columns: 1fr; } }
.divider { height: 1px; background: var(--border-subtle); margin: 20px 0; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.65s linear infinite; flex-shrink: 0; }
.hidden { display: none !important; }

/* ─── Footer ─────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border-subtle); padding: 36px 0; margin-top: 40px; }
.footer__inner { max-width: 1400px; margin: 0 auto; padding: 0 28px; display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: center; }
.footer__brand { font-family: var(--font-head); font-size: 1rem; font-weight: 800; margin-bottom: 3px; letter-spacing: -0.02em; }
.footer__brand span { color: var(--accent); }
.footer__tagline { font-size: 0.8125rem; color: var(--text-muted); }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.footer__links a { font-size: 0.8125rem; color: var(--text-muted); text-decoration: none; padding: 5px 10px; border-radius: var(--radius-sm); transition: color var(--transition), background var(--transition); }
.footer__links a:hover { color: var(--text-secondary); background: var(--bg-card); }
.footer__copy { font-size: 0.75rem; color: var(--text-muted); }

/* ─── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--bg-card); border: 1px solid var(--green-border);
  color: var(--green-text); font-family: var(--font-mono); font-size: 0.8125rem;
  padding: 10px 18px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  animation: toastIn 0.2s ease, toastOut 0.3s ease 2.1s forwards;
}

/* ─── Animations ─────────────────────────────────────────── */
@keyframes pulse    { 0%,100% { opacity:1; box-shadow:0 0 8px var(--accent); } 50% { opacity:0.5; box-shadow:0 0 3px var(--accent); } }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes fadeIn   { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastIn  { from { opacity:0; transform:translateY(10px) scale(0.96); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform:translateY(6px); } }
.fade-in { animation: fadeIn 0.28s ease; }

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::selection { background: var(--accent-dim); color: var(--accent); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar__nav { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg-overlay); backdrop-filter: blur(24px); border-bottom: 1px solid var(--border); padding: 10px; z-index: 99; }
  .navbar__nav.open { display: flex; }
  .hamburger { display: flex; }
  .hero { padding: 52px 0 44px; }
  .hero__title { font-size: 2.3rem; }
  .panel { padding: 20px; }
  .tools-grid { grid-template-columns: 1fr; gap: 10px; }
  .form-row { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
}
@media (max-width: 480px) {
  .btn-group { flex-direction: column; }
  .btn { justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   LIGHT THEME — [data-theme="light"]
   ═══════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg-base:        #f8f5f0;
  --bg-surface:     #f0ece5;
  --bg-card:        #ffffff;
  --bg-card-hover:  #fdf9f4;
  --bg-input:       #f5f1ea;
  --bg-overlay:     rgba(248,245,240,0.92);

  --border:         #e2d9cc;
  --border-subtle:  #ede8df;
  --border-focus:   #d97706;
  --border-strong:  #c9bfb0;

  --accent:         #d97706;
  --accent-light:   #f59e0b;
  --accent-dim:     rgba(217,119,6,0.09);
  --accent-glow:    rgba(217,119,6,0.18);
  --accent-border:  rgba(217,119,6,0.25);

  --green:          #16a34a;
  --green-dim:      rgba(22,163,74,0.08);
  --green-border:   rgba(22,163,74,0.22);
  --green-text:     #15803d;

  --red:            #dc2626;
  --red-dim:        rgba(220,38,38,0.07);
  --red-border:     rgba(220,38,38,0.22);

  --orange:         #ea580c;
  --orange-dim:     rgba(234,88,12,0.08);
  --orange-border:  rgba(234,88,12,0.22);

  --text-primary:   #1c1612;
  --text-secondary: #6b5f52;
  --text-muted:     #a8998a;
  --text-inverse:   #ffffff;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow:      0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:   0 12px 40px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.08);
}

/* Light mode ambient — warm cream glow */
[data-theme="light"] body::after {
  background: radial-gradient(ellipse at center,
    rgba(217,119,6,0.06) 0%,
    rgba(217,119,6,0.02) 40%,
    transparent 68%);
}

/* Light mode input backgrounds */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="email"],
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: #ffffff;
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
  background: #ffffff;
}

[data-theme="light"] .output-box {
  background: #ffffff;
}

[data-theme="light"] .key-box__textarea {
  background: #ffffff;
}

/* ─── Theme Toggle Button ───────────────────────────────── */
.theme-toggle {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 5px 12px 5px 8px;
  cursor: pointer; font-size: 0.8125rem;
  color: var(--text-secondary); font-weight: 500;
  font-family: var(--font-body);
  transition: all var(--transition);
  white-space: nowrap;
}
.theme-toggle:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-dim);
}
.theme-toggle__icon { font-size: 14px; line-height: 1; }
.theme-toggle__label { font-size: 0.8125rem; }

/* Smooth theme transition */
body, .navbar, .panel, .tool-card, .output-box,
input, textarea, select, .key-box, .drop-zone,
.file-item, .alert, .tabs, .tab-btn {
  transition:
    background-color var(--transition-slow),
    border-color var(--transition-slow),
    color var(--transition-slow),
    box-shadow var(--transition-slow);
}

/* ═══════════════════════════════════════════════════════════
   PASSWORD GENERATOR — Specific Styles
   ═══════════════════════════════════════════════════════════ */

/* Length Slider */
.pwd-length-wrap {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 6px;
}
.pwd-length-wrap input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 99px;
  background: var(--border-strong);
  border: none; padding: 0; cursor: pointer;
  outline: none; box-shadow: none;
}
.pwd-length-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  cursor: pointer; transition: box-shadow var(--transition);
}
.pwd-length-wrap input[type="range"]:hover::-webkit-slider-thumb {
  box-shadow: 0 0 0 5px var(--accent-dim);
}
.pwd-length-val {
  font-family: var(--font-mono); font-size: 1.1rem;
  font-weight: 700; color: var(--accent);
  min-width: 32px; text-align: center;
}

/* Password Output */
.pwd-output-wrap { position: relative; }
.pwd-output-wrap textarea {
  font-size: 1.1rem; font-weight: 600;
  letter-spacing: 0.04em; line-height: 1.5;
  min-height: 72px; resize: none;
  padding-right: 90px;
}
.pwd-output-actions {
  position: absolute; top: 10px; right: 10px;
  display: flex; gap: 6px;
}

/* Strength Bar */
.strength-wrap { margin-top: 10px; }
.strength-bar-track {
  width: 100%; height: 4px;
  background: var(--border); border-radius: 99px;
  overflow: hidden; margin-bottom: 6px;
}
.strength-bar-fill {
  height: 100%; border-radius: 99px;
  transition: width 0.4s ease, background 0.4s ease;
  width: 0%;
}
.strength-info {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; font-family: var(--font-mono);
}
.strength-label { font-weight: 600; }
.strength-entropy { color: var(--text-muted); }

/* Charset Options Grid */
.charset-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px; margin-bottom: 18px;
}
.charset-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px 14px;
  cursor: pointer; transition: all var(--transition);
  user-select: none;
}
.charset-item:hover { border-color: var(--accent-border); background: var(--accent-dim); }
.charset-item input { display: none; }
.charset-item__check {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0;
  border: 1.5px solid var(--border-strong); background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.charset-item input:checked ~ .charset-item__check {
  background: var(--accent); border-color: var(--accent);
}
.charset-item input:checked ~ .charset-item__check::after {
  content: '✓'; color: var(--text-inverse); font-size: 11px; font-weight: 800;
}
.charset-item__info { flex: 1; }
.charset-item__name { font-size: 0.875rem; font-weight: 600; }
.charset-item__sample {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-muted); margin-top: 2px;
}

/* History */
.hist-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 9px 12px;
  margin-bottom: 6px; transition: border-color var(--transition);
}
.hist-item:hover { border-color: var(--border-strong); }
.hist-item__pwd {
  flex: 1; font-family: var(--font-mono); font-size: 0.8125rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text-secondary);
}

/* Passphrase separator input */
.sep-input {
  width: 60px !important;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   DROPDOWN MENU
   ═══════════════════════════════════════════════════════════ */
.navbar__nav .dropdown {
  position: relative;
}
.navbar__nav .dropdown > a {
  display: flex; align-items: center; gap: 5px;
}
.dropdown__arrow {
  font-size: 9px; opacity: 0.6;
  transition: transform var(--transition);
}
.dropdown:hover .dropdown__arrow { transform: rotate(180deg); }

.dropdown__menu {
  display: none;
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  padding-top: 8px; /* bridge gap with invisible padding */
  z-index: 200;
  white-space: nowrap;
  min-width: 180px;
}
/* The visible box is inside an inner div */
.dropdown__menu-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px;
}
.dropdown:hover .dropdown__menu { display: block; animation: fadeIn 0.15s ease; }

/* Invisible bridge — fills the gap so mouse doesn't "leave" the dropdown */
.dropdown__menu::before {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
}

.dropdown__menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius);
  font-size: 0.8375rem; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  transition: all var(--transition);
}
.dropdown__menu a:hover {
  color: var(--accent); background: var(--accent-dim);
}
.dropdown__menu a.active { color: var(--accent); background: var(--accent-dim); }
.dropdown__divider {
  height: 1px; background: var(--border-subtle);
  margin: 4px 6px;
}
