/* 基础样式重置 */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; color: #333; overflow-x: hidden; } /* 主容器 */ .app-container { max-width: 414px; margin: 0 auto; min-height: 100vh; background: #f8f9fa; position: relative; box-shadow: 0 0 20px rgba(0, 0, 0, 0.1); } /* 顶部导航栏 */ .header { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); color: white; padding: 20px; text-align: center; position: relative; overflow: hidden; } .header::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%); animation: float 6s ease-in-out infinite; } @keyframes float { 0%, 100% { transform: translate(-50%, -50%) rotate(0deg); } 50% { transform: translate(-50%, -50%) rotate(180deg); } } .header-content { position: relative; z-index: 1; } .app-title { font-size: 28px; font-weight: 700; margin-bottom: 4px; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } .app-subtitle { font-size: 14px; opacity: 0.9; font-weight: 300; } /* 主要内容区域 */ .main-content { padding: 20px; padding-bottom: 100px; } /* 概览卡片 */ .overview-card { background: white; border-radius: 16px; padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.1); } .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; } .card-header h2 { font-size: 18px; font-weight: 600; color: #374151; } .total-value { font-size: 24px; font-weight: 700; color: #8b5cf6; } .portfolio-summary { display: flex; gap: 20px; } .summary-item { flex: 1; text-align: center; } .summary-item .label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; } .summary-item .value { display: block; font-size: 16px; font-weight: 600; } .summary-item .value.positive { color: #10b981; } .summary-item .value.negative { color: #ef4444; } /* 底部导航栏 */ .bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 414px; background: white; border-top: 1px solid #e5e7eb; display: flex; padding: 8px 0; box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1); z-index: 100; } .nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; cursor: pointer; transition: all 0.3s ease; border-radius: 8px; margin: 0 4px; } .nav-item:hover { background: rgba(139, 92, 246, 0.1); } .nav-item.active { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; } .nav-icon { font-size: 20px; margin-bottom: 4px; } .nav-item span { font-size: 12px; font-weight: 500; } /* 页面样式 */ .page { padding: 20px; padding-bottom: 100px; min-height: calc(100vh - 120px); } .page.hidden { display: none; } .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .page-header h2 { font-size: 20px; font-weight: 600; color: #374151; } .add-btn { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); color: white; border: none; border-radius: 20px; padding: 8px 16px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; } .add-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); } /* 持仓列表 */ .holdings-list { display: flex; flex-direction: column; gap: 12px; } .holding-item { background: white; border-radius: 12px; padding: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); border: 1px solid #f3f4f6; transition: all 0.3s ease; } .holding-item:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); } .stock-info { margin-bottom: 8px; } .stock-name { font-size: 16px; font-weight: 600; color: #374151; margin-bottom: 2px; } .stock-code { font-size: 12px; color: #6b7280; } .holding-details { display: flex; justify-content: space-between; align-items: center; } .shares { font-size: 14px; color: #6b7280; } .current-price { font-size: 16px; font-weight: 600; color: #374151; } .profit { font-size: 14px; font-weight: 500; text-align: right; } .profit.positive { color: #10b981; } .profit.negative { color: #ef4444; } /* 计划列表 */ .plans-list { display: flex; flex-direction: column; gap: 16px; } .plan-item { background: white; border-radius: 12px; padding: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); border: 1px solid #f3f4f6; } .plan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; } .plan-status { padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 500; } .plan-status.pending { background: rgba(251, 191, 36, 0.1); color: #f59e0b; } .plan-status.completed { background: rgba(16, 185, 129, 0.1); color: #10b981; } .plan-details { margin-bottom: 12px; } .plan-row { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 14px; } .plan-row .label { color: #6b7280; } .plan-row .value { font-weight: 500; color: #374151; } .plan-progress { display: flex; align-items: center; gap: 8px; } .progress-bar { flex: 1; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; } .progress-fill { height: 100%; background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%); border-radius: 3px; transition: width 0.3s ease; } .progress-text { font-size: 12px; color: #6b7280; white-space: nowrap; } /* 时间线 */ .timeline { position: relative; padding-left: 20px; } .timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%); } .timeline-item { position: relative; margin-bottom: 24px; } .timeline-item::before { content: ''; position: absolute; left: -16px; top: 8px; width: 12px; height: 12px; background: #8b5cf6; border-radius: 50%; border: 3px solid white; box-shadow: 0 0 0 2px #8b5cf6; } .timeline-date { font-size: 12px; color: #6b7280; margin-bottom: 8px; font-weight: 500; } .timeline-content { background: white; border-radius: 12px; padding: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); border: 1px solid #f3f4f6; } .transaction-card { width: 100%; } .transaction-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; } .transaction-type { padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 500; } .transaction-type.buy { background: rgba(16, 185, 129, 0.1); color: #10b981; } .transaction-type.sell { background: rgba(239, 68, 68, 0.1); color: #ef4444; } .transaction-details { margin-bottom: 12px; } .detail-row { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 14px; } .transaction-thoughts { background: #f8f9fa; border-radius: 8px; padding: 12px; border-left: 3px solid #8b5cf6; } .transaction-thoughts h4 { font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 8px; } .transaction-thoughts p { font-size: 13px; color: #6b7280; line-height: 1.5; } /* 工具网格 */ .tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; } .tool-card { background: white; border-radius: 12px; padding: 20px; text-align: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); border: 1px solid #f3f4f6; cursor: pointer; transition: all 0.3s ease; } .tool-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15); border-color: #8b5cf6; } .tool-icon { font-size: 32px; margin-bottom: 12px; } .tool-name { font-size: 16px; font-weight: 600; color: #374151; margin-bottom: 4px; } .tool-desc { font-size: 12px; color: #6b7280; } /* 模态框 */ .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s ease; } .modal.show { opacity: 1; visibility: visible; } .modal-content { background: white; border-radius: 16px; width: 90%; max-width: 400px; max-height: 80vh; overflow-y: auto; transform: scale(0.9); transition: transform 0.3s ease; } .modal.show .modal-content { transform: scale(1); } .modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #e5e7eb; } .modal-header h3 { font-size: 18px; font-weight: 600; color: #374151; } .close-btn { background: none; border: none; font-size: 24px; color: #6b7280; cursor: pointer; padding: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.3s ease; } .close-btn:hover { background: #f3f4f6; color: #374151; } .modal-body { padding: 20px; } /* 响应式设计 */ @media (max-width: 375px) { .app-container { max-width: 100%; } .main-content { padding: 16px; } .page { padding: 16px; } .tools-grid { grid-template-columns: 1fr; } } /* 小程序适配 */ @media (max-width: 320px) { .app-title { font-size: 24px; } .nav-item span { font-size: 11px; } .nav-icon { font-size: 18px; } } /* 动画效果 */ @keyframes slideInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .holding-item, .plan-item, .timeline-content, .tool-card { animation: slideInUp 0.3s ease forwards; } /* 加载状态 */ .loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: #6b7280; } .loading::after { content: ''; width: 20px; height: 20px; border: 2px solid #e5e7eb; border-top: 2px solid #8b5cf6; border-radius: 50%; animation: spin 1s linear infinite; margin-left: 8px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* 空状态 */ .empty-state { text-align: center; padding: 40px 20px; color: #6b7280; } .empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; } .empty-state-text { font-size: 16px; margin-bottom: 8px; } .empty-state-desc { font-size: 14px; opacity: 0.7; }