- 核心功能:一键记录 din 时刻 - 统计面板:日/周/月/总计 + 同比 - 成就系统:24个成就,支持配置文件扩展 - PWA 支持:离线可用,可安装到主屏幕 - 东八区时区支持 - SQLite 数据存储
372 lines
6.3 KiB
CSS
372 lines
6.3 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
|
|
color: #fff;
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
|
|
.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 {
|
|
display: flex;
|
|
justify-content: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.din-button {
|
|
width: 180px;
|
|
height: 180px;
|
|
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);
|
|
cursor: pointer;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
transition: all 0.2s ease;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.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);
|
|
}
|
|
|
|
.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);
|
|
}
|
|
|
|
.din-button.recording {
|
|
animation: pulse 1s infinite;
|
|
}
|
|
|
|
@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-text {
|
|
font-size: 3rem;
|
|
line-height: 1;
|
|
}
|
|
|
|
.btn-label {
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
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-section.hidden {
|
|
display: none;
|
|
}
|
|
|
|
#din-content {
|
|
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);
|
|
color: #fff;
|
|
margin-bottom: 15px;
|
|
outline: none;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
#din-content:focus {
|
|
border-color: #ff6b6b;
|
|
}
|
|
|
|
#din-content::placeholder {
|
|
color: #666;
|
|
}
|
|
|
|
.input-actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
.btn-primary, .btn-secondary {
|
|
flex: 1;
|
|
padding: 12px 20px;
|
|
border-radius: 8px;
|
|
border: none;
|
|
font-size: 1rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: #ff6b6b;
|
|
color: #fff;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: #ff5252;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: rgba(255,255,255,0.1);
|
|
color: #aaa;
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: rgba(255,255,255,0.15);
|
|
color: #fff;
|
|
}
|
|
|
|
/* 最近记录 */
|
|
.recent {
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.recent h2, .achievements h2 {
|
|
font-size: 1.1rem;
|
|
margin-bottom: 15px;
|
|
color: #aaa;
|
|
}
|
|
|
|
.recent-list {
|
|
background: rgba(255,255,255,0.03);
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.recent-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 15px;
|
|
border-bottom: 1px solid rgba(255,255,255,0.05);
|
|
gap: 15px;
|
|
}
|
|
|
|
.recent-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.recent-time {
|
|
font-size: 0.75rem;
|
|
color: #666;
|
|
white-space: nowrap;
|
|
min-width: 60px;
|
|
}
|
|
|
|
.recent-content {
|
|
flex: 1;
|
|
color: #ddd;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.recent-content.empty {
|
|
color: #666;
|
|
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;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: rgba(74,222,128,0.9);
|
|
color: #000;
|
|
padding: 15px 30px;
|
|
border-radius: 30px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
font-weight: 600;
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
|
|
transition: all 0.3s ease;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.toast.hidden {
|
|
opacity: 0;
|
|
transform: translateX(-50%) translateY(20px);
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* 响应式 */
|
|
@media (max-width: 500px) {
|
|
.stats {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.achievement-list {
|
|
grid-template-columns: repeat(4, 1fr);
|
|
}
|
|
|
|
.achievement-name {
|
|
font-size: 0.65rem;
|
|
}
|
|
|
|
.din-button {
|
|
width: 150px;
|
|
height: 150px;
|
|
}
|
|
|
|
.btn-text {
|
|
font-size: 2.5rem;
|
|
}
|
|
}
|