/* 底部工具栏 - 使用高优先级选择器确保样式一致性 */
html body .bottom-toolbar {
  position: fixed !important;
  bottom: 1rem !important;
  left: 0 !important;
  right: 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 9999 !important;
  pointer-events: auto !important;
  margin: 0 !important;
  padding: 0 1rem !important;
  border: none !important;
  outline: none !important;
  box-sizing: border-box !important;
}

/* 模式切换容器样式 */
html body .mode-switch-container {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 !important;
  border: none !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

/* 模式切换开关样式 */
html body .mode-switch {
  position: relative !important;
  width: 70px !important;
  height: 40px !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  border: 2px solid rgba(255,255,255,0.3) !important;
  flex-shrink: 0 !important;
}

html body .mode-switch.preparation {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

html body .mode-switch-slider {
  position: absolute !important;
  top: 3px !important;
  left: 3px !important;
  width: 30px !important;
  height: 30px !important;
  background: white !important;
  border-radius: 50% !important;
  transition: transform 0.3s ease !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

html body .mode-switch.preparation .mode-switch-slider {
  transform: translateX(26px) !important;
}

html body .mode-text {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: white !important;
}

html body .mode-text.teaching {
  right: 8px !important;
}

html body .mode-text.preparation {
  left: 8px !important;
}

html body .toolbar-right {
  display: none !important;
}

html body .toolbar-center {
  display: flex !important;
  justify-content: center !important;
  gap: 1rem !important;
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(10px) !important;
  border-radius: 5rem !important;
  padding: 0.5rem 1rem !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
  pointer-events: auto !important;
  width: fit-content !important;
  min-width: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  border: none !important;
  outline: none !important;
  box-sizing: border-box !important;
  flex-wrap: wrap !important;
}

html body .toolbar-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1)) !important;
  border: 1px solid rgba(30, 78, 216, 0.3) !important;
  border-radius: 50% !important;
  width: 3rem !important;
  height: 3rem !important;
  min-width: 3rem !important;
  min-height: 3rem !important;
  max-width: 3rem !important;
  max-height: 3rem !important;
  cursor: pointer !important;
  color: #1E4ED8 !important;
  z-index: 10000 !important;
  pointer-events: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  outline: none !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  font-size: 0 !important;
  line-height: normal !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  text-indent: 0 !important;
  text-shadow: 0 0 10px rgba(30, 78, 216, 0.3) !important;
  white-space: normal !important;
  vertical-align: middle !important;
  overflow: visible !important;
  box-shadow: 0 4px 15px rgba(30, 78, 216, 0.2), inset 0 1px 0 rgba(255,255,255,0.3) !important;
  transition: all 0.3s ease !important;
  position: relative !important;
}

html body .toolbar-btn::before {
  content: '' !important;
  position: absolute !important;
  top: -2px !important;
  left: -2px !important;
  right: -2px !important;
  bottom: -2px !important;
  background: linear-gradient(45deg, #1E4ED8, #3B82F6, #1E4ED8) !important;
  border-radius: 50% !important;
  z-index: -1 !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
}

html body .toolbar-btn:hover::before {
  opacity: 1 !important;
  animation: pulse 2s infinite !important;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(30, 78, 216, 0.7) !important;
  }
  70% {
    box-shadow: 0 0 0 10px rgba(30, 78, 216, 0) !important;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(30, 78, 216, 0) !important;
  }
}

/* 上课模式按钮样式 */
html body .toolbar-btn.teaching-btn {
  background: linear-gradient(135deg, #1a73e8 0%, #2196f3 100%) !important;
  border: 2px solid rgba(255,255,255,0.3) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4) !important;
  transition: all 0.3s ease !important;
}

