din/static/style.css
ching 3eaecd18da 重构前端:极简极速交互设计
- 全屏点击即可记录,响应更快
- 长按直接进入输入模式
- 快速标签:工作/学习/运动/休息/创意/其他
- 底部常驻统计,无需切换页面
- 右侧面板显示最近记录
- 成就解锁动画提示
- 优化移动端触摸体验
2026-02-21 06:11:11 +00:00

448 lines
8.2 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
background: #0d0d0f;
color: #fff;
min-height: 100vh;
overflow-x: hidden;
}
/* 主按钮 - 占据屏幕中心 */
.din-trigger {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 10;
background: radial-gradient(ellipse at center, #1a1a2e 0%, #0d0d0f 70%);
}
.big-btn {
width: 200px;
height: 200px;
border-radius: 50%;
border: none;
background: linear-gradient(145deg, #ff4757, #ff3838);
box-shadow:
0 20px 60px rgba(255, 71, 87, 0.4),
0 0 0 20px rgba(255, 71, 87, 0.1),
inset 0 -4px 20px rgba(0,0,0,0.2),
inset 0 4px 20px rgba(255,255,255,0.2);
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
user-select: none;
-webkit-user-select: none;
}
.big-btn:active {
transform: scale(0.92);
box-shadow:
0 10px 30px rgba(255, 71, 87, 0.3),
0 0 0 10px rgba(255, 71, 87, 0.05),
inset 0 -2px 10px rgba(0,0,0,0.2);
}
.big-btn.recording {
animation: pulse-record 0.6s ease-out;
}
@keyframes pulse-record {
0% { transform: scale(1); box-shadow: 0 20px 60px rgba(255, 71, 87, 0.4), 0 0 0 20px rgba(255, 71, 87, 0.1); }
50% { transform: scale(1.05); box-shadow: 0 30px 80px rgba(255, 71, 87, 0.6), 0 0 0 40px rgba(255, 71, 87, 0); }
100% { transform: scale(1); box-shadow: 0 20px 60px rgba(255, 71, 87, 0.4), 0 0 0 20px rgba(255, 71, 87, 0.1); }
}
.btn-icon {
font-size: 4rem;
margin-bottom: 5px;
}
.btn-text {
font-size: 1.1rem;
font-weight: 700;
letter-spacing: 2px;
text-transform: uppercase;
}
.hint {
margin-top: 30px;
color: #666;
font-size: 0.85rem;
}
/* 底部统计 - 常驻显示 */
.stats-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
display: flex;
justify-content: space-around;
padding: 20px;
background: linear-gradient(transparent, rgba(13,13,15,0.95) 40%);
z-index: 20;
}
.stat-item {
text-align: center;
}
.stat-num {
font-size: 1.8rem;
font-weight: 700;
color: #fff;
line-height: 1;
}
.stat-num.total {
color: #ff4757;
}
.stat-label {
font-size: 0.7rem;
color: #666;
margin-top: 4px;
text-transform: uppercase;
letter-spacing: 1px;
}
/* 快速输入层 - 从底部滑出 */
.input-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.8);
backdrop-filter: blur(10px);
z-index: 100;
display: flex;
flex-direction: column;
justify-content: flex-end;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
.input-overlay.active {
opacity: 1;
visibility: visible;
}
.input-panel {
background: #1a1a1f;
border-radius: 24px 24px 0 0;
padding: 24px;
transform: translateY(100%);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.input-overlay.active .input-panel {
transform: translateY(0);
}
.input-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.input-title {
font-size: 1.1rem;
font-weight: 600;
}
.timestamp {
font-size: 0.8rem;
color: #666;
font-family: 'SF Mono', monospace;
}
.quick-input {
width: 100%;
background: #0d0d0f;
border: 2px solid #333;
border-radius: 16px;
padding: 18px 20px;
font-size: 1.1rem;
color: #fff;
outline: none;
transition: border-color 0.2s;
margin-bottom: 16px;
}
.quick-input:focus {
border-color: #ff4757;
}
.quick-input::placeholder {
color: #555;
}
/* 快速标签 */
.quick-tags {
display: flex;
gap: 10px;
flex-wrap: wrap;
margin-bottom: 20px;
}
.tag {
padding: 8px 16px;
background: #25252a;
border: 1px solid #333;
border-radius: 20px;
font-size: 0.9rem;
color: #aaa;
cursor: pointer;
transition: all 0.2s;
}
.tag:hover, .tag:active {
background: #ff4757;
border-color: #ff4757;
color: #fff;
}
/* 操作按钮 */
.input-actions {
display: flex;
gap: 12px;
}
.btn {
flex: 1;
padding: 16px;
border-radius: 14px;
border: none;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
}
.btn-save {
background: #ff4757;
color: #fff;
}
.btn-save:active {
background: #ff3838;
transform: scale(0.98);
}
.btn-skip {
background: #25252a;
color: #888;
}
.btn-skip:active {
background: #333;
}
/* 最近记录 - 右侧面板 (桌面) / 底部 (手机) */
.recent-panel {
position: fixed;
top: 20px;
right: 20px;
width: 280px;
max-height: calc(100vh - 140px);
background: rgba(26,26,31,0.8);
backdrop-filter: blur(20px);
border-radius: 20px;
padding: 20px;
overflow-y: auto;
z-index: 15;
}
.recent-title {
font-size: 0.9rem;
color: #888;
margin-bottom: 16px;
display: flex;
justify-content: space-between;
align-items: center;
}
.recent-count {
color: #ff4757;
font-weight: 600;
}
.recent-list {
display: flex;
flex-direction: column;
gap: 10px;
}
.recent-item {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 12px;
background: rgba(255,255,255,0.03);
border-radius: 12px;
transition: background 0.2s;
}
.recent-item:hover {
background: rgba(255,255,255,0.06);
}
.recent-time {
font-size: 0.75rem;
color: #555;
white-space: nowrap;
font-family: 'SF Mono', monospace;
}
.recent-content {
flex: 1;
font-size: 0.9rem;
color: #ddd;
word-break: break-all;
}
.recent-content.empty {
color: #555;
font-style: italic;
}
/* Toast */
.toast {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0.8);
background: #ff4757;
color: #fff;
padding: 16px 32px;
border-radius: 30px;
font-weight: 600;
z-index: 200;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
.toast.show {
opacity: 1;
visibility: visible;
transform: translate(-50%, -50%) scale(1);
}
/* 成就徽章 */
.achievement-toast {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%) translateY(-100px);
background: linear-gradient(135deg, #ffd700, #ffaa00);
color: #000;
padding: 16px 24px;
border-radius: 16px;
display: flex;
align-items: center;
gap: 12px;
font-weight: 600;
z-index: 200;
transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.achievement-toast.show {
transform: translateX(-50%) translateY(0);
}
.achievement-icon {
font-size: 1.8rem;
}
/* 移动端适配 */
@media (max-width: 768px) {
.big-btn {
width: 160px;
height: 160px;
}
.btn-icon {
font-size: 3rem;
}
.recent-panel {
position: fixed;
top: auto;
bottom: 100px;
left: 20px;
right: 20px;
width: auto;
max-height: 200px;
background: rgba(13,13,15,0.95);
}
.stats-bar {
padding-bottom: 30px;
}
}
/* 隐藏的成就面板 - 可展开 */
.achievements-btn {
position: fixed;
top: 20px;
left: 20px;
width: 48px;
height: 48px;
border-radius: 50%;
background: rgba(255,255,255,0.1);
border: none;
color: #fff;
font-size: 1.5rem;
cursor: pointer;
z-index: 30;
transition: all 0.2s;
}
.achievements-btn:hover {
background: rgba(255,255,255,0.15);
}
/* 滑动指示器 */
.swipe-indicator {
position: fixed;
bottom: 100px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 8px;
z-index: 25;
}
.swipe-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: rgba(255,255,255,0.2);
transition: all 0.3s;
}
.swipe-dot.active {
background: #ff4757;
width: 24px;
border-radius: 4px;
}