:root {
  color-scheme: dark;
  --bg: #0f1020;
  --panel: #17182b;
  --panel-2: #1d1f36;
  --line: rgba(255,255,255,.08);
  --text: #f5f4ff;
  --muted: #a5a6bd;
  --purple: #7c3aed;
  --purple-2: #9b5cff;
  --purple-soft: rgba(124,58,237,.18);
  --orange: #ff8a3d;
  --success: #56d39b;
  --danger: #ff6b8a;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { min-height: 100dvh; padding: max(20px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); overflow-x: hidden; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.glow { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(600px 380px at 85% -8%, rgba(124,58,237,.30), transparent 60%),
    radial-gradient(520px 340px at -10% 105%, rgba(255,138,61,.08), transparent 60%),
    radial-gradient(420px 260px at 50% 40%, rgba(155,92,255,.05), transparent 70%); }

.app-shell { position: relative; z-index: 1; width: 100%; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column;
  border: 1px solid rgba(155,92,255,.14); border-radius: 26px; overflow: hidden;
  background: radial-gradient(circle at 85% -10%, rgba(124,58,237,.22), transparent 38%), rgba(15,16,32,.86);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04); backdrop-filter: blur(10px); }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 12px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-icon { width: 44px; height: 44px; border-radius: 13px; box-shadow: 0 8px 24px rgba(124,58,237,.3); flex: 0 0 44px; }
