/* ===== DIN: Clear & Fast ===== * 基于第一版优化:保持清晰,提升速度 */ * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; } body { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif; background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%); color: #fff; min-height: 100vh; padding: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); } .container { max-width: 600px; margin: 0 auto; } /* ===== HEADER ===== */ header { text-align: center; margin-bottom: 24px; } header h1 { font-size: 2rem; margin-bottom: 4px; } .subtitle { color: #888; font-size: 0.85rem; } /* ===== STATS: 简化但清晰 ===== */ .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; } .stat-card { background: rgba(255,255,255,0.05); border-radius: 16px; padding: 16px 8px; text-align: center; border: 1px solid rgba(255,255,255,0.08); transition: transform 0.2s; } .stat-card:active { transform: scale(0.98); } .stat-card.total { background: rgba(255,107,107,0.12); border-color: rgba(255,107,107,0.25); } .stat-value { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; } .stat-card.total .stat-value { color: #ff6b6b; } .stat-label { font-size: 0.7rem; color: #888; margin-bottom: 2px; } .stat-growth { font-size: 0.65rem; color: #4ade80; } .stat-growth.negative { color: #f87171; } /* ===== MAIN BUTTON: 更大更容易点 ===== */ .main-action { display: flex; justify-content: center; margin-bottom: 24px; position: relative; } .din-button { width: 180px; height: 180px; border-radius: 50%; border: none; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); position: relative; } .din-button:hover { transform: scale(1.05); } .din-button:active { transform: scale(0.95); } .din-button.recording { animation: pulse-btn 1.2s ease-in-out infinite; } @keyframes pulse-btn { 0%, 100% { filter: drop-shadow(0 0 20px rgba(255,107,107,0.4)); transform: scale(1); } 50% { filter: drop-shadow(0 0 40px rgba(255,107,107,0.6)); transform: scale(1.02); } } .btn-icon { width: 100%; height: 100%; transition: transform 0.2s; } .din-button:active .btn-icon { transform: scale(0.92); } /* 提示 */ .hint { position: absolute; bottom: -40px; text-align: center; color: #666; font-size: 0.8rem; } /* ===== FLOATING INPUT: 快速输入不跳转 ===== */ .float-input { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); background: rgba(30,30,40,0.98); backdrop-filter: blur(20px); border-radius: 24px; padding: 24px; width: 90%; max-width: 400px; border: 1px solid rgba(255,255,255,0.1); z-index: 100; opacity: 0; visibility: hidden; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); } .float-input.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); } .float-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; } .float-title { font-size: 1.1rem; font-weight: 600; } .float-time { font-size: 0.8rem; color: #666; font-family: 'SF Mono', monospace; } .float-field { width: 100%; background: rgba(0,0,0,0.3); border: 2px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 16px; font-size: 1.1rem; color: #fff; margin-bottom: 16px; outline: none; transition: border-color 0.2s; } .float-field:focus { border-color: #ff6b6b; } .float-field::placeholder { color: #555; } /* Quick tags */ .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; } .tag { padding: 10px 16px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; font-size: 0.9rem; color: #aaa; cursor: pointer; transition: all 0.15s; } .tag:hover, .tag:active { background: #ff6b6b; border-color: #ff6b6b; color: #fff; transform: scale(0.98); } .float-actions { display: flex; gap: 12px; } .btn { flex: 1; padding: 14px; border-radius: 12px; border: none; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.15s; } .btn-primary { background: #ff6b6b; color: #fff; } .btn-primary:active { background: #ff5252; transform: scale(0.98); } .btn-secondary { background: rgba(255,255,255,0.08); color: #888; } .btn-secondary:active { background: rgba(255,255,255,0.12); } .btn-danger { background: rgba(255,59,48,0.15); color: #ff3b30; } .btn-danger:active { background: rgba(255,59,48,0.25); transform: scale(0.98); } /* Overlay */ .overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px); z-index: 99; opacity: 0; visibility: hidden; transition: all 0.25s; } .overlay.active { opacity: 1; visibility: visible; } /* ===== RECENT STRIP: 横向快捷查看 ===== */ .recent-strip { background: rgba(255,255,255,0.03); border-radius: 16px; padding: 16px; margin-bottom: 16px; } .recent-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; } .recent-title { font-size: 0.85rem; color: #888; } .view-all { font-size: 0.8rem; color: #ff6b6b; cursor: pointer; } .recent-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 4px; } .recent-chips::-webkit-scrollbar { display: none; } .recent-chip { flex-shrink: 0; padding: 10px 14px; background: rgba(255,255,255,0.05); border-radius: 10px; font-size: 0.85rem; color: #aaa; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px; } .recent-chip:hover, .recent-chip:active { background: rgba(255,255,255,0.1); } .recent-chip .time { font-size: 0.7rem; color: #666; font-family: 'SF Mono', monospace; } .recent-chip.empty { color: #555; font-style: italic; } /* ===== ACHIEVEMENTS: 横向滚动 ===== */ .achievements { background: rgba(255,255,255,0.03); border-radius: 16px; padding: 16px; } .achievements-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; } .achievements-title { font-size: 0.85rem; color: #888; } .achievements-progress { font-size: 0.8rem; color: #666; } .achievements-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; } .achievements-scroll::-webkit-scrollbar { display: none; } .achievement-badge { flex-shrink: 0; width: 70px; text-align: center; padding: 12px 8px; background: rgba(255,255,255,0.03); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); opacity: 0.4; transition: all 0.2s; } .achievement-badge.unlocked { opacity: 1; background: rgba(255,215,0,0.08); border-color: rgba(255,215,0,0.2); } .achievement-icon { font-size: 1.8rem; display: block; margin-bottom: 4px; } .achievement-name { font-size: 0.65rem; color: #888; } /* ===== HISTORY PANEL ===== */ .history-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 420px; background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%); z-index: 200; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; } .history-panel.active { transform: translateX(0); } .history-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; padding-top: max(20px, env(safe-area-inset-top)); border-bottom: 1px solid rgba(255,255,255,0.05); } .history-title { font-size: 1.1rem; font-weight: 600; } .history-close { width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,0.08); color: #fff; font-size: 1.2rem; cursor: pointer; } .history-list { flex: 1; overflow-y: auto; padding: 16px; } .history-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: rgba(255,255,255,0.03); border-radius: 12px; margin-bottom: 8px; } .history-time { font-size: 0.75rem; color: #666; min-width: 50px; font-family: 'SF Mono', monospace; } .history-content { flex: 1; font-size: 0.9rem; color: #ddd; } .history-content.empty { color: #555; font-style: italic; } .history-actions { display: flex; gap: 6px; } .history-actions button { width: 32px; height: 32px; border-radius: 8px; border: none; background: rgba(255,255,255,0.06); color: #888; font-size: 0.9rem; cursor: pointer; } .history-actions button:hover { background: rgba(255,255,255,0.1); } .history-actions .btn-delete:hover { background: #ff6b6b; color: #fff; } /* ===== TOAST ===== */ .toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8); background: #ff6b6b; color: #fff; padding: 16px 32px; border-radius: 30px; font-weight: 600; z-index: 300; opacity: 0; visibility: hidden; transition: all 0.3s ease; } .toast.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); } /* ===== RESPONSIVE ===== */ @media (max-width: 400px) { .stats { gap: 6px; } .stat-card { padding: 12px 4px; } .stat-value { font-size: 1.3rem; } .din-button { width: 170px; height: 170px; } .btn-text { font-size: 3rem; } } /* ===== CUSTOM CONFIRM DIALOG ===== */ .confirm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.25s ease; } .confirm-overlay.active { opacity: 1; visibility: visible; } .confirm-box { background: linear-gradient(145deg, #1e1e2e, #1a1a2e); border-radius: 20px; padding: 28px 24px; width: 90%; max-width: 320px; text-align: center; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 25px 50px rgba(0,0,0,0.4); transform: scale(0.9); transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); } .confirm-overlay.active .confirm-box { transform: scale(1); } .confirm-icon { font-size: 3rem; margin-bottom: 12px; } .confirm-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; color: #fff; } .confirm-message { font-size: 0.9rem; color: #888; margin-bottom: 24px; line-height: 1.5; } .confirm-actions { display: flex; gap: 12px; } .confirm-btn { flex: 1; padding: 14px 20px; border-radius: 12px; border: none; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s; } .confirm-btn.cancel { background: rgba(255,255,255,0.08); color: #aaa; } .confirm-btn.cancel:hover, .confirm-btn.cancel:active { background: rgba(255,255,255,0.12); } .confirm-btn.delete { background: linear-gradient(145deg, #ff6b6b, #ee5a5a); color: #fff; box-shadow: 0 4px 15px rgba(255,107,107,0.3); } .confirm-btn.delete:hover, .confirm-btn.delete:active { background: linear-gradient(145deg, #ff5252, #dd4a4a); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,107,107,0.4); }