/* FileMorph — Dark and "Retro Floppy" themes */

/* ============================== DARK ============================== */
[data-theme="dark"] {
  --bg: #0e0a1c;
  --bg-2: #160f2e;
  --surface: rgba(30, 22, 58, 0.72);
  --surface-solid: #1b1435;
  --surface-2: rgba(167, 139, 250, 0.1);
  --text: #f3efff;
  --muted: #a99fcc;
  --border: rgba(167, 139, 250, 0.2);
  --accent: #a78bfa;
  --accent-ink: #120b26;
  --accent-2: #ff7ab8;
  --accent-3: #5eead4;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --ring: 0 0 0 3px rgba(167, 139, 250, 0.55);
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.8), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.9);
  --blob-1: #be185d;
  --blob-2: #0e7490;
  --blob-3: #6d28d9;
  --mesh-a: rgba(190, 24, 93, 0.35);
  --mesh-b: rgba(14, 116, 144, 0.35);
  --mesh-c: rgba(109, 40, 217, 0.45);
  --mesh-d: rgba(250, 204, 21, 0.08);
  color-scheme: dark;
}
[data-theme="dark"] .blob { opacity: .55; }
[data-theme="dark"] .grain { background-image: radial-gradient(#fff 0.6px, transparent 0.6px); opacity: .03; }
[data-theme="dark"] .fi-label { fill: #120b26; }
[data-theme="dark"] .btn.primary, [data-theme="dark"] .tab[aria-current="page"], [data-theme="dark"] .intent { color: #120b26; }
[data-theme="dark"] .intent .chip-x { color: #120b26; }
[data-theme="dark"] .noscript { background: #3b2f00; color: #ffe8a3; }
[data-theme="dark"] .modal::backdrop { background: rgba(0, 0, 0, .6); }
[data-theme="dark"] .err { background: rgba(248, 113, 113, .12); }
[data-theme="dark"] select option { background: #1b1435; color: #f3efff; }

/* ========================= RETRO FLOPPY ========================== */
[data-theme="retro"] {
  --bg: #008080;
  --bg-2: #006a6a;
  --surface: #c0c0c0;
  --surface-solid: #dfdfdf;
  --surface-2: #b5b5b5;
  --text: #000000;
  --muted: #303030;
  --border: #808080;
  --accent: #000080;
  --accent-ink: #ffffff;
  --accent-2: #800080;
  --accent-3: #008000;
  --ok: #006400;
  --warn: #7a5200;
  --err: #a00000;
  --ring: 0 0 0 2px #000, 0 0 0 4px #ffff00;
  --shadow: 4px 4px 0 #000;
  --shadow-lg: 6px 6px 0 #000;
  --radius: 0px;
  --radius-sm: 0px;
  --font: "Lucida Console", "Courier New", "MS Sans Serif", Monaco, monospace;
  --mono: "Lucida Console", "Courier New", monospace;
  --spring: steps(4, end);
  --ease: steps(3, end);
  color-scheme: light;
}
[data-theme="retro"] body { letter-spacing: 0; }
[data-theme="retro"] .mesh {
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 4px),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .08), transparent 60%);
  animation: none; inset: 0;
}
[data-theme="retro"] .blob { opacity: .22; filter: none; image-rendering: pixelated; }
[data-theme="retro"] .blob path { fill: #00b3b3; }
[data-theme="retro"] .blob.b2 path { fill: #006060; }
[data-theme="retro"] .blob.b3 path { fill: #00a0a0; }
[data-theme="retro"] .grain { opacity: .08; background-size: 2px 2px; }

/* bevelled "window" chrome */
[data-theme="retro"] .card, [data-theme="retro"] .drop, [data-theme="retro"] .modal-inner, [data-theme="retro"] .suggest,
[data-theme="retro"] .toast, [data-theme="retro"] .tool-card, [data-theme="retro"] .search-box {
  background: var(--surface); border: 2px solid; border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf, var(--shadow);
  -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0;
}
[data-theme="retro"] .card { padding-top: 2.4rem; position: relative; }
[data-theme="retro"] .card::before {
  content: "FILEMORPH.EXE"; position: absolute; left: 3px; right: 3px; top: 3px; height: 1.55rem;
  background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font-weight: 700; font-size: .8rem;
  display: flex; align-items: center; padding-left: .5rem; letter-spacing: .05em;
}
[data-theme="retro"] .card::after {
  content: "_ \25A1 \2715"; position: absolute; right: 8px; top: 5px; color: #fff; font-size: .75rem; letter-spacing: .3em;
}
[data-theme="retro"] .results::before { content: "RESULTS.TXT"; }
[data-theme="retro"] .progress-card::before { content: "COPYING... (est. 3 floppies)"; }
[data-theme="retro"] .session::before { content: "MY_FILES"; }
[data-theme="retro"] .queue-card::before { content: "BATCH.BAT"; }
[data-theme="retro"] .credits-card::before { content: "README.TXT"; }
[data-theme="retro"] .modal-head { background: linear-gradient(90deg, #000080, #1084d0); color: #fff; border: 0; }
[data-theme="retro"] .modal-head .icon-btn { background: #c0c0c0; color: #000; border-radius: 0; border: 2px solid; border-color: #fff #404040 #404040 #fff; width: 1.8rem; height: 1.6rem; }
[data-theme="retro"] .modal-inner { background: var(--surface); }
[data-theme="retro"] .modal::backdrop { background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: none; backdrop-filter: none; }

[data-theme="retro"] .topbar { background: #c0c0c0; border-bottom: 2px solid #404040; box-shadow: inset 0 -1px 0 #808080, inset 0 1px 0 #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
[data-theme="retro"] .brand-name b { background: none; color: #000080; }
[data-theme="retro"] .brand-mark { image-rendering: pixelated; }

/* buttons */
[data-theme="retro"] .btn, [data-theme="retro"] .tab, [data-theme="retro"] .pill-btn, [data-theme="retro"] .mode-tab,
[data-theme="retro"] .target, [data-theme="retro"] .theme-switch button, [data-theme="retro"] .pbtn, [data-theme="retro"] .chip-x, [data-theme="retro"] .icon-btn {
  border-radius: 0; background: #c0c0c0; color: #000; border: 2px solid; border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: inset -1px -1px 0 #808080; transition: none;
}
[data-theme="retro"] .btn:active:not(:disabled), [data-theme="retro"] .target:active:not(:disabled), [data-theme="retro"] .tab:active,
[data-theme="retro"] .pbtn:active, [data-theme="retro"] .pill-btn:active {
  border-color: #404040 #ffffff #ffffff #404040; box-shadow: inset 1px 1px 0 #808080; transform: translate(1px, 1px);
}
[data-theme="retro"] .btn:hover:not(:disabled), [data-theme="retro"] .target:hover:not(:disabled), [data-theme="retro"] .tool-card:hover,
[data-theme="retro"] .tab:hover, [data-theme="retro"] .drop:hover, [data-theme="retro"] .pill-btn:hover, [data-theme="retro"] .pcard:hover {
  transform: none; box-shadow: inset -1px -1px 0 #808080, var(--shadow);
}
[data-theme="retro"] .btn.primary, [data-theme="retro"] .tab[aria-current="page"], [data-theme="retro"] .pill-btn[aria-pressed="true"],
[data-theme="retro"] .mode-tab[aria-selected="true"], [data-theme="retro"] .theme-switch button[aria-pressed="true"] {
  background: #000080; color: #fff; border-color: #404040 #ffffff #ffffff #404040;
}
[data-theme="retro"] .theme-switch { background: #c0c0c0; border-radius: 0; border: 2px solid; border-color: #404040 #fff #fff #404040; }
[data-theme="retro"] .target::before { display: none; }
[data-theme="retro"] .target { border-left: 8px solid var(--c); }
[data-theme="retro"] .chip, [data-theme="retro"] .out, [data-theme="retro"] .pcard, [data-theme="retro"] .imgrow, [data-theme="retro"] .wave-wrap {
  border-radius: 0; background: #fff; border: 2px solid; border-color: #404040 #ffffff #ffffff #404040;
}
[data-theme="retro"] .chip { border-left: 6px solid var(--c, #000080); }

/* inputs */
[data-theme="retro"] input, [data-theme="retro"] select, [data-theme="retro"] textarea {
  border-radius: 0 !important; background: #fff !important; color: #000 !important;
  border: 2px solid !important; border-color: #404040 #ffffff #ffffff #404040 !important;
}
[data-theme="retro"] .search-box { border-radius: 0; }
[data-theme="retro"] .search-box input { border: 0 !important; }
[data-theme="retro"] .tool-filter input { border-radius: 0; }

/* drop zone */
[data-theme="retro"] .drop { border: 3px dashed #000080; background: #c0c0c0; }
[data-theme="retro"] .drop-title::before { content: "A:\\> "; color: #000080; }
[data-theme="retro"] .drop-title::after { content: "_"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
[data-theme="retro"] .file-icon { filter: drop-shadow(4px 4px 0 #000); animation: none; }
[data-theme="retro"] .stage.morphing .file-icon { animation: retroJitter .5s steps(2) infinite; }
@keyframes retroJitter { 50% { transform: translate(3px, -3px); } }
[data-theme="retro"] .fi-body { fill: #fff; stroke: #000; stroke-width: 6; }
[data-theme="retro"] .fi-fold { stroke: #000; }
[data-theme="retro"] .fi-tag { fill: #000080; }
[data-theme="retro"] .stage-goo { display: none; }
[data-theme="retro"] .stage::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; transform: translate(-50%, -48%);
  background:
    linear-gradient(#000 0 0) 22px 0 / 76px 44px no-repeat,
    linear-gradient(#c0c0c0 0 0) 66px 6px / 18px 32px no-repeat,
    linear-gradient(#fff 0 0) 16px 62px / 88px 52px no-repeat,
    #1a1a1a;
  box-shadow: 4px 4px 0 #000; opacity: .25; image-rendering: pixelated;
}
[data-theme="retro"] .hero h1 { letter-spacing: -0.02em; text-shadow: 3px 3px 0 #000; color: #fff; }
[data-theme="retro"] .morph-word { background: none; color: #ffff00; animation: none; }
[data-theme="retro"] .eyebrow, [data-theme="retro"] .lede, [data-theme="retro"] .badges, [data-theme="retro"] .search-label,
[data-theme="retro"] .section-head h1, [data-theme="retro"] .toolcat-title { color: #fff; text-shadow: 2px 2px 0 #000; }
[data-theme="retro"] .eyebrow { background: #000080; border: 2px solid #fff; border-radius: 0; }
[data-theme="retro"] .toolcat-title .muted { color: #e0e0e0; }

/* progress like a file copy dialog */
[data-theme="retro"] .bar { border-radius: 0; background: #fff; border: 2px solid; border-color: #404040 #fff #fff #404040; height: 22px; }
[data-theme="retro"] .bar > span { border-radius: 0; animation: none; background: repeating-linear-gradient(90deg, #000080 0 14px, transparent 14px 17px); }
[data-theme="retro"] .bar > span::after { display: none; }
[data-theme="retro"] .mini-file { border-radius: 0; background: #000080; box-shadow: 3px 3px 0 #000; animation: retroJitter .6s steps(2) infinite; }
[data-theme="retro"] .morph-arrow i { border-radius: 0; background: #000; animation: blink .9s steps(1) infinite; }
[data-theme="retro"] .morph-arrow i:nth-child(2) { animation-delay: .3s; } [data-theme="retro"] .morph-arrow i:nth-child(3) { animation-delay: .6s; }
[data-theme="retro"] .pill { border-radius: 0; border: 1px solid #000; }
[data-theme="retro"] .footer { background: #c0c0c0; color: #000; border-top: 2px solid #fff; }
[data-theme="retro"] .footer a, [data-theme="retro"] a { color: #0000ee; }
[data-theme="retro"] a:visited { color: #551a8b; }
[data-theme="retro"] .badge { border-radius: 0; background: #800000; }
[data-theme="retro"] .toast { border-left-width: 8px; }
[data-theme="retro"] .drag-bubble { border-radius: 0; animation: none; border: 3px solid #000; box-shadow: 6px 6px 0 #000; background: #ffffcc; }
[data-theme="retro"] .drag-overlay { background: rgba(0, 0, 128, .25); -webkit-backdrop-filter: none; backdrop-filter: none; }
[data-theme="retro"] .mode-tabs { background: #c0c0c0; border-radius: 0; }
[data-theme="retro"] .opt-group { border-radius: 0; border: 2px groove #fff; }
[data-theme="retro"] .opt-group legend { color: #000080; }
[data-theme="retro"] .gratitude { border-left-color: #000080; }
[data-theme="retro"] .err, [data-theme="retro"] .warnlist li { border-radius: 0; }
[data-theme="retro"] img, [data-theme="retro"] canvas { image-rendering: auto; }
[data-theme="retro"] kbd { border-radius: 0; background: #fff; }
[data-theme="retro"] .stage-sparkles i { border-radius: 0; }
