-
+
mong
@@ -22,16 +25,19 @@ export default function Home() {
{[{
title: '스마트 수면 측정',
desc: '정확한 수면 단계 분석으로 수면의 질을 측\n정합니다',
+ icon: moonIcon
}, {
title: '상세한 통계',
desc: '개인 맞춤 수면 패턴 분석과 개선 제안을 제\n공합니다',
+ icon: statisticsIcon
}, {
title: '건강 관리',
desc: '수면을 통한 전체적인 건강 상태 모니터링',
+ icon: heartIcon
}].map((card, idx) => (
-
+
{card.title}
{card.desc}
diff --git a/src/mong/pages/StatisticsAnalysis.tsx b/src/mong/pages/StatisticsAnalysis.tsx
index 79ebbceb..3c37da24 100644
--- a/src/mong/pages/StatisticsAnalysis.tsx
+++ b/src/mong/pages/StatisticsAnalysis.tsx
@@ -434,28 +434,126 @@ const StatisticsAnalysis: React.FC = () => {
)}
- {/* 목표 및 성취 - 데이터가 있을 때만 표시 */}
+ {/* AI 예측 및 목표 - 데이터가 있을 때만 표시 */}
{sleepRecords.length > 0 && (
-
+
-
수면 목표 및 성취
-
{analysisType === 'weekly' ? '이번 주' : '이번 달'} 목표 달성률
+
+
현재 패턴을 기반으로 한 AI 분석 결과, 아래 개선사항을 실천하시면 4-6주 내에 수면 점수를 85점에서 90점으로 향상 시킬 수 있을 것으로 예측됩니다.
-
- {currentData.goals.map((goal, index) => (
-
-
-
{goal.name}
-
{goal.progress}% 달성
+
+
+
+
-
-
+
+
+
+
+
+
1주 전
+
현재
+
1주 후
+
2주 후
+
3주 후
+
4주 후
+
- ))}
+
)}
diff --git a/src/mong/styles/statistics.css b/src/mong/styles/statistics.css
index 48a4a20a..31d6d0d9 100644
--- a/src/mong/styles/statistics.css
+++ b/src/mong/styles/statistics.css
@@ -56,28 +56,58 @@
/* Cards */
.summary-card,
.patterns-card,
-.analysis-card,
-.goals-card {
+.analysis-card {
background: #1a1a1a;
border: 1px solid #2a2a2a;
border-radius: 14px;
padding: 24px;
}
+.header-content {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ margin-bottom: 4px;
+ justify-content: flex-start;
+ width: 100%;
+}
+
+.header-icon {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #a1a1aa;
+}
+
+.header-icon svg {
+ width: 16px;
+ height: 16px;
+}
+
+.card-header {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ text-align: left;
+ margin-bottom: 16px;
+}
+
.card-header h4 {
font-size: 18px;
font-weight: 600;
color: #ffffff;
margin: 0 0 4px 0;
- display: flex;
- align-items: center;
- gap: 8px;
+ text-align: left;
+ width: 100%;
}
.card-header p {
font-size: 14px;
color: #a1a1aa;
margin: 0;
+ text-align: left;
+ width: 100%;
+ line-height: 1.4;
}
@@ -194,57 +224,223 @@
}
-/* Goals List */
-.goals-list {
- margin-top: 24px;
+/* AI Prediction Card - 피그마 디자인 정확 구현 */
+.ai-prediction-card {
+ background: #1a1a1a;
+ border: 1px solid #2a2a2a;
+ border-radius: 14px;
+ padding: 24px;
+ width: 100%;
+ max-width: 754px;
+ height: 404px;
+ position: relative;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
}
-.goal-item {
- margin-bottom: 16px;
+.prediction-chart-container {
+ margin-top: 20px;
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ min-height: 0;
+ overflow: hidden;
}
-.goal-header {
+.prediction-chart {
+ background: #0f0f0f;
+ border-radius: 8px;
+ padding: 16px;
+ position: relative;
+ flex: 1;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ min-height: 0;
+}
+
+
+.chart-content {
display: flex;
+ flex: 1;
+ position: relative;
+ min-height: 0;
+ overflow: hidden;
+}
+
+.chart-y-axis {
+ display: flex;
+ flex-direction: column;
justify-content: space-between;
+ width: 40px;
+ padding: 0;
+ flex-shrink: 0;
+ align-self: stretch;
+ position: relative;
+}
+
+.y-label {
+ font-size: 7px;
+ color: #a1a1aa;
+ text-align: center;
+ line-height: 1;
+ height: 0;
+ display: flex;
align-items: center;
- margin-bottom: 8px;
+ justify-content: flex-end;
+ margin: 0;
+ flex: 1;
+ position: relative;
}
-.goal-name {
- font-size: 14px;
- font-weight: 500;
- color: #ffffff;
+/* Y축 라벨을 격자선과 정확히 정렬 - 격자선 중앙에 위치 */
+.y-label:nth-child(1) { /* 92점 - y=0 격자선 */
+ transform: translateY(0px);
}
-.goal-progress {
- font-size: 14px;
- color: #a1a1aa;
+.y-label:nth-child(2) { /* 89점 - y=50 격자선 */
+ transform: translateY(0px);
}
-.goal-bar {
- width: 100%;
- height: 8px;
- background: #2a2a2a;
- border-radius: 4px;
+.y-label:nth-child(3) { /* 86점 - y=100 격자선 */
+ transform: translateY(0px);
+}
+
+.y-label:nth-child(4) { /* 83점 - y=150 격자선 */
+ transform: translateY(0px);
+}
+
+.y-label:nth-child(5) { /* 80점 - y=200 격자선 */
+ transform: translateY(0px);
+}
+
+.chart-area {
+ flex: 1;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ min-width: 0;
+ min-height: 0;
overflow: hidden;
}
-.goal-fill {
+.chart-grid {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ display: grid;
+ grid-template-columns: repeat(6, 1fr);
+ grid-template-rows: repeat(5, 1fr);
+ z-index: 1;
+}
+
+.grid-line.horizontal {
+ grid-column: 1 / -1;
+ height: 1px;
+ background: transparent;
+ border-top: 1px dashed #3a3a3a;
+ opacity: 0.6;
+ align-self: center;
+}
+
+.grid-line.vertical {
+ grid-row: 1 / -1;
+ width: 1px;
+ background: transparent;
+ border-left: 1px dashed #3a3a3a;
+ opacity: 0.6;
+ justify-self: center;
+}
+
+.grid-line.vertical.current {
+ opacity: 0.8;
+ border-left: 1px dashed #a1a1aa;
+}
+
+.chart-lines {
+ flex: 1;
+ position: relative;
+ z-index: 2;
+ overflow: visible;
+ width: 100%;
+ min-height: 0;
+ max-height: 100%;
+}
+
+.prediction-svg {
+ width: 100%;
height: 100%;
- border-radius: 4px;
- transition: width 0.3s ease;
+ max-width: 100%;
+ max-height: 100%;
+ display: block;
}
-.goal-fill.primary {
- background: #00d4aa;
+.current-label {
+ font-size: 11px;
+ fill: #ffffff;
+ font-weight: 500;
+ text-anchor: middle;
+ dominant-baseline: hanging;
+ paint-order: stroke fill;
+ stroke: #1a1a1a;
+ stroke-width: 3px;
+ stroke-linejoin: round;
+}
+
+.axis-label {
+ font-size: 12px;
+ font-weight: 600;
+ fill: #ffffff;
+ paint-order: stroke fill;
+ stroke: #1a1a1a;
+ stroke-width: 2px;
+ stroke-linejoin: round;
+}
+
+.axis-label-vertical {
+ font-size: 12px;
+ font-weight: 600;
+ fill: #ffffff;
+ paint-order: stroke fill;
+ stroke: #1a1a1a;
+ stroke-width: 2px;
+ stroke-linejoin: round;
}
-.goal-fill.blue {
- background: #3b82f6;
+.chart-x-axis {
+ display: flex;
+ justify-content: space-between;
+ height: 18px;
+ align-items: center;
+ position: relative;
+ flex-shrink: 0;
+ overflow: hidden;
+}
+
+.x-label {
+ font-size: 11px;
+ color: #a1a1aa;
+ text-align: center;
+ flex: 1;
+ margin: 0;
+ line-height: 1;
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
-.goal-fill.green {
- background: #22c55e;
+.x-label.current {
+ color: #ffffff;
+ font-weight: 500;
}
@@ -911,6 +1107,91 @@
.recommendation-badges {
align-self: flex-start;
}
+
+ .card-header {
+ align-items: flex-start;
+ text-align: left;
+ }
+
+ .card-header h4 {
+ text-align: left;
+ font-size: 16px;
+ }
+
+ .card-header p {
+ text-align: left;
+ font-size: 13px;
+ }
+
+ .header-content {
+ justify-content: flex-start;
+ }
+
+ .ai-prediction-card {
+ padding: 16px;
+ height: auto;
+ min-height: 300px;
+ overflow: hidden;
+ }
+
+ .prediction-chart {
+ padding: 12px;
+ min-height: 0;
+ overflow: hidden;
+ }
+
+ .prediction-chart-container {
+ margin-top: 16px;
+ overflow: hidden;
+ }
+
+ .chart-content {
+ min-height: 0;
+ overflow: hidden;
+ }
+
+ .chart-lines {
+ overflow: visible;
+ width: 100%;
+ min-height: 0;
+ max-height: 100%;
+ }
+
+.prediction-svg {
+ width: 100%;
+ height: 100%;
+ max-width: 100%;
+ max-height: 100%;
+ display: block;
+}
+
+ .chart-x-axis {
+ height: 16px;
+ flex-shrink: 0;
+ overflow: hidden;
+ }
+
+ .x-label {
+ font-size: 9px;
+ }
+
+ .y-label {
+ font-size: 9px;
+ height: 0;
+ }
+
+ .chart-y-axis {
+ width: 36px;
+ }
+
+ .y-label {
+ font-size: 6px;
+ }
+
+ .current-label {
+ font-size: 9px;
+ stroke-width: 2px;
+ }
}
/* Brainwave Chart Styles */