/* SoundDrop for Windows and Linux. "Liquid Glass" is Apple's; here it is copied closely: translucent blurred panels, a bright edge,
   a soft highlight on top, and the theme's colours behind everything. */
:root {
  color-scheme: light dark;
  --ink: #15171f; --dim: rgba(21, 23, 31, .62); --faint: rgba(21, 23, 31, .38);
  --glass: rgba(255, 255, 255, .34); --glass-strong: rgba(255, 255, 255, .5); --edge: rgba(255, 255, 255, .62); --shadow: rgba(30, 30, 60, .16);
  --field: rgba(255, 255, 255, .45); --hover: rgba(255, 255, 255, .28);
  --radius: 22px; --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Noto Sans", "Cantarell", sans-serif;
}
:root[data-mode="dark"] {
  --ink: #f2f4fa; --dim: rgba(242, 244, 250, .66); --faint: rgba(242, 244, 250, .4);
  --glass: rgba(255, 255, 255, .09); --glass-strong: rgba(255, 255, 255, .15); --edge: rgba(255, 255, 255, .2); --shadow: rgba(0, 0, 0, .4);
  --field: rgba(255, 255, 255, .1); --hover: rgba(255, 255, 255, .12);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: #12141c; overflow: hidden; -webkit-font-smoothing: antialiased; user-select: none; }
input, textarea { user-select: text; }
#backdrop { position: fixed; inset: 0; z-index: 0; transition: background .5s; }
#app { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

.glass {
  background: var(--glass); backdrop-filter: blur(30px) saturate(1.7); -webkit-backdrop-filter: blur(30px) saturate(1.7);
  border: 1px solid var(--edge); border-radius: var(--radius);
  box-shadow: 0 10px 34px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(255, 255, 255, .08);
}
.glass.pill { border-radius: 999px; }

/* Buttons: glass; "prominent" is filled with the theme's gradient. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 6px 16px; border-radius: 999px; cursor: pointer; font-weight: 600;
  background: var(--glass-strong); border: 1px solid var(--edge); backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: 0 3px 12px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .12s, background .15s, box-shadow .15s;
}
.btn:hover { background: var(--hover); transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.prominent { background: var(--gradient); color: #fff; border-color: rgba(255, 255, 255, .45); text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.btn.prominent:hover { filter: brightness(1.08); }
.btn.round { width: 36px; height: 36px; padding: 0; }
.btn.small { min-height: 28px; padding: 3px 12px; font-size: 12.5px; }
.btn:focus-visible, .tab:focus-visible, .tile:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }

/* The top bar */
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 12px 18px; -webkit-app-region: drag; }
.topbar .side { display: flex; align-items: center; gap: 10px; } .topbar .side.end { justify-content: flex-end; }
.topbar > * { -webkit-app-region: no-drag; }
.topbar .spacer { flex: 1; }
.tabs { display: flex; gap: 2px; padding: 4px; }
.tab { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font-weight: 600; color: var(--dim); cursor: pointer; display: flex; align-items: center; gap: 7px; transition: background .15s, color .15s; }
.tab:hover { color: var(--ink); }
.tab.on { background: var(--glass-strong); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 2px 8px var(--shadow); }
.tab.on svg { color: var(--tint); }
@media (max-width: 1060px) { .tab span { display: none; } .tab.on span { display: inline; } }

#view { flex: 1; min-height: 0; overflow: auto; padding: 4px 28px 32px; }
.page { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.page h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.sub { color: var(--dim); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; }
.card { padding: 18px 20px; }
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; }

/* Fields */
.field { background: var(--field); border: 1px solid var(--edge); border-radius: 999px; padding: 10px 16px; color: var(--ink); font: inherit; outline: none; min-width: 0; }
.field:focus { border-color: var(--tint); box-shadow: 0 0 0 3px rgb(var(--tint-rgb) / .25); }
textarea.field { border-radius: 18px; resize: none; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 18px; }
.search input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 16px; padding: 13px 0; min-width: 0; }
.search svg { color: var(--dim); flex: none; }

/* Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { cursor: pointer; border: 1px solid var(--edge); background: var(--glass-strong); padding: 5px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.chip.on { background: var(--gradient); color: #fff; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--glass-strong); color: var(--dim); }
.badge.good { color: #16a05d; } .badge.warn { color: #d9822b; }

/* Square tiles, used for sounds everywhere */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.tile { aspect-ratio: 1; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; cursor: pointer; border-radius: 20px; position: relative; transition: transform .15s; }
.tile:hover { transform: translateY(-2px); }
.tile.selected { background: var(--gradient); color: #fff; border-color: rgba(255, 255, 255, .6); }
.tile .name { font-weight: 600; font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.tile .meta { font-size: 11px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.topic { height: 112px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; text-align: start; cursor: pointer; color: #fff; border: 0; position: relative; overflow: hidden; }
.topic .big { position: absolute; inset-inline-end: -8px; bottom: -14px; opacity: .22; transform: rotate(-12deg); }
.topic b { font-size: 17px; }
/* On light themes the cards are pale glass, so their words and icons are dark; on dark themes they stay white. */
:root[data-mode="light"] .topic { color: var(--ink); }
:root[data-mode="light"] .topic .big { opacity: .3; }

#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 50; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; font-weight: 600; }
.toast.error { color: #d9822b; }

.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .big { color: var(--tint); opacity: .9; }
.drop { outline: 3px dashed var(--tint); outline-offset: -10px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--faint); border-top-color: var(--tint); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01s !important; } }
::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

.web-banner { display: flex; align-items: center; gap: 10px; margin: 0 auto 8px; padding: 6px 8px 6px 16px; font-size: 13px; font-weight: 600; max-width: min(900px, calc(100vw - 24px)); }
.web-banner svg { color: var(--tint); flex: none; } .web-banner .btn { flex: none; text-decoration: none; }
