.content-auto {
  content-visibility: auto;
}

.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.transition-all-300 {
  transition: all 300ms ease-in-out;
}

.lw-nav {
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

.lw-logo {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
}

.lw-brand-title {
  color: #3b82f6;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.75rem;
}

.btn-primary,
.btn-secondary,
.btn-outline {
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  transition: all 300ms ease-in-out;
  outline: none;
}

.btn-primary {
  background: #3b82f6;
  color: #fff;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #fff;
  border: 1px solid #3b82f6;
  color: #3b82f6;
}

.btn-secondary:hover {
  background: #f3f4f6;
}

.btn-outline {
  background: transparent;
  border: 1px solid #3b82f6;
  color: #3b82f6;
}

.btn-outline:hover {
  background: #3b82f6;
  color: #fff;
}

.input-primary {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  transition: all 300ms ease-in-out;
}

.input-primary:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
  outline: none;
}

.audio-wave {
  animation: wave 1.5s infinite ease-in-out;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  border-radius: 2px;
  height: 4px;
}

@keyframes wave {
  0%,
  100% {
    opacity: 0.7;
    transform: scaleX(0.8);
  }

  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

.progress-bar {
  background: #e5e7eb;
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  border-radius: 4px;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  transition: width 0.3s ease;
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.1), 0 10px 10px -5px rgba(59, 130, 246, 0.04);
  transform: translateY(-5px);
}

/* ===== 通用开关（练习页「设置」下拉与设置页共用） ===== */
.lw-switch {
  position: relative;
  display: inline-block;
  flex: none;
  width: 2.25rem;
  height: 1.25rem;
}

.lw-switch input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.lw-switch .track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background-color: #d1d5db;
  transition: background-color 300ms ease-in-out;
}

.lw-switch .thumb {
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 300ms ease-in-out;
}

.lw-switch input:checked + .track {
  background-color: #3b82f6;
}

.lw-switch input:checked ~ .thumb {
  transform: translateX(1rem);
}

.lw-switch input:disabled + .track {
  background-color: #e5e7eb;
}

.lw-switch input:focus-visible + .track {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.dark .lw-switch .track {
  background-color: #4b5563;
}

.dark .lw-switch input:disabled + .track {
  background-color: #374151;
}

.dark .lw-switch .thumb {
  background-color: #f9fafb;
}

/* ===== 通用音量滑块 ===== */
.lw-range {
  width: 100%;
  accent-color: #3b82f6;
  cursor: pointer;
}

.lw-range:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ===== 全局登录态守卫（js/utils/authGuard.js） ===== */
/* 角色判定期间隐藏页面，避免无权内容闪现；由 authGuard 切换 lw-auth-pending */
html.lw-auth-pending body {
  visibility: hidden;
}

/* 无权限模块（data-requires + data-requires-mode="disable"） */
.lw-module-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.35);
}

.lw-module-disabled * {
  pointer-events: none;
}
