-
✓
-
记录成功!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
已记录!
+
+
+
+ 🏆
+ 解锁成就
diff --git a/static/style.css b/static/style.css
index b8e53e0..9efb778 100644
--- a/static/style.css
+++ b/static/style.css
@@ -2,370 +2,446 @@
margin: 0;
padding: 0;
box-sizing: border-box;
+ -webkit-tap-highlight-color: transparent;
}
body {
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
- background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
+ font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
+ background: #0d0d0f;
color: #fff;
min-height: 100vh;
- padding: 20px;
+ overflow-x: hidden;
}
-.container {
- max-width: 600px;
- margin: 0 auto;
-}
-
-/* 头部 */
-header {
- text-align: center;
- margin-bottom: 30px;
-}
-
-header h1 {
- font-size: 2.5rem;
- margin-bottom: 5px;
-}
-
-.subtitle {
- color: #888;
- font-size: 0.9rem;
-}
-
-/* 统计面板 */
-.stats {
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: 10px;
- margin-bottom: 30px;
-}
-
-.stat-card {
- background: rgba(255,255,255,0.05);
- border-radius: 12px;
- padding: 15px 10px;
- text-align: center;
- border: 1px solid rgba(255,255,255,0.1);
-}
-
-.stat-card.total {
- background: rgba(255,107,107,0.15);
- border-color: rgba(255,107,107,0.3);
-}
-
-.stat-value {
- font-size: 1.8rem;
- font-weight: bold;
- margin-bottom: 5px;
-}
-
-.stat-card.total .stat-value {
- color: #ff6b6b;
-}
-
-.stat-label {
- font-size: 0.75rem;
- color: #888;
- margin-bottom: 3px;
-}
-
-.stat-growth {
- font-size: 0.7rem;
- color: #4ade80;
-}
-
-.stat-growth.negative {
- color: #f87171;
-}
-
-/* 大按钮 */
-.main-action {
+/* 主按钮 - 占据屏幕中心 */
+.din-trigger {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
display: flex;
+ flex-direction: column;
+ align-items: center;
justify-content: center;
- margin-bottom: 20px;
+ z-index: 10;
+ background: radial-gradient(ellipse at center, #1a1a2e 0%, #0d0d0f 70%);
}
-.din-button {
- width: 180px;
- height: 180px;
+.big-btn {
+ width: 200px;
+ height: 200px;
border-radius: 50%;
border: none;
- background: linear-gradient(145deg, #ff6b6b, #ee5a5a);
- box-shadow: 0 10px 40px rgba(255,107,107,0.4),
- inset 0 -5px 20px rgba(0,0,0,0.2),
- inset 0 5px 20px rgba(255,255,255,0.2);
+ 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;
- gap: 10px;
- transition: all 0.2s ease;
- position: relative;
- overflow: hidden;
+ transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
+ user-select: none;
+ -webkit-user-select: none;
}
-.din-button:hover {
- transform: scale(1.05);
- box-shadow: 0 15px 50px rgba(255,107,107,0.5),
- inset 0 -5px 20px rgba(0,0,0,0.2),
- inset 0 5px 20px rgba(255,255,255,0.2);
+.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);
}
-.din-button:active {
- transform: scale(0.95);
- box-shadow: 0 5px 20px rgba(255,107,107,0.3),
- inset 0 -3px 10px rgba(0,0,0,0.2),
- inset 0 3px 10px rgba(255,255,255,0.2);
+.big-btn.recording {
+ animation: pulse-record 0.6s ease-out;
}
-.din-button.recording {
- animation: pulse 1s infinite;
+@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); }
}
-@keyframes pulse {
- 0%, 100% { box-shadow: 0 10px 40px rgba(255,107,107,0.4); }
- 50% { box-shadow: 0 10px 60px rgba(255,107,107,0.7); }
+.btn-icon {
+ font-size: 4rem;
+ margin-bottom: 5px;
}
.btn-text {
- font-size: 3rem;
+ 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;
}
-.btn-label {
- font-size: 1rem;
- font-weight: 600;
- color: #fff;
+.stat-num.total {
+ color: #ff4757;
+}
+
+.stat-label {
+ font-size: 0.7rem;
+ color: #666;
+ margin-top: 4px;
text-transform: uppercase;
letter-spacing: 1px;
}
-/* 输入区域 */
-.input-section {
- background: rgba(255,255,255,0.05);
- border-radius: 12px;
- padding: 20px;
- margin-bottom: 30px;
- border: 1px solid rgba(255,255,255,0.1);
+/* 快速输入层 - 从底部滑出 */
+.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-section.hidden {
- display: none;
+.input-overlay.active {
+ opacity: 1;
+ visibility: visible;
}
-#din-content {
+.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%;
- padding: 15px;
- font-size: 1rem;
- border: 2px solid rgba(255,255,255,0.1);
- border-radius: 8px;
- background: rgba(0,0,0,0.2);
+ background: #0d0d0f;
+ border: 2px solid #333;
+ border-radius: 16px;
+ padding: 18px 20px;
+ font-size: 1.1rem;
color: #fff;
- margin-bottom: 15px;
outline: none;
transition: border-color 0.2s;
+ margin-bottom: 16px;
}
-#din-content:focus {
- border-color: #ff6b6b;
+.quick-input:focus {
+ border-color: #ff4757;
}
-#din-content::placeholder {
- color: #666;
+.quick-input::placeholder {
+ color: #555;
}
-.input-actions {
+/* 快速标签 */
+.quick-tags {
display: flex;
gap: 10px;
+ flex-wrap: wrap;
+ margin-bottom: 20px;
}
-.btn-primary, .btn-secondary {
- flex: 1;
- padding: 12px 20px;
- border-radius: 8px;
- border: none;
- font-size: 1rem;
+.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;
}
-.btn-primary {
- background: #ff6b6b;
+.tag:hover, .tag:active {
+ background: #ff4757;
+ border-color: #ff4757;
color: #fff;
}
-.btn-primary:hover {
- background: #ff5252;
+/* 操作按钮 */
+.input-actions {
+ display: flex;
+ gap: 12px;
}
-.btn-secondary {
- background: rgba(255,255,255,0.1);
- color: #aaa;
+.btn {
+ flex: 1;
+ padding: 16px;
+ border-radius: 14px;
+ border: none;
+ font-size: 1rem;
+ font-weight: 600;
+ cursor: pointer;
+ transition: all 0.2s;
}
-.btn-secondary:hover {
- background: rgba(255,255,255,0.15);
+.btn-save {
+ background: #ff4757;
color: #fff;
}
-/* 最近记录 */
-.recent {
- margin-bottom: 30px;
+.btn-save:active {
+ background: #ff3838;
+ transform: scale(0.98);
}
-.recent h2, .achievements h2 {
- font-size: 1.1rem;
- margin-bottom: 15px;
- color: #aaa;
+.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 {
- background: rgba(255,255,255,0.03);
- border-radius: 12px;
- overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
}
.recent-item {
display: flex;
- align-items: center;
- padding: 15px;
- border-bottom: 1px solid rgba(255,255,255,0.05);
- gap: 15px;
+ align-items: flex-start;
+ gap: 12px;
+ padding: 12px;
+ background: rgba(255,255,255,0.03);
+ border-radius: 12px;
+ transition: background 0.2s;
}
-.recent-item:last-child {
- border-bottom: none;
+.recent-item:hover {
+ background: rgba(255,255,255,0.06);
}
.recent-time {
font-size: 0.75rem;
- color: #666;
+ color: #555;
white-space: nowrap;
- min-width: 60px;
+ font-family: 'SF Mono', monospace;
}
.recent-content {
flex: 1;
+ font-size: 0.9rem;
color: #ddd;
word-break: break-all;
}
.recent-content.empty {
- color: #666;
+ color: #555;
font-style: italic;
}
-.recent-actions {
- display: flex;
- gap: 5px;
-}
-
-.recent-actions button {
- background: none;
- border: none;
- color: #666;
- cursor: pointer;
- padding: 5px;
- font-size: 1rem;
- transition: color 0.2s;
-}
-
-.recent-actions button:hover {
- color: #ff6b6b;
-}
-
-.empty {
- padding: 30px;
- text-align: center;
- color: #666;
-}
-
-/* 成就 */
-.achievement-list {
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: 10px;
-}
-
-.achievement-item {
- background: rgba(255,255,255,0.03);
- border-radius: 12px;
- padding: 15px 10px;
- text-align: center;
- border: 2px solid transparent;
- transition: all 0.2s;
- opacity: 0.5;
-}
-
-.achievement-item.unlocked {
- background: rgba(255,215,0,0.1);
- border-color: rgba(255,215,0,0.3);
- opacity: 1;
-}
-
-.achievement-icon {
- font-size: 2rem;
- margin-bottom: 5px;
-}
-
-.achievement-name {
- font-size: 0.75rem;
- color: #aaa;
- margin-bottom: 3px;
-}
-
-.achievement-desc {
- font-size: 0.6rem;
- color: #666;
-}
-
/* Toast */
.toast {
position: fixed;
- bottom: 30px;
+ top: 50%;
left: 50%;
- transform: translateX(-50%);
- background: rgba(74,222,128,0.9);
- color: #000;
- padding: 15px 30px;
+ 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: 10px;
+ gap: 12px;
font-weight: 600;
- box-shadow: 0 10px 30px rgba(0,0,0,0.3);
- transition: all 0.3s ease;
- z-index: 1000;
+ z-index: 200;
+ transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
-.toast.hidden {
- opacity: 0;
- transform: translateX(-50%) translateY(20px);
- pointer-events: none;
+.achievement-toast.show {
+ transform: translateX(-50%) translateY(0);
}
-/* 响应式 */
-@media (max-width: 500px) {
- .stats {
- grid-template-columns: repeat(2, 1fr);
+.achievement-icon {
+ font-size: 1.8rem;
+}
+
+/* 移动端适配 */
+@media (max-width: 768px) {
+ .big-btn {
+ width: 160px;
+ height: 160px;
}
- .achievement-list {
- grid-template-columns: repeat(4, 1fr);
+ .btn-icon {
+ font-size: 3rem;
}
- .achievement-name {
- font-size: 0.65rem;
+ .recent-panel {
+ position: fixed;
+ top: auto;
+ bottom: 100px;
+ left: 20px;
+ right: 20px;
+ width: auto;
+ max-height: 200px;
+ background: rgba(13,13,15,0.95);
}
- .din-button {
- width: 150px;
- height: 150px;
- }
-
- .btn-text {
- font-size: 2.5rem;
+ .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;
+}