/*
  iconFlow — Stylesheet
  -----------------------------------------------------------------
  Designed & created by @SoyMaanuel
  TikTok: https://tiktok.com/@soymaanuel
  -----------------------------------------------------------------
  Liquid Glass design system. Dark & light themes. Mobile-first.
  License: MIT.
*/

/* =======   RESET & BASE   ======= */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root{
  --orange-1:#ff8a3d;
  --orange-2:#ff6a00;
  --orange-3:#ffb37a;

  /* Glass surfaces now darker for better contrast */
  --glass-bg: linear-gradient(
    135deg,
    rgba(28,22,20,.72) 0%,
    rgba(20,16,16,.55) 40%,
    rgba(28,22,20,.68) 100%
  );
  --glass-brd: rgba(255,255,255,.14);
  --glass-hi: rgba(255,255,255,.35);
  --glass-shadow:
    0 10px 40px rgba(0,0,0,.55),
    0 2px 8px rgba(0,0,0,.35),
    inset 0 1px 0 var(--glass-hi),
    inset 0 -1px 0 rgba(255,255,255,.04);
  --glass-blur: blur(26px) saturate(180%);

  /* Text tokens — high contrast on dark glass */
  --txt: #ffffff;
  --txt-dim: #e2e2e8;
  --txt-muted: #b8b8c2;
  --txt-faint: #8e8e98;
  --danger:#ff5c5c;
  --ok:#4ee896;
  --radius: 22px;
  --radius-sm: 14px;
  --bg1:#0a0a0f;
  --bg2:#141018;

  /* Inner surface (options, sub-panels) — darker than outer glass */
  --inner-bg: rgba(0,0,0,.28);
  --inner-bg-strong: rgba(0,0,0,.42);
}

html[data-theme="light"]{
  --glass-bg: linear-gradient(
    135deg,
    rgba(255,255,255,.88) 0%,
    rgba(255,255,255,.72) 45%,
    rgba(255,255,255,.85) 100%
  );
  --glass-brd: rgba(120,80,40,.18);
  --glass-hi: rgba(255,255,255,1);
  --glass-shadow:
    0 10px 34px rgba(150,80,30,.16),
    0 2px 8px rgba(150,80,30,.08),
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(255,255,255,.7);
  --txt:#141418;
  --txt-dim:#2e2e34;
  --txt-muted:#5a5a64;
  --txt-faint:#7a7a84;
  --danger:#d81f3a;
  --ok:#1e9e57;
  --bg1:#fff8f1;
  --bg2:#ffe9d6;
  --inner-bg: rgba(255,255,255,.55);
  --inner-bg-strong: rgba(255,255,255,.75);
}

html{height:100%}

