/* 기본 스타일 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 428px;
    margin: 0 auto;
    min-height: 100vh;
    background: white;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* 헤더 */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 20px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 100px;
    max-height: 100px;
}

.header-content {
    text-align: center;
    height: 68px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.header-date {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    color: white;
}

/* 메인 컨텐츠 */
.main-content {
    padding: 20px 20px 90px;
    background: #f8f9fa;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 오늘의 요약 섹션 */
.today-summary {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.summary-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.today-info {
    text-align: center;
}

.today-date {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.today-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.status-text {
    font-size: 14px;
    color: #6c757d;
}

.status-badge {
    background: #ffc107;
    color: #333;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.written {
    background: #28a745;
    color: white;
}

.quick-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.primary {
    background: #667eea;
    color: white;
}

.action-btn.secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn.primary:hover {
    background: #5a67d8;
}

.action-btn.secondary:hover {
    background: #e9ecef;
}

/* 이번 주 통계 */
.weekly-stats {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stats-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 20px 16px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    line-height: 1;
}

.stats-detail-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 0;
    cursor: pointer;
    text-align: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.stats-detail-btn:hover {
    background: #667eea10;
}

/* 기분 트렌드 */
.mood-trend {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.trend-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mood-chart {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    justify-content: space-around;
    align-items: end;
    min-height: 80px;
}

.mood-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bar {
    width: 24px;
    background: #667eea;
    border-radius: 12px 12px 0 0;
    min-height: 8px;
    transition: height 0.3s ease;
}

.bar-date {
    font-size: 10px;
    color: #6c757d;
    font-weight: 500;
}

.trend-summary {
    text-align: center;
    padding: 12px;
    background: #667eea10;
    border-radius: 8px;
}

.trend-summary p {
    font-size: 14px;
    color: #495057;
    margin: 0;
}

/* 빠른 접근 메뉴 */
.quick-access {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.access-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: #f8f9fa;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.access-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.access-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.access-label {
    font-size: 12px;
    font-weight: 500;
    color: #495057;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state p {
    margin-bottom: 16px;
    font-size: 14px;
}

/* 최근 일기 섹션 */
.recent-entries-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.view-all-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.view-all-btn:hover {
    background: #667eea10;
}

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.entry-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.entry-card:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.entry-date {
    font-size: 14px;
    font-weight: 500;
    color: #667eea;
}

.entry-mood {
    font-size: 20px;
}

.entry-preview {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 통계 섹션 */
.stats-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px 8px;
    background: #f8f9fa;
    border-radius: 12px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

/* 하단 네비게이션 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 428px;
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 8px 0;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    min-width: 60px;
}

.nav-btn.active {
    color: #667eea;
    background: #667eea10;
}

.nav-btn:not(.active) {
    color: #6c757d;
}

.nav-icon {
    font-size: 20px;
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: -0.2px;
}

/* 반응형 디자인 */
@media (max-width: 428px) {
    .app-container {
        max-width: 100%;
    }
    
    .main-content {
        padding: 16px 16px 90px;
    }
    
    .mood-btn {
        padding: 12px 4px;
        font-size: 28px;
    }
    
    .stats-grid {
        gap: 12px;
    }
    
    .stat-item {
        padding: 12px 8px;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.today-summary,
.recent-entries-section,
.weekly-stats,
.mood-trend,
.quick-access {
    animation: fadeIn 0.6s ease forwards;
}

.recent-entries-section {
    animation-delay: 0.1s;
}

.weekly-stats {
    animation-delay: 0.2s;
}

.mood-trend {
    animation-delay: 0.3s;
}

.quick-access {
    animation-delay: 0.4s;
}

/* 반응형 디자인 */
@media (max-width: 428px) {
    .app-container {
        max-width: 100%;
    }
    
    .main-content {
        padding: 16px 16px 90px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .access-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .access-item {
        padding: 16px 8px;
    }
}
