/* ==========================================================================
   AudioConverter theme — layered on top of Tabler (dark)
   ========================================================================== */
[hidden] { display: none !important; }

html[data-bs-theme=dark],
html[data-bs-theme=dark] [data-bs-theme=dark] {
  --ac-bg: #0b0d12;
  --ac-surface: #12151c;
  --ac-surface-2: #181c25;
  --ac-surface-3: #1f2430;
  --ac-border: #232836;
  --ac-border-strong: #2e3445;
  --ac-text: #e6e8ef;
  --ac-muted: #8a91a5;
  --ac-primary: #7c5cff;
  --ac-primary-rgb: 124, 92, 255;
  --ac-primary-2: #a78bfa;
  --ac-pink: #ec4899;
  --ac-green: #22c55e;
  --ac-orange: #f59e0b;
  --ac-cyan: #06b6d4;
  --discord: #5865f2;
  --discord-hover: #4752c4;

  --tblr-font-sans-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tblr-body-bg: var(--ac-bg);
  --tblr-body-color: var(--ac-text);
  --tblr-bg-surface: var(--ac-surface);
  --tblr-bg-surface-secondary: var(--ac-surface-2);
  --tblr-bg-surface-tertiary: var(--ac-surface-2);
  --tblr-bg-forms: var(--ac-surface-2);
  --tblr-border-color: var(--ac-border);
  --tblr-border-color-translucent: var(--ac-border);
  --tblr-secondary: var(--ac-muted);
  --tblr-secondary-color: var(--ac-muted);
  --tblr-primary: var(--ac-primary);
  --tblr-primary-rgb: var(--ac-primary-rgb);
  --tblr-primary-fg: #fff;
  --tblr-primary-darken: #6a48f5;
  --tblr-primary-lt: rgba(var(--ac-primary-rgb), .14);
  --tblr-link-color: var(--ac-primary-2);
  --tblr-link-hover-color: #c4b5fd;
  --tblr-border-radius: 8px;
  --tblr-card-bg: var(--ac-surface);
}
body { background: var(--ac-bg); color: var(--ac-text); -webkit-font-smoothing: antialiased; }
code { color: var(--ac-primary-2); background: rgba(var(--ac-primary-rgb), .1); padding: .1em .4em; border-radius: 5px; }

.boot { min-height: 100vh; display: grid; place-items: center; }

/* ---------- Brand ---------- */
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  margin-right: .7rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}
.brand-sub { font-size: .68rem; font-weight: 500; color: var(--ac-muted); margin-top: 3px; letter-spacing: .02em; }