.brand-copy { min-width: 0; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.brand-subtitle { margin-top: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 12px; cursor: pointer; color: #d8d6ef; transition: .18s ease; }
.icon-btn:hover { background: var(--purple-soft); border-color: rgba(155,92,255,.32); }
.icon-btn svg { width: 18px; fill: currentColor; }

/* link */
.link-card { margin: 4px 20px 12px; padding: 14px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(255,255,255,.02)); border: 1px solid rgba(155,92,255,.2); }
.link-row { margin-top: 9px; display: flex; gap: 8px; }
.input-wrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; border-radius: 13px; background: rgba(10,10,24,.7); border: 1px solid rgba(255,255,255,.09); transition: border-color .18s, box-shadow .18s; }
.input-wrap:focus-within { border-color: rgba(155,92,255,.6); box-shadow: 0 0 0 4px rgba(124,58,237,.16); }
.input-icon { width: 17px; margin-left: 12px; fill: #8f84c4; flex: 0 0 17px; }
.input-wrap input { flex: 1; min-width: 0; height: 46px; padding: 0 8px 0 9px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.input-wrap input::placeholder { color: #6f7090; }
.paste-btn { margin-right: 6px; border: 1px solid rgba(155,92,255,.25); background: rgba(124,58,237,.12); color: #ddd8ff; border-radius: 9px; padding: 6px 10px; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.paste-btn:hover { background: rgba(124,58,237,.25); }
.search-btn { flex: 0 0 auto; padding: 0 18px; min-height: 48px; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; display: none; animation: spin .8s linear infinite; }
.search-btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.chips { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.chips span { font-size: 10.5px; color: #a99fd6; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); }

/* status */
.status-card { margin: 0 20px 12px; padding: 13px 14px; background: linear-gradient(135deg, rgba(124,58,237,.17), rgba(255,255,255,.025)); border: 1px solid rgba(155,92,255,.18); border-radius: 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status-label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: #b6a7e9; font-weight: 750; }
.status-row { margin-top: 3px; display: flex; align-items: baseline; gap: 7px; }
.status-row strong { font-size: 24px; line-height: 1; }
.status-row span { color: var(--muted); font-size: 12.5px; }
.ghost-btn { color: #ddd8ff; border: 1px solid rgba(155,92,255,.25); background: rgba(124,58,237,.12); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 12px; font-weight: 700; }
.ghost-btn:hover { background: rgba(124,58,237,.23); }
.ghost-btn:disabled { opacity: .45; cursor: default; }

/* list */
.media-list { padding: 0 20px 8px; }
.media-card { margin-bottom: 10px; padding: 13px; border: 1px solid var(--line); background: rgba(23,24,43,.92); border-radius: 16px; transition: .16s ease; animation: rise .32s cubic-bezier(.2,.8,.2,1) both; }
.media-card:hover { border-color: rgba(155,92,255,.25); background: #1a1b31; }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.media-head { display: flex; gap: 12px; align-items: center; }
.media-preview { width: 104px; height: 64px; position: relative; border-radius: 11px; overflow: hidden; flex: 0 0 104px; background: linear-gradient(135deg, rgba(124,58,237,.22), rgba(217,70,239,.12)); display: grid; place-items: center; }
.media-badge { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--purple), #5b21b6); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); z-index: 1; }
.media-badge.audio { background: linear-gradient(135deg, #6d28d9, #4338ca); }
.media-badge.stream { background: linear-gradient(135deg, #7c3aed, #d946ef); }
.media-badge svg { width: 19px; height: 19px; fill: white; }
.media-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.media-dur { position: absolute; right: 5px; bottom: 5px; z-index: 3; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 5px; background: rgba(0,0,0,.72); }
.live-dot { position: absolute; left: 5px; top: 5px; z-index: 3; font-size: 9.5px; font-weight: 800; padding: 1px 6px; border-radius: 5px; background: #e11d48; letter-spacing: .4px; }
.media-copy { min-width: 0; flex: 1; }
.media-title { font-size: 13.5px; font-weight: 760; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.media-meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 11px; align-items: center; }
.pill { padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.06); }
.pill.site { color: #d9cdfd; background: rgba(124,58,237,.16); border-color: rgba(155,92,255,.22); }
.media-actions { margin-top: 11px; display: flex; gap: 7px; flex-wrap: wrap; }
.primary-btn { position: relative; overflow: hidden; flex: 1; min-width: 150px; border: 0; border-radius: 11px; padding: 10px 12px; color: white; cursor: pointer; font-size: 12.5px; font-weight: 800; background: linear-gradient(135deg, var(--purple), var(--purple-2)); box-shadow: 0 8px 20px rgba(124,58,237,.22); transition: filter .15s, transform .12s; }
.primary-btn:hover { filter: brightness(1.08); }
.primary-btn:active { transform: scale(.98); }
.primary-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.primary-btn.live { background: linear-gradient(135deg, #e11d48, #f97316); box-shadow: 0 8px 20px rgba(225,29,72,.25); }
.primary-btn.stop { background: linear-gradient(135deg, #be123c, #7c3aed); }
.primary-btn.done { background: linear-gradient(135deg, #16a34a, #22c55e); box-shadow: 0 8px 20px rgba(34,197,94,.2); }
.secondary-btn { position: relative; overflow: hidden; border: 1px solid var(--line); background: rgba(255,255,255,.035); color: #ddddea; border-radius: 11px; padding: 10px 12px; cursor: pointer; font-size: 12px; font-weight: 600; transition: background .15s, transform .12s; }
.secondary-btn:hover { background: rgba(255,255,255,.07); }
.secondary-btn:active { transform: scale(.98); }
.secondary-btn:disabled { opacity: .45; cursor: not-allowed; }
.stream-note { margin-top: 9px; color: #c1b6e8; font-size: 11px; line-height: 1.45; }
.stream-note.error { color: #ffb3c2; }

.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.35); animation: ripple .55s ease-out; pointer-events: none; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

.progress-wrap { margin-top: 10px; }
.progress-bar { height: 6px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.07); }
.progress-fill { width: 0%; height: 100%; background: linear-gradient(90deg, var(--purple), var(--purple-2)); transition: width .2s linear; }
.progress-fill.indeterminate { width: 35% !important; animation: slide 1.2s ease-in-out infinite; }
.progress-fill.live { background: linear-gradient(90deg, #e11d48, #f97316); }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
.progress-text { margin-top: 6px; font-size: 11px; color: #b7aee2; }

/* modos */
.mode-box { margin-top: 11px; padding: 10px; border-radius: 12px; border: 1px solid rgba(155,92,255,.16); background: rgba(124,58,237,.07); }
.mode-label { margin-bottom: 8px; color: #afa6d7; font-size: 10px; font-weight: 800; letter-spacing: .75px; text-transform: uppercase; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.mode-btn { min-width: 0; padding: 9px 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.035); color: #d8d8e7; cursor: pointer; text-align: left; transition: .16s ease; }
.mode-btn:hover { background: rgba(124,58,237,.13); border-color: rgba(155,92,255,.26); }
.mode-btn.active { border-color: rgba(155,92,255,.55); background: linear-gradient(135deg, rgba(124,58,237,.24), rgba(155,92,255,.12)); box-shadow: inset 0 0 0 1px rgba(155,92,255,.08); }
.mode-btn strong { display: block; color: #f6f3ff; font-size: 11.5px; letter-spacing: .15px; }
.mode-btn span { display: block; margin-top: 3px; color: #9f9fb6; font-size: 10px; line-height: 1.3; }
.mode-btn.active span { color: #c9bdf1; }
.mode-help { margin-top: 8px; color: #85869d; font-size: 10.2px; line-height: 1.4; }
.mode-box.locked { background: rgba(255,255,255,.025); border-color: rgba(255,255,255,.07); }
.mode-standard { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.03); opacity: .8; }
.mode-standard strong { color: #d7d3e7; font-size: 11.5px; }
.mode-standard span { color: #88899f; font-size: 10px; text-align: right; line-height: 1.25; }

/* vazio */
.empty-state { padding: 34px 30px 40px; text-align: center; color: var(--muted); }
.empty-visual { margin: 0 auto 14px; width: 74px; height: 74px; display: grid; place-items: center; border-radius: 22px; background: rgba(124,58,237,.11); border: 1px solid rgba(155,92,255,.18); animation: float 3.2s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-5px); } }
.empty-visual svg { width: 44px; fill: none; stroke: #9b7bea; stroke-width: 3; stroke-linejoin: round; }
.empty-visual svg path:last-child { fill: #9b7bea; stroke: none; }
.empty-state h2 { margin: 0 0 7px; color: #eceaff; font-size: 16px; }
.empty-state p { margin: 0 auto; max-width: 360px; font-size: 12.5px; line-height: 1.55; }

.footer { min-height: 46px; padding: 0 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: #777990; font-size: 11px; background: rgba(15,16,32,.94); }
.link-btn { border: 0; background: transparent; color: #aa8cf3; font-size: 11px; cursor: pointer; padding: 6px; }
.credits { position: relative; z-index: 1; margin: 14px auto 0; text-align: center; font-size: 10.5px; color: #5d5f78; }
.credits a { color: #6f7192; text-decoration: none; }
.credits a:hover { color: #aa8cf3; }

.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 50; transform: translate(-50%, 14px); opacity: 0; pointer-events: none; min-width: 200px; max-width: min(380px, calc(100vw - 32px)); text-align: center; padding: 10px 14px; border-radius: 12px; background: #2b2d47; color: white; font-size: 12.5px; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 12px 30px rgba(0,0,0,.35); transition: .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* configurações */
.sheet { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(6,6,16,.66); backdrop-filter: blur(4px); animation: fade .2s ease; }
.sheet-panel { position: relative; width: 100%; max-width: 520px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 20px; border-radius: 24px; background: radial-gradient(circle at 90% -10%, rgba(124,58,237,.25), transparent 40%), #121327; border: 1px solid rgba(155,92,255,.2); box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: pop .24s cubic-bezier(.2,.8,.2,1); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sheet-head img { border-radius: 14px; }
.sheet-head div { flex: 1; min-width: 0; }
.sheet-head h2 { margin: 0; font-size: 17px; }
.sheet-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.card { margin-bottom: 11px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.card h3 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .9px; color: #b6a7e9; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; cursor: pointer; }
.setting-row + .setting-row { border-top: 1px solid var(--line); }
.setting-row strong { display: block; font-size: 13px; }
.setting-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.switch { appearance: none; -webkit-appearance: none; flex: 0 0 42px; width: 42px; height: 24px; border-radius: 99px; background: rgba(255,255,255,.12); position: relative; cursor: pointer; transition: background .18s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .18s; }
.switch:checked { background: linear-gradient(135deg, var(--purple), var(--purple-2)); }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--purple-2); outline-offset: 2px; }
.helper-text { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.companion-status { margin-top: 10px; padding: 9px 11px; border-radius: 10px; font-size: 12px; background: rgba(255,255,255,.04); color: var(--muted); }
.companion-status.ok { background: rgba(86,211,155,.1); color: var(--success); }
.companion-status.bad { background: rgba(255,107,138,.1); color: var(--danger); }
.privacy-card { padding: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(255,138,61,.05)); border: 1px solid rgba(155,92,255,.18); }
.privacy-card strong { font-size: 13px; }
.privacy-card p { margin: 5px 0 0; color: #c3bfe0; font-size: 12px; line-height: 1.5; }

@media (max-width: 520px) {
  body { padding-left: 10px; padding-right: 10px; padding-top: max(10px, env(safe-area-inset-top)); }
  .app-shell { border-radius: 22px; }
  .topbar { padding: 16px 16px 10px; }
  .link-card, .status-card { margin-left: 14px; margin-right: 14px; }
  .media-list { padding: 0 14px 8px; }
  .link-row { flex-direction: column; }
  .search-btn { width: 100%; }
  .media-preview { width: 86px; height: 56px; flex-basis: 86px; }
  .footer { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Shinji design · Signal Dock: technical media tooling, not neon dashboard. */
:root{--bg:#0B141A;--panel:#14242C;--panel-2:#1B313C;--line:rgba(151,203,214,.18);--text:#F2F8F8;--muted:#A2BDC6;--purple:#33C6B5;--purple-2:#8FE8D1;--purple-soft:rgba(51,198,181,.12);--orange:#FFB46D;--success:#77E0AF;--danger:#FF8B97;--radius:14px}
body{background:#0B141A}
.glow{background:linear-gradient(150deg,rgba(51,198,181,.055),transparent 60%)}
.app-shell{border:1px solid #2B4852;border-radius:18px;background:#102029;box-shadow:0 22px 66px rgba(0,0,0,.25)}
.brand-name{letter-spacing:-.045em;font-weight:800}
.brand-icon{border-radius:10px;box-shadow:0 7px 18px rgba(51,198,181,.12)}
.link-card,.status-card{background:#162C35;border:1px solid #2F5360;border-radius:14px}
.media-card,.mode-box,.privacy-card{border-color:#2F4A55;border-radius:12px}
.status-label,.mode-label{letter-spacing:.13em}
.status-row strong{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}
.primary-btn,.search-btn{box-shadow:0 8px 24px rgba(20,121,112,.16)}
:where(button,a,input,select,summary):focus-visible{outline:3px solid #8FE8D1;outline-offset:3px}
@media(max-width:520px){.app-shell{border-radius:14px}}
