@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;600;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --bg-gradient: linear-gradient(135deg, #f0fdf4 0%, #dbeafe 100%);
    --card-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #1e293b;
    --text-muted: #64748b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* 글래스모피즘 컨테이너 */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.container {
    flex: 1;
    padding: 20px;
    padding-bottom: 90px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.screen {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
p { font-size: 18px; color: var(--text-muted); }

/* 어르신 맞춤 큰 입력폼 */
.input-group { margin-bottom: 24px; }
.input-group label { display: block; font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.input-group input { 
    width: 100%; padding: 18px; font-size: 22px; 
    border-radius: 16px; border: 2px solid white;
    background: rgba(255,255,255,0.9); outline: none;
    transition: all 0.2s;
}
.input-group input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); }

.btn {
    width: 100%; padding: 20px; font-size: 24px; font-weight: 800;
    color: white; background: var(--primary);
    border: none; border-radius: 16px; cursor: pointer;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
    transition: transform 0.1s, box-shadow 0.1s;
}
.btn:active { transform: translateY(2px); box-shadow: 0 5px 10px rgba(79, 70, 229, 0.3); }

/* 대시보드 걸음수 써클 */
.steps-circle {
    width: 250px; height: 250px; margin: 30px auto;
    border-radius: 50%; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 
        inset 0 0 20px rgba(255,255,255,1),
        0 20px 40px rgba(0,0,0,0.08),
        0 0 0 10px rgba(255,255,255,0.4);
    position: relative;
}
.steps-circle::before {
    content: ''; position: absolute; top:-5px; left:-5px; right:-5px; bottom:-5px;
    border-radius: 50%; background: linear-gradient(135deg, var(--primary-light), var(--primary));
    z-index: -1;
}

#today-steps-display { font-size: 64px; font-weight: 800; color: var(--primary); line-height: 1; }
.steps-circle span { font-size: 20px; font-weight: 600; color: var(--text-muted); margin-top: 10px; }

/* 통계 카드 */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.stat-card { text-align: center; padding: 20px; }
.stat-card .value { font-size: 28px; font-weight: 800; color: var(--text-main); }
.stat-card .label { font-size: 16px; color: var(--text-muted); }

/* 리스트 스타일 */
.list-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 24px; margin-bottom: 12px; background: rgba(255,255,255,0.8);
    border-radius: 16px;
}
.list-item .rank { font-size: 22px; font-weight: 800; color: var(--primary); width: 40px;}
.list-item .name { font-size: 24px; font-weight: 600; flex: 1; }
.list-item .score { font-size: 24px; font-weight: 800; color: #10b981; }

.history-item .date { font-size: 20px; font-weight: 600; flex:1;}
.history-item .score { font-size: 24px; font-weight: 800; color: var(--primary); }

/* 하단 내비게이션 바 */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(255,255,255,0.9); backdrop-filter: blur(20px);
    display: flex; justify-content: space-around; padding: 12px 0 24px 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05); border-top: 1px solid rgba(255,255,255,0.5);
    z-index: 100;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 16px; font-weight: 600;
    text-decoration: none; border: none; background: none; cursor: pointer;
}
.nav-item.active { color: var(--primary); }
.nav-item i { font-size: 28px; margin-bottom: 6px; transition: transform 0.2s; }
.nav-item.active i { transform: scale(1.2); }

#confetti { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 999; }