.btn-discord {
  --tblr-btn-color: #fff;
  --tblr-btn-bg: var(--discord);
  --tblr-btn-border-color: var(--discord);
  --tblr-btn-hover-color: #fff;
  --tblr-btn-hover-bg: var(--discord-hover);
  --tblr-btn-hover-border-color: var(--discord-hover);
  --tblr-btn-active-color: #fff;
  --tblr-btn-active-bg: var(--discord-hover);
  --tblr-btn-active-border-color: var(--discord-hover);
  box-shadow: 0 6px 20px rgba(88, 101, 242, .3);
}
.btn-primary {
  background: linear-gradient(135deg, #8b6cff 0%, #6d4aff 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 20px rgba(var(--ac-primary-rgb), .28);
}
.btn-primary:hover, .btn-primary:focus-visible { background: linear-gradient(135deg, #9a7fff 0%, #7a5aff 100%); color: #fff; border-color: transparent; }
.btn-primary:disabled, .btn-primary.disabled { background: var(--ac-surface-3); color: var(--ac-muted); box-shadow: none; opacity: 1; }
.btn-success { background: var(--ac-green); border-color: var(--ac-green); color: #04140a; font-weight: 600; }
.btn-success:hover { background: #2fd66b; border-color: #2fd66b; color: #04140a; }

/* ---------- Icon tiles ---------- */
.icon-tile {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.25rem;
  --tile: var(--ac-primary);
  color: var(--tile);
  background: color-mix(in srgb, var(--tile) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tile) 22%, transparent);
}
.icon-tile-sm { width: 30px; height: 30px; border-radius: 8px; font-size: 1rem; }
.icon-tile-lg { width: 56px; height: 56px; border-radius: 14px; font-size: 1.7rem; }
.tile-primary { --tile: var(--ac-primary-2); }
.tile-green { --tile: var(--ac-green); }
.tile-orange { --tile: var(--ac-orange); }
.tile-pink { --tile: var(--ac-pink); }
.tile-cyan { --tile: var(--ac-cyan); }

/* ---------- Guest landing ---------- */
.navbar-glass {
  background: rgba(11, 13, 18, .75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ac-border);
}
.hero { position: relative; max-width: 680px; margin: 3.5rem auto 2rem; }
.hero > *:not(.hero-glow) { position: relative; }
.hero-glow {
  position: absolute;
  inset: -80px -120px auto;
  height: 380px;
  background: radial-gradient(ellipse at center, rgba(var(--ac-primary-rgb), .22), transparent 65%);
  pointer-events: none;
}
.hero-logo {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 24px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 50px rgba(0, 0, 0, .5);
}
.hero-title { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; margin-bottom: 1rem; }
.text-gradient {
  background: linear-gradient(90deg, #a78bfa, #7c5cff 45%, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { font-size: 1.1rem; max-width: 540px; margin: 0 auto 2rem; }
.hero-alert { max-width: 420px; }
.feature-card { transition: border-color .2s, transform .2s; }
.feature-card:hover { border-color: var(--ac-border-strong); transform: translateY(-2px); }

/* ---------- Sidebar ---------- */
.sidebar.navbar-vertical {
  --tblr-navbar-bg: #0e1016;
  background: #0e1016;
  border-right: 1px solid var(--ac-border);
}
.sidebar .navbar-brand { font-weight: 700; font-size: .95rem; }
@media (min-width: 992px) {
  .sidebar .navbar-brand { padding: 1.1rem 0 1rem; margin: 0 .25rem; width: 100%; justify-content: flex-start; }
  .sidebar .navbar-collapse { display: flex !important; flex-direction: column; }
  .sidebar .container-fluid { height: 100%; }
}
.sidebar .nav-heading {
  padding: 1.25rem .9rem .4rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5d6478;
  list-style: none;
}
.sidebar .nav-item .nav-link {
  margin: 1px .25rem;
  padding: .6rem .75rem !important;
  border-radius: 8px;
  color: #a3a9ba;
  font-weight: 500;
  transition: background-color .15s, color .15s;
}
.sidebar .nav-item .nav-link:hover:not(.disabled) { background: var(--ac-surface-2); color: #fff; }
.sidebar .nav-item.active .nav-link {
  background: rgba(var(--ac-primary-rgb), .14);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--ac-primary);
}
.sidebar .nav-item.active .nav-link-icon { color: var(--ac-primary-2) !important; }
.sidebar .nav-link.disabled { opacity: .55; }
.sidebar .nav-link .badge { font-size: .62rem; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 1rem .25rem;
  padding: .7rem;
  border: 1px solid var(--ac-border);
  border-radius: 10px;
  background: var(--ac-surface);
}
.user-avatar { background-size: cover; background-position: center; box-shadow: 0 0 0 2px rgba(var(--ac-primary-rgb), .35); }

/* ---------- Page chrome ---------- */
.page-wrapper { background: var(--ac-bg); }
.page-header { margin-top: 0; padding-top: 1.75rem; }
.page-pretitle { color: var(--ac-primary-2); font-weight: 600; letter-spacing: .06em; }
.page-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }

.card {
  background: var(--ac-surface);
  border: 1px solid var(--ac-border);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 10px 30px rgba(0, 0, 0, .18);
}
.card-header { border-bottom-color: var(--ac-border); padding: 1rem 1.25rem; gap: .85rem; }
.card-title { font-weight: 600; font-size: 1rem; }
.card-subtitle { font-size: .8rem; color: var(--ac-muted); margin: 2px 0 0; }
.card-body { padding: 1.25rem; }
.step-num {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b6cff, #6d4aff);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  box-shadow: 0 4px 14px rgba(var(--ac-primary-rgb), .35);
}

/* Tabs in card header */
.card-header-tabs-wrap { padding: 0 1.25rem; background: var(--ac-surface); }
.card-header-tabs-wrap .nav-tabs { border: 0; margin: 0; padding: 0; gap: .25rem; background: transparent; }
.card-header-tabs-wrap .nav-link {
  padding: .85rem .6rem;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ac-muted);
  font-weight: 500;
  background: none !important;
}
.card-header-tabs-wrap .nav-link:hover { color: var(--ac-text); }
.card-header-tabs-wrap .nav-link.active { color: #fff; border-bottom-color: var(--ac-primary); }
.card-header-tabs-wrap .badge { font-size: .65rem; padding: .2em .45em; }

/* ---------- Dropzone ---------- */
.dropzone-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: 2.5rem 1rem;
  border: 1.5px dashed var(--ac-border-strong);
  border-radius: 12px;
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255, 255, 255, .012) 12px 24px);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.dropzone-box:hover,
.dropzone-box.over { border-color: var(--ac-primary); background-color: rgba(var(--ac-primary-rgb), .06); }
.dropzone-box.over .icon-tile { transform: translateY(-3px); }
.dropzone-box .icon-tile { transition: transform .2s; }

/* ---------- Wave player ---------- */
.wave-player {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .7rem .85rem;
  border: 1px solid var(--ac-border);
  border-radius: 12px;
  background: var(--ac-surface-2);
}
.wave-play {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b6cff, #6d4aff);
  color: #fff;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(var(--ac-primary-rgb), .35);
  cursor: pointer;
  transition: transform .1s;
}
.wave-play:active { transform: scale(.94); }
.wave-canvas { flex: 1; min-width: 0; height: 48px; cursor: pointer; display: block; }
.wave-time { flex-shrink: 0; font-size: .78rem; color: var(--ac-muted); font-variant-numeric: tabular-nums; min-width: 78px; text-align: right; }
.result-card .wave-time { min-width: 0; }
.result-card .wave-canvas { height: 40px; }

/* ---------- Speed ---------- */
.speed-display { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.ls-wide { letter-spacing: .08em; }
.speed-big { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.speed-x { color: var(--ac-primary-2); margin-left: 2px; }
.speed-input { width: 120px; }
.speed-input .form-control { font-weight: 600; font-variant-numeric: tabular-nums; }
.range-scale { display: flex; justify-content: space-between; margin-top: .2rem; font-size: .72rem; color: var(--ac-muted); }

.form-range { height: 1.4rem; }
.form-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--ac-primary) 0 var(--fill, 0%), var(--ac-surface-3) var(--fill, 0%) 100%);
}
.form-range::-moz-range-track { height: 6px; border-radius: 6px; background: var(--ac-surface-3); }
.form-range::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--ac-primary); }
.form-range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  background: #fff;
  border: 3px solid var(--ac-primary);
  box-shadow: 0 2px 10px rgba(var(--ac-primary-rgb), .5);
}
.form-range::-moz-range-thumb { width: 12px; height: 12px; background: #fff; border: 3px solid var(--ac-primary); }

.restore-box {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(var(--ac-primary-rgb), .3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(var(--ac-primary-rgb), .12), rgba(var(--ac-primary-rgb), .04));
}
.restore-code { display: inline-block; margin-top: 2px; font-size: .95rem; font-weight: 600; background: none; padding: 0; color: #fff; }
.restore-code .restore-val { color: var(--ac-primary-2); }

/* ---------- Option boxes (switch) ---------- */
.option-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: .85rem;
  height: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--ac-border);
  border-radius: 12px;
  background: var(--ac-surface-2);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
  margin: 0;
}
.option-box:hover { border-color: var(--ac-border-strong); }
.option-input { position: absolute; opacity: 0; pointer-events: none; }
.option-box:has(.option-input:checked) { border-color: rgba(var(--ac-primary-rgb), .55); background: rgba(var(--ac-primary-rgb), .08); }
.option-box:has(.option-input:focus-visible) { outline: 2px solid var(--ac-primary); outline-offset: 2px; }
.switch-ui {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 20px;
  border-radius: 20px;
  background: var(--ac-surface-3);
  box-shadow: inset 0 0 0 1px var(--ac-border-strong);
  transition: background-color .2s;
}
.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #9aa1b4;
  transition: transform .2s, background-color .2s;
}
.option-input:checked ~ .switch-ui { background: var(--ac-primary); box-shadow: none; }
.option-input:checked ~ .switch-ui::after { transform: translateX(16px); background: #fff; }

/* ---------- Effect sliders ---------- */
.slider-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.value-pill {
  min-width: 58px;
  padding: .2rem .55rem;
  border-radius: 6px;
  background: var(--ac-surface-3);
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- Right column ---------- */
@media (min-width: 1200px) { .side-sticky { position: sticky; top: 1.25rem; } }
.summary { margin: 0; border: 1px solid var(--ac-border); border-radius: 10px; overflow: hidden; }
.summary > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem .85rem; }
.summary > div + div { border-top: 1px solid var(--ac-border); }
.summary dt { font-weight: 500; color: var(--ac-muted); font-size: .85rem; }
.summary dd { margin: 0; font-weight: 600; text-align: right; font-size: .88rem; }
.summary .badge { font-weight: 500; }

.segmented { display: flex; padding: 4px; gap: 4px; border-radius: 10px; background: var(--ac-surface-2); border: 1px solid var(--ac-border); }
.segmented label { flex: 1; margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .5rem;
  border-radius: 7px;
  color: var(--ac-muted);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.segmented input:checked + span { background: var(--ac-surface-3); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3), inset 0 0 0 1px var(--ac-border-strong); }
.segmented input:focus-visible + span { outline: 2px solid var(--ac-primary); }

.result-card { border-color: rgba(34, 197, 94, .35); }
.result-card .card-header { background: linear-gradient(135deg, rgba(34, 197, 94, .1), transparent); }
.stat { padding: .6rem .75rem; border-radius: 10px; background: var(--ac-surface-2); border: 1px solid var(--ac-border); height: 100%; }
.stat-label { font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ac-muted); }
.stat-value { font-weight: 600; margin-top: 2px; }
.copy-mini { width: 24px; height: 24px; min-height: 0; padding: 0; }

.progress { background: var(--ac-surface-3); }
.progress-bar { background: var(--ac-primary); }

/* ---------- Guide ---------- */
.steps-primary { --tblr-steps-color: var(--ac-primary); }
.accordion { --tblr-accordion-bg: transparent; --tblr-accordion-border-color: var(--ac-border); }
.accordion-button { font-weight: 500; font-size: .95rem; padding: 1rem 1.25rem; }
.accordion-body { padding: 0 1.25rem 1rem; }

.footer { border-top: 0; }