html body .toolbar-btn.teaching-btn:hover {
  background: linear-gradient(135deg, #1557b0 0%, #1976d2 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(26, 115, 232, 0.6) !important;
}

/* 备课模式按钮 - 支持文字显示 */
html body .toolbar-btn.prep-btn {
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  padding: 8px 16px !important;
  flex-direction: row !important;
  gap: 6px !important;
  height: auto !important;
  min-height: 48px !important;
  background: linear-gradient(135deg, rgba(17, 153, 142, 0.2), rgba(56, 239, 125, 0.1)) !important;
  border: 2px solid rgba(17, 153, 142, 0.6) !important;
  color: #11998e !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4), inset 0 1px 0 rgba(255,255,255,0.3) !important;
  transition: all 0.3s ease !important;
  justify-content: center !important;
  align-items: center !important;
  position: relative !important;
  text-shadow: 0 0 10px rgba(17, 153, 142, 0.3) !important;
}

html body .toolbar-btn.prep-btn::before {
  content: '' !important;
  position: absolute !important;
  top: -2px !important;
  left: -2px !important;
  right: -2px !important;
  bottom: -2px !important;
  background: linear-gradient(45deg, #11998e, #38ef7d, #11998e) !important;
  border-radius: 12px !important;
  z-index: -1 !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
}

html body .toolbar-btn.prep-btn:hover {
  background: linear-gradient(135deg, rgba(17, 153, 142, 0.3), rgba(56, 239, 125, 0.2)) !important;
  border-color: rgba(17, 153, 142, 0.8) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4), inset 0 1px 0 rgba(255,255,255,0.4) !important;
}

html body .toolbar-btn.prep-btn:hover::before {
  opacity: 1 !important;
  animation: pulse 2s infinite !important;
}

html body .toolbar-btn.prep-btn.active {
  background: linear-gradient(135deg, rgba(17, 153, 142, 0.6), rgba(56, 239, 125, 0.4)) !important;
  border-color: #11998e !important;
  color: white !important;
  box-shadow: 0 0 20px rgba(17, 153, 142, 0.6), 0 4px 12px rgba(17, 153, 142, 0.4), inset 0 1px 0 rgba(255,255,255,0.3) !important;
  transform: translateY(-3px) !important;
  text-shadow: 0 0 10px rgba(255,255,255,0.5) !important;
}

html body .toolbar-btn.prep-btn.active::before {
  opacity: 1 !important;
  animation: pulse 2s infinite !important;
}

html body .toolbar-btn.prep-btn i {
  font-size: 16px !important;
  margin: 0 !important;
}

html body .toolbar-btn.prep-btn span {
  font-size: 14px !important;
  font-weight: 600 !important;
}

html body .toolbar-btn i {
  font-size: 1.125rem !important;
  margin-bottom: 0.25rem !important;
  margin-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  color: inherit !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

html body .toolbar-btn span {
  font-size: 0.7rem !important;
  font-weight: 500 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  color: inherit !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
}

html body .toolbar-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 20px rgba(30, 78, 216, 0.3), inset 0 1px 0 rgba(255,255,255,0.4) !important;
  background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.2)) !important;
}

/* 激活状态样式 - 优先级高于hover */
html body .toolbar-btn.active,
html body .toolbar-btn.teaching-btn.active {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.6), inset 0 1px 0 rgba(255,255,255,0.3) !important;
  border-color: #e74c3c !important;
  color: white !important;
  transform: translateY(-3px) !important;
  text-shadow: 0 0 10px rgba(255,255,255,0.5) !important;
}

html body .toolbar-btn.active::before {
  background: linear-gradient(45deg, #e74c3c, #ff6b6b, #e74c3c) !important;
  opacity: 1 !important;
  animation: pulse 2s infinite !important;
}

/* 全屏状态下的工具栏调整 */
html:fullscreen body .bottom-toolbar,
html:-webkit-full-screen body .bottom-toolbar,
html:-moz-full-screen body .bottom-toolbar {
  bottom: 1rem !important;
}

/* 移除响应式设计，保持固定样式 */
@media (max-width: 640px) {
  html body .toolbar-content {
    gap: 0.75rem !important;
    padding: 0.5rem !important;
  }

  html body .toolbar-btn {
    width: 3rem !important;
    height: 3rem !important;
    min-width: 3rem !important;
    min-height: 3rem !important;
    max-width: 3rem !important;
    max-height: 3rem !important;
  }

  html body .toolbar-btn i {
    font-size: 1.125rem !important;
  }

  html body .toolbar-btn span {
    font-size: 0.7rem !important;
  }
}