body{
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Roboto, "Helvetica Neue", "Noto Sans JP", Arial, sans-serif;
  background: linear-gradient(160deg, var(--bg1), var(--bg2));
  color: var(--txt);
  min-height: 100vh;
  overflow-x: hidden;
  padding: 130px 16px 110px;
  transition: background .4s ease, color .4s ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (max-width: 640px){ body{ padding: 150px 12px 100px; } }

a{color:var(--orange-2);text-decoration:none}
a:hover{text-decoration:underline}
html[data-theme="dark"] a{color:var(--orange-3)}

/* =======   ANIMATED BACKGROUND   ======= */
.bg-mosaic{position:fixed;inset:0;z-index:-2;overflow:hidden;pointer-events:none}

.tiles{
  position:absolute;inset:-20%;
  background-image:
    linear-gradient(rgba(255,138,61,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,138,61,.10) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  animation: tileScroll 40s linear infinite;
  mask-image: radial-gradient(circle at 50% 40%, #000 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 40%, transparent 85%);
}
html[data-theme="light"] .tiles{
  background-image:
    linear-gradient(rgba(255,106,0,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,106,0,.10) 1px, transparent 1px);
}
@keyframes tileScroll{
  0%   { transform: translate(0,0) scale(1.02); }
  50%  { transform: translate(-32px,-32px) scale(1.05); }
  100% { transform: translate(0,0) scale(1.02); }
}

.blob{
  position:absolute;border-radius:45% 55% 60% 40% / 55% 45% 55% 45%;
  filter: blur(70px);
  opacity:.85;
  mix-blend-mode:screen;
  animation: squeeze 18s ease-in-out infinite;
}
.b1{width:55vw;height:55vw;left:-10vw;top:-10vw;
  background: radial-gradient(circle at 30% 30%, #ff8a3d, transparent 70%);}
.b2{width:50vw;height:50vw;right:-10vw;top:5vw;
  background: radial-gradient(circle at 60% 40%, #ff5a00, transparent 70%);
  animation-delay:-4s;}
.b3{width:60vw;height:60vw;left:15vw;bottom:-20vw;
  background: radial-gradient(circle at 50% 50%, #ffb37a, transparent 70%);
  animation-delay:-8s;}
.b4{width:45vw;height:45vw;right:10vw;bottom:-15vw;
  background: radial-gradient(circle at 40% 60%, #ff6a00, transparent 70%);
  animation-delay:-12s;}

html[data-theme="light"] .blob{
  opacity:.35;
  mix-blend-mode:multiply;
  filter: blur(80px);
}

@keyframes squeeze{
  0%,100%{transform: scale(1) rotate(0deg)}
  25%    {transform: scale(1.15,0.9) rotate(15deg)}
  50%    {transform: scale(0.9,1.15) rotate(-10deg)}
  75%    {transform: scale(1.1,0.95) rotate(8deg)}
}

.grain{
  position:absolute;inset:-50%;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/></svg>");
  opacity:.06;
}
html[data-theme="light"] .grain{ opacity:.035; }

/* =======   LIQUID GLASS SYSTEM   ======= */
.glass{
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
.glass::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,.14) 0%,
    rgba(255,255,255,.04) 30%,
    transparent 55%,
    rgba(255,255,255,.04) 100%
  );
  pointer-events:none;
  border-radius: inherit;
  mix-blend-mode: screen;
  opacity:.7;
}
html[data-theme="light"] .glass::before{
  background: linear-gradient(
    135deg,
    rgba(255,255,255,.55) 0%,
    rgba(255,255,255,.18) 30%,
    transparent 55%,
    rgba(255,255,255,.22) 100%
  );
  mix-blend-mode: normal;
  opacity:.7;
}
.glass::after{
  content:"";
  position:absolute; inset:0;
  border-radius: inherit;
  pointer-events:none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -1px 0 rgba(255,255,255,.08),
    inset 1px 0 0 rgba(255,255,255,.14),
    inset -1px 0 0 rgba(255,255,255,.08);
}
html[data-theme="light"] .glass::after{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(255,255,255,.55),
    inset 1px 0 0 rgba(255,255,255,.9),
    inset -1px 0 0 rgba(255,255,255,.75);
}

/* =======   TOPBAR   ======= */
.topbar{
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, calc(100% - 24px));
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 50;
  flex-wrap: wrap;
  transition: padding .3s ease;
}

.brand{ display:flex; align-items:center; gap:10px; flex-shrink:0; min-width:0; }
.brand .dot{
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg,var(--orange-1),var(--orange-2));
  box-shadow: 0 0 20px var(--orange-1), 0 0 6px var(--orange-2);
  flex-shrink: 0;
}
.brand h1{ font-size:1.1rem; font-weight:700; letter-spacing:.3px; white-space:nowrap; color:var(--txt); }
.brand .tag{ font-size:.72rem; color:var(--txt-muted); white-space:nowrap; }

.top-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

/* =======   BUTTONS   ======= */
.btn{
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: .86rem;
  color: #fff;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  font-family: inherit;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:active{transform: scale(.96)}

.btn.primary{
  background: linear-gradient(135deg,var(--orange-1),var(--orange-2));
  box-shadow:
    0 6px 20px rgba(255,106,0,.45),
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -1px 0 rgba(0,0,0,.15);
}
.btn.primary:hover{
  box-shadow:
    0 8px 26px rgba(255,106,0,.65),
    inset 0 1px 0 rgba(255,255,255,.7);
}
.btn.ghost{
  background: rgba(255,255,255,.10);
  border: 1px solid var(--glass-brd);
  color: var(--txt);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 2px 8px rgba(0,0,0,.25);
}
html[data-theme="light"] .btn.ghost{
  background: rgba(255,255,255,.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 2px 8px rgba(150,80,30,.10);
}
.btn:disabled{opacity:.45;cursor:not-allowed}

.donate-btn{
  padding: 9px 14px;
  font-size: .82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-btn{
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-brd);
  background: rgba(255,255,255,.10);
  color: var(--txt);
  cursor: pointer;
  font-weight: 700;
  transition: transform .15s ease, background .2s ease;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 2px 8px rgba(0,0,0,.25);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.icon-btn:hover{ transform: scale(1.08); background: rgba(255,255,255,.18); }
html[data-theme="light"] .icon-btn{
  background: rgba(255,255,255,.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 2px 8px rgba(150,80,30,.10);
}

/* =======   LANGUAGE SWITCH   ======= */
.lang-switch{
  position: relative;
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid var(--glass-brd);
  user-select: none;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 2px 8px rgba(0,0,0,.25);
  flex-shrink: 0;
}
html[data-theme="light"] .lang-switch{
  background: rgba(255,255,255,.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 2px 8px rgba(150,80,30,.10);
}
.lang-opt{
  position: relative;
  z-index: 2;
  border: none;
  background: transparent;
  color: var(--txt-muted);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .5px;
  padding: 6px 11px;
  cursor: pointer;
  border-radius: 999px;
  transition: color .25s ease;
  font-family: inherit;
}
.lang-opt[aria-checked="true"]{ color: #fff; }

.lang-slider{
  position: absolute;
  top: 4px; left: 4px;
  height: calc(100% - 8px);
  width: calc((100% - 8px) / 3);
  border-radius: 999px;
  background: linear-gradient(135deg,var(--orange-1),var(--orange-2));
  box-shadow:
    0 4px 12px rgba(255,106,0,.5),
    inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .3s cubic-bezier(.4,1.4,.6,1);
  z-index: 1;
}
.lang-switch[data-index="0"] .lang-slider{ transform: translateX(0); }
.lang-switch[data-index="1"] .lang-slider{ transform: translateX(100%); }
.lang-switch[data-index="2"] .lang-slider{ transform: translateX(200%); }

/* =======   THEME SWITCH   ======= */
.switch-wrap{ display:flex; align-items:center; gap:6px; flex-shrink:0; }
.switch-label{font-size: .95rem; opacity: .9}
.switch{
  position: relative;
  width: 54px; height: 30px;
  border-radius: 999px;
  border: 1px solid var(--glass-brd);
  background: rgba(255,255,255,.10);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: background .25s ease, box-shadow .25s ease;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 2px 8px rgba(0,0,0,.25);
  flex-shrink: 0;
}
html[data-theme="light"] .switch{
  background: rgba(255,255,255,.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 2px 8px rgba(150,80,30,.10);
}
.switch .knob{
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg,#fff,#ffd7b8);
  box-shadow:
    0 3px 8px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.9);
  transition: left .25s cubic-bezier(.4,1.4,.6,1);
}
.switch[aria-checked="true"]{
  background: linear-gradient(135deg,var(--orange-1),var(--orange-2));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.5),
    0 4px 14px rgba(255,106,0,.45);
}
.switch[aria-checked="true"] .knob{ left: calc(100% - 25px); }

/* =======   RESPONSIVE TOPBAR   ======= */
@media (max-width: 900px){
  .brand .tag{ display: none; }
  .brand h1{ font-size: 1.05rem; }
  .topbar{ padding: 10px 14px; gap: 10px; }
}

@media (max-width: 640px){
  body{ padding: 168px 12px 100px; }

  .topbar{
    padding: 10px 12px 12px;
    gap: 10px;
    top: 10px;
    width: calc(100% - 20px);
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand lang"
      "actions actions";
    align-items: center;
  }
  .brand{ grid-area: brand; justify-content: flex-start; }
  .brand h1{ font-size: 1rem; }
  .lang-switch{ grid-area: lang; }
  .top-actions{ grid-area: actions; justify-content: center; width: 100%; flex-wrap: nowrap; gap: 8px; }
  .donate-btn{
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    padding: 8px 10px;
    font-size: .78rem;
  }
  .icon-btn{ width: 36px; height: 36px; font-size: .9rem; }
  .switch{ width: 48px; height: 28px; }
  .switch .knob{ width: 20px; height: 20px; }
  .switch[aria-checked="true"] .knob{ left: calc(100% - 23px); }
}

@media (max-width: 380px){
  .donate-btn span[data-i18n]{ display: none; }
  .donate-btn{ padding: 8px 12px; }
  .lang-opt{ padding: 5px 9px; font-size: .68rem; }
}

/* =======   HERO   ======= */
.hero{ width: min(1200px, 100%); margin: 0 auto 24px; padding: 28px; }
.hero h2{
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.15;
  background: linear-gradient(135deg,var(--orange-3),var(--orange-1),var(--orange-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme="light"] .hero h2{
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: #b84700;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.hero .sub{
  color: var(--txt-dim);
  margin-bottom: 16px;
  max-width: 720px;
  line-height: 1.6;
}
@media (max-width: 640px){
  .hero{ padding: 20px 16px; }
  .hero .sub{ margin-bottom: 12px; }
}

/* =======   SEO INTRO   ======= */
/* Full-width block, aligned left, reads as a proper card */
.seo-intro{
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--inner-bg);
  border: 1px solid var(--glass-brd);
  font-size: .9rem;
  line-height: 1.7;
  color: var(--txt-dim);
  width: 100%;
  max-width: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.seo-intro p{ margin: 0; }
.seo-intro b{ color: var(--txt); font-weight: 700; }
html[data-theme="light"] .seo-intro{
  background: var(--inner-bg);
  color: var(--txt-dim);
}
html[data-theme="light"] .seo-intro b{ color: #141418; }
@media (max-width: 640px){
  .seo-intro{ font-size: .82rem; padding: 12px 14px; line-height: 1.65; }
}

/* =======   MAIN GRID   ======= */
.grid{
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 880px){ .grid{ grid-template-columns: 1fr; gap: 18px; } }

.panel{
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 400px;
}
@media (max-width: 640px){ .panel{ padding: 18px; min-height: auto; } }
.panel h3{ font-size:1.05rem; font-weight:700; letter-spacing:.2px; color:var(--txt); }

/* =======   DROPZONE   ======= */
.dropzone{
  border: 2px dashed var(--glass-brd);
  border-radius: 16px;
  padding: 30px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .25s ease;
  background: var(--inner-bg);
}
html[data-theme="light"] .dropzone{ background: var(--inner-bg); }
.dropzone:hover, .dropzone.drag{
  border-color: var(--orange-1);
  background: rgba(255,138,61,.14);
  transform: translateY(-2px);
}
.dz-icon{ font-size: 2rem; margin-bottom: 6px; opacity: .9; color: var(--txt); }
.dz-title{ font-weight: 700; font-size: 1rem; color: var(--txt); }
.dz-sub{ color: var(--txt-dim); font-size: .85rem; margin: 2px 0 8px; }
.dropzone small{ font-size: .74rem; color: var(--txt-muted); letter-spacing: .3px; }
@media (max-width: 640px){
  .dropzone{ padding: 24px 12px; }
  .dz-icon{ font-size: 1.6rem; }
}

/* =======   QUEUE LIST   ======= */
.queue{
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.queue li{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--inner-bg);
  border: 1px solid var(--glass-brd);
  font-size: .85rem;
  color: var(--txt);
}
html[data-theme="light"] .queue li{ background: var(--inner-bg); }
.queue img{
  width: 34px; height: 34px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
  flex-shrink: 0;
}
.queue .fname{ flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color: var(--txt); }
.queue .rm{
  border: none; background: transparent; color: var(--danger);
  cursor: pointer; font-size: 1rem; padding: 2px 6px; border-radius: 6px;
  flex-shrink: 0;
}
.queue .rm:hover{ background: rgba(255,77,77,.15); }

/* =======   EXPORT OPTIONS   ======= */
.export-options{
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--inner-bg-strong);
  border: 1px solid var(--glass-brd);
}
html[data-theme="light"] .export-options{ background: var(--inner-bg-strong); }

.eo-title{
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--txt-muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.eo-opt{
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  border: 1px solid transparent;
  font-size: .85rem;
}
.eo-opt:hover{
  background: rgba(255,138,61,.10);
  border-color: rgba(255,138,61,.30);
}
.eo-opt input[type="radio"]{ display: none; }

.eo-dot{
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--glass-brd);
  margin-top: 1px;
  position: relative;
  transition: border-color .2s ease, background .2s ease;
  background: rgba(0,0,0,.35);
}
html[data-theme="light"] .eo-dot{ background: rgba(255,255,255,.6); }
.eo-opt input:checked + .eo-dot{
  border-color: var(--orange-1);
  background: linear-gradient(135deg,var(--orange-1),var(--orange-2));
  box-shadow: 0 0 0 3px rgba(255,138,61,.25);
}
.eo-opt input:checked + .eo-dot::after{
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}

/* Option text — boosted contrast */
.eo-text{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.eo-text b{
  font-weight: 700;
  font-size: .88rem;
  color: var(--txt);
  line-height: 1.25;
}
.eo-text small{
  font-size: .76rem;
  color: var(--txt-dim);
  line-height: 1.45;
}

/* Sub-panel (custom / multi preset) — visually nested */
.eo-sub{
  margin: 0 0 8px 30px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,138,61,.10);
  border: 1px solid rgba(255,138,61,.28);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: pop .25s ease;
}
.eo-sub[hidden]{ display: none !important; }

.eo-mini{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .78rem;
  color: var(--txt-dim);
  flex: 1;
  min-width: 0;
}
.eo-mini > span{
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  font-size: .7rem;
  color: var(--txt-dim);
}
.eo-mini select,
.eo-mini input[type="number"]{
  font-family: inherit;
  font-size: .88rem;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--glass-brd);
  background: rgba(0,0,0,.45);
  color: var(--txt);
  width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
html[data-theme="light"] .eo-mini select,
html[data-theme="light"] .eo-mini input[type="number"]{
  background: rgba(255,255,255,.9);
  color: #141418;
}
.eo-mini select:focus,
.eo-mini input[type="number"]:focus{
  outline: none;
  border-color: var(--orange-1);
  box-shadow: 0 0 0 3px rgba(255,138,61,.25);
  background: rgba(0,0,0,.55);
}
html[data-theme="light"] .eo-mini select:focus,
html[data-theme="light"] .eo-mini input[type="number"]:focus{
  background: #fff;
}
/* Dropdown list items (dark browsers use OS colors) */
.eo-mini select option{
  background: #1a1a22;
  color: #fff;
}
html[data-theme="light"] .eo-mini select option{
  background: #fff;
  color: #141418;
}

.eo-custom-row{ display: flex; gap: 10px; }

.eo-toggle{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  color: var(--txt-dim);
  cursor: pointer;
  user-select: none;
}
.eo-toggle input{ display: none; }
.eo-toggle-track{
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  border: 1px solid var(--glass-brd);
  transition: background .2s ease;
  flex-shrink: 0;
}
html[data-theme="light"] .eo-toggle-track{ background: rgba(0,0,0,.15); }
.eo-toggle-knob{
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg,#fff,#ffd7b8);
  box-shadow: 0 2px 4px rgba(0,0,0,.35);
  transition: left .2s cubic-bezier(.4,1.4,.6,1);
}
.eo-toggle input:checked + .eo-toggle-track{
  background: linear-gradient(135deg,var(--orange-1),var(--orange-2));
}
.eo-toggle input:checked + .eo-toggle-track .eo-toggle-knob{
  left: calc(100% - 18px);
}

.eo-hint{
  font-size: .74rem;
  color: var(--txt-muted);
  font-style: italic;
}

@media (max-width: 640px){
  .eo-opt{ padding: 8px 8px; grid-template-columns: 18px 1fr; gap: 8px; }
  .eo-text b{ font-size: .84rem; }
  .eo-text small{ font-size: .72rem; }
  .eo-sub{ margin-left: 22px; padding: 10px 12px; }
  .eo-custom-row{ flex-direction: column; }
}

/* =======   DOWNLOAD ACTIONS   ======= */
.dl-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.dl-actions .btn{ flex:1 1 auto; min-width:140px; }
@media (max-width: 480px){ .dl-actions .btn{ min-width:0; } }

/* =======   RESULTS LIST   ======= */
.results{
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}
.results li{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--inner-bg);
  border: 1px solid var(--glass-brd);
  font-size: .85rem;
  color: var(--txt);
  animation: pop .35s ease;
}
html[data-theme="light"] .results li{ background: var(--inner-bg); }
@keyframes pop{ from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }
.results img{
  width: 34px; height: 34px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0,0,0,.35);
  flex-shrink: 0;
}
html[data-theme="light"] .results img{ background: rgba(0,0,0,.06); }
.results .fname{
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--txt);
}
.results .meta{
  font-size: .7rem;
  color: var(--txt-muted);
  display: block;
  margin-top: 2px;
}
.results .empty{
  justify-content: center;
  color: var(--txt-muted);
  border-style: dashed;
  opacity: .9;
}
.results .err{ border-color: rgba(255,77,77,.55); background: rgba(255,77,77,.10); }
.results .dl-btn{
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  background: linear-gradient(135deg,var(--orange-1),var(--orange-2));
  color: #fff;
  font-weight: 600;
  font-size: .78rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,106,0,.4), inset 0 1px 0 rgba(255,255,255,.5);
}
.results .dl-btn:hover{ filter: brightness(1.1); }

/* =======   FOOTER   ======= */
.footer{
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(1200px, calc(100% - 24px));
  margin: 0 0 12px 0;
  padding: 14px 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
.footer::before{
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      var(--orange-1),
      var(--orange-3),
      var(--orange-1),
      transparent);
  opacity: .7;
  pointer-events: none;
  z-index: 3;
}
.footer::after{
  content: '';
  position: absolute;
  inset: -50% -20%;
  background: radial-gradient(circle at 50% 100%,
      rgba(255,138,61,.18),
      transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.footer-text{
  position: relative;
  z-index: 1;
  font-size: .95rem;
  color: var(--txt-dim);
  font-family: inherit;
  letter-spacing: .2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-text::before{
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  box-shadow: 0 0 14px rgba(255,138,61,.7);
  display: inline-block;
}
.footer-link{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .4px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  box-shadow:
    0 6px 20px rgba(255,106,0,.45),
    inset 0 1px 0 rgba(255,255,255,.45);
  transition: transform .25s cubic-bezier(.4,1.4,.6,1),
              box-shadow .25s ease,
              filter .25s ease;
  z-index: 2;
}
.footer-link:hover{
  transform: translateY(-3px) scale(1.05);
  filter: brightness(1.08);
  box-shadow:
    0 10px 30px rgba(255,106,0,.65),
    0 0 0 4px rgba(255,138,61,.18),
    inset 0 1px 0 rgba(255,255,255,.55);
  text-decoration: none;
  color: #fff;
}
.footer-link:active{ transform: translateY(-1px) scale(1.02); }

@media (max-width: 640px){
  .footer{ padding: 10px 12px; margin-bottom: 8px; width: calc(100% - 20px); }
  .footer-text{ font-size: .8rem; gap: 6px; }
  .footer-link{ font-size: .85rem; padding: 5px 10px; }
}

/* =======   MODALS   ======= */
.modal-backdrop{
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade .2s ease;
}
html[data-theme="light"] .modal-backdrop{ background: rgba(60,30,10,.35); }
.modal-backdrop[hidden]{ display: none; }
@keyframes fade{ from{opacity:0} to{opacity:1} }

.modal{
  width: min(520px, 100%);
  padding: 26px;
  position: relative;
  z-index: 1;
  animation: pop .3s ease;
  pointer-events: auto;
}
.modal h3{ margin-bottom: 10px; font-size: 1.15rem; color: var(--txt); }
.modal p, .modal li{
  font-size: .9rem; color: var(--txt-dim); line-height: 1.65; margin-bottom: 6px;
}
.modal ul{ padding-left: 20px; margin: 10px 0; }
.modal .warn{ color: var(--orange-3); font-weight: 600; margin-top: 10px; }
html[data-theme="light"] .modal .warn{ color: #b84700; }

.modal-close{
  position: absolute;
  top: 8px; right: 8px;
  z-index: 5;
  width: 36px; height: 36px;
  border: none;
  background: rgba(255,255,255,.10);
  color: var(--txt);
  font-size: 1rem;
  cursor: pointer;
  border-radius: 10px;
  display: grid;
  place-items: center;
  transition: background .2s ease, transform .15s ease;
  pointer-events: auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal-close:hover{ background: rgba(255,138,61,.4); transform: scale(1.05); }
html[data-theme="light"] .modal-close{ background: rgba(0,0,0,.06); }

.donate-grid{ display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.donate-grid .btn{ flex: 1; min-width: 140px; }

/* =======   TOASTS   ======= */
.toast-wrap{
  position: fixed;
  bottom: 90px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast{
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--glass-shadow);
  color: var(--txt);
  font-size: .85rem;
  line-height: 1.45;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  animation: toastIn .35s cubic-bezier(.4,1.4,.6,1);
  word-break: break-word;
}
html[data-theme="light"] .toast{ background: rgba(255,255,255,.95); color: #141418; }
.toast.out{ animation: toastOut .3s ease forwards; }
.toast .icon{ flex-shrink: 0; font-size: 1rem; line-height: 1.2; }
.toast.info .icon{ color: var(--orange-1); }
.toast.warn{ border-color: rgba(255,170,60,.6); }
.toast.warn .icon{ color: #ffae00; }
.toast.err{ border-color: rgba(255,77,77,.6); }
.toast.err .icon{ color: var(--danger); }
.toast.ok{ border-color: rgba(61,220,132,.55); }
.toast.ok .icon{ color: var(--ok); }

@keyframes toastIn{
  from{ opacity:0; transform: translateX(30px) scale(.92); }
  to{ opacity:1; transform: none; }
}
@keyframes toastOut{
  to{ opacity:0; transform: translateX(30px) scale(.92); }
}
@media (max-width: 640px){
  .toast-wrap{ bottom: 80px; right: 12px; left: 12px; max-width: none; }
}

/* =======   SCROLLBARS   ======= */
.queue::-webkit-scrollbar, .results::-webkit-scrollbar{ width: 8px; }
.queue::-webkit-scrollbar-thumb, .results::-webkit-scrollbar-thumb{
  background: rgba(255,138,61,.5);
  border-radius: 8px;
}