/* ============================================================
   Component CSS — Special (TabBar, AudioPlayer, Keyboard)
   ============================================================ */

/* ============ LiquidTabBar ============ */
.lq-tabbar {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  isolation: isolate;
  position: relative;
}
.lq-tabbar.is-floating {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border-strong);
  backdrop-filter: blur(calc(var(--glass-blur) * 1.4)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 1.4)) saturate(var(--glass-saturate));
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 var(--glass-shadow-inner),
    0 8px 24px rgba(0,0,0,0.28),
    0 16px 40px rgba(0,0,0,0.22);
}

.lq-tabbar__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-2);
  transition: color 0.18s var(--ease-out), background 0.22s var(--ease-out);
  position: relative;
  cursor: pointer;
}
.lq-tabbar__item.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.lq-tabbar__iconwrap {
  position: relative;
  display: inline-flex;
}
.lq-tabbar__icon { display: inline-flex; }
.lq-tabbar__icon svg { width: 22px; height: 22px; }
.lq-tabbar__label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.lq-tabbar__badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-page);
}

/* ============ LiquidAudioPlayer ============ */
.lq-player {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 12px;
  border-radius: 22px;
  width: 100%;
  max-width: 360px;
  isolation: isolate;
  position: relative;
  color: var(--text-1);
}
.lq-player.is-compact {
  max-width: 280px;
  padding: 8px 10px 8px 8px;
  gap: 10px;
}

.lq-player__cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 4px 14px rgba(0,0,0,0.32);
  position: relative;
}
.lq-player.is-compact .lq-player__cover { width: 40px; height: 40px; border-radius: 9px; }

.lq-player__cover-glyph {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(0,0,0,0.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.lq-player__main { flex: 1; min-width: 0; }
.lq-player__title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lq-player__artist {
  font-size: 12.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.lq-player__progress { margin-top: 8px; }
.lq-player__bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  position: relative;
  cursor: pointer;
}
.lq-player__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, white, rgba(255,255,255,0.7));
  box-shadow: 0 0 6px rgba(255,255,255,0.3);
  transition: width 0.4s linear;
}
.lq-player__times {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-3);
  margin-top: 4px;
}

.lq-player__controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lq-player__btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  background: transparent;
  cursor: pointer;
  transition: background 0.12s;
}
.lq-player__btn:hover { background: var(--glass-bg-soft); }
.lq-player__play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  cursor: pointer;
}
.lq-player.is-compact .lq-player__play { width: 36px; height: 36px; }
.lq-player__play:hover { background: var(--glass-bg-strong); }

/* ============ LiquidKeyboard ============ */
.lq-kb {
  padding: 6px 4px 10px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 380px;
  isolation: isolate;
  user-select: none;
}
.lq-kb__row {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.lq-kb__row--mid { padding: 0 18px; }

.lq-kb__key {
  flex: 1;
  min-width: 0;
  height: 36px;
  border-radius: 5px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.18);
  border: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 1px 0 rgba(0,0,0,0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.08s, transform 0.08s;
}
:root[data-theme="light"] .lq-kb__key {
  background: rgba(255,255,255,0.92);
  color: #111;
  box-shadow: 0 1px 0 rgba(0,0,0,0.18);
}
.lq-kb__key:active {
  background: rgba(255,255,255,0.32);
  transform: scale(0.94);
}

.lq-kb__shift,
.lq-kb__back {
  flex: 1.3;
  background: rgba(255,255,255,0.1);
}
.lq-kb__shift.is-active {
  background: white;
  color: #111;
}
.lq-kb__sym,
.lq-kb__return {
  flex: 1.6;
  font-size: 13.5px;
  background: rgba(255,255,255,0.1);
}
.lq-kb__return { color: white; background: rgba(255,255,255,0.18); }
.lq-kb__emoji {
  flex: 0.7;
  background: rgba(255,255,255,0.1);
}
.lq-kb__space {
  flex: 4.8;
  font-size: 13.5px;
  color: var(--text-3);
  background: rgba(255,255,255,0.16);
}
