moodist/src/components/sounds/sound/sound.module.css
zl b973c7bf61 feat: 实现完整的昼夜主题系统和优化随机音频功能
## 主要功能更新

### 🎨 优化昼夜模式主题系统
- 参考现代设计标准(GitHub、VSCode)重新设计颜色方案
- 明亮主题:纯白背景 + 深灰文字,提供高对比度阅读体验
- 暗色主题:深蓝灰背景 + 高亮白色,护眼且现代
- 全面适配:所有组件背景色、边框色、前景色都跟随主题切换

### 🎲 改进随机音频功能
- 智能单参数随机:每次只随机调整一个参数(速度/音调/音量)
- 合理变化频率:调整为60-90秒,避免频繁变化影响体验
- 精确范围控制:
  - 速度和音调:默认值 ±0.25 范围内随机
  - 音量:30%-70% 范围内随机

### 📚 完善文档系统
- 创建英文版 README (README.en.md)
- 完善中文版 README,包含:
  - 详细的使用说明和操作指南
  - 完整的 Docker 部署教程
  - 生产环境配置指南
  - 在线体验地址:https://calm.zlext.com

### 🔧 技术改进
- 新增完整的主题切换组件 (ThemeToggle)
- 优化随机音频控制组件 (RandomSpeed)
- 改进声音控制组件的样式和交互
- 更新所有组件样式以支持主题变量

## 版本信息
- 版本升级:v2.1.0 → v2.2.0
- 新增功能:昼夜主题、智能随机、完整文档
- 向后兼容:完全兼容现有配置和数据
2025-11-17 11:03:14 +08:00

133 lines
2.4 KiB
CSS

.sound {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 25px 20px;
text-align: center;
cursor: pointer;
background: linear-gradient(var(--component-bg) / 50%, transparent);
border: 1px solid var(--color-border);
border-radius: 12px;
transition: 0.2s;
&:focus-visible {
outline: 2px solid var(--color-muted);
outline-offset: 2px;
}
&.hidden {
display: none;
}
&:not(.selected)::before {
position: absolute;
top: -1px;
left: 0;
width: 100%;
height: 1px;
content: '';
background: linear-gradient(
90deg,
transparent,
var(--color-muted),
transparent
);
}
& .icon {
position: relative;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
font-size: var(--font-base);
color: var(--color-foreground-subtler);
transition: 0.2s;
& span {
line-height: 0;
}
&::after {
position: absolute;
top: 0;
left: 0;
z-index: -1;
width: 100%;
height: 100%;
content: '';
background-color: var(--bg-tertiary);
border-radius: 50%;
}
&::before {
position: absolute;
top: -1px;
left: -1px;
z-index: -2;
width: calc(100% + 2px);
height: calc(100% + 2px);
content: '';
background: linear-gradient(
var(--bg-quaternary),
var(--bg-secondary)
);
border-radius: 50%;
}
& .spinner {
line-height: 0;
animation-name: spinner;
animation-duration: 1s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
}
&:hover .icon,
&:focus-visible .icon {
color: var(--color-foreground-subtle);
}
&.selected {
border-color: transparent;
box-shadow: 0 0 0 2px var(--color-border);
& .icon {
color: var(--color-foreground);
}
}
& .label {
margin-top: 8px;
font-family: var(--font-heading);
font-size: var(--font-sm);
font-weight: 600;
line-height: 1.6;
}
}
.controlsContainer {
position: absolute;
top: 8px;
right: 8px;
display: flex;
flex-direction: column;
gap: 8px;
z-index: 10;
align-items: flex-end;
}
@keyframes spinner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}