:root {
    --bg: #F0F2F5; 
    --text-primary: #1a1f27;
    --text-secondary: #8b95a1;
    --white: #ffffff;
    
    --color-1: #FFB3C1;
    --color-2: #A2D2FF;
    --color-3: #FFD6A5;
    --color-4: #B2F2BB;

    --text-1: #F06595;
    --text-2: #4DABF7;
    --text-3: #FF922B;
    --text-4: #37B24D;

    /* 이전 버전의 완벽한 양각 효과 복구 */
    --neu-outer: 10px 10px 20px #d1d9e6, -10px -10px 20px #ffffff;
    --neu-inner: inset 4px 4px 8px #d1d9e6, inset -4px -4px 8px #ffffff;
    --neu-button: 5px 5px 10px #d1d9e6, -5px -5px 10px #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    touch-action: pan-y;
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: 'Pretendard', -apple-system, sans-serif;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 슬라이더 구조 최적화 (이전 UI 보존) */
.slider-container {
    width: 100%;
    max-width: 450px;
    height: 85vh;
    overflow: hidden;
    position: relative;
    padding: 20px; /* 외부 여백 추가하여 그림자 잘리지 않게 함 */
}

.slider-wrapper {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 개별 페이지: 이전 버전의 .app 스타일 그대로 적용 */
.page {
    width: 50%;
    height: 100%;
    padding: 40px 30px;
    background-color: var(--bg);
    border-radius: 40px;
    box-shadow: var(--neu-outer); /* 입체감 복구 */
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    margin: 0 10px; /* 페이지 간 간격 */
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.date { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); }

.settings-btn {
    width: 40px; height: 40px;
    background-color: var(--bg);
    border: none; border-radius: 12px;
    font-size: 1.2rem; color: var(--text-secondary);
    cursor: pointer; box-shadow: var(--neu-button);
    display: flex; justify-content: center; align-items: center;
    transition: all 0.2s ease;
}
.settings-btn:active { box-shadow: var(--neu-inner); }

.dropdown-menu {
    position: absolute; top: 55px; right: 0;
    background-color: var(--bg); border-radius: 20px;
    box-shadow: var(--neu-outer); display: none;
    z-index: 100; width: 200px; overflow: hidden;
}
.dropdown-menu.show { display: block; }

.menu-item {
    width: 100%; padding: 18px 24px; border: none; background: none;
    text-align: left; font-size: 0.9rem; font-weight: 600; cursor: pointer;
    color: var(--text-primary);
}
.menu-item:first-child { border-bottom: 1px solid rgba(0,0,0,0.02); }
.menu-item:hover { background-color: rgba(0,0,0,0.02); }

.hero { text-align: center; margin-bottom: 30px; }
.hero .label { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 8px; font-weight: 600; }
.hero .total-amount { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.5px; }

.chart-section { position: relative; flex-grow: 1; display: flex; justify-content: center; align-items: center; }
.chart-wrapper { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1/1; }
.main-svg { width: 100%; height: 100%; }
.seg { transition: stroke-dasharray 0.6s ease, stroke-dashoffset 0.6s ease; }

.color-1 { stroke: var(--color-1); color: var(--text-1); }
.color-2 { stroke: var(--color-2); color: var(--text-2); }
.color-3 { stroke: var(--color-3); color: var(--text-3); }
.color-4 { stroke: var(--color-4); color: var(--text-4); }

.leader-line { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity 0.5s; }
.leader-line.show { opacity: 0.6; }
.l1 { stroke: var(--color-1); } .l2 { stroke: var(--color-2); } .l3 { stroke: var(--color-3); } .l4 { stroke: var(--color-4); }

.chart-labels { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.label-tag { position: absolute; display: flex; flex-direction: column; opacity: 0; transition: opacity 0.5s; }
.label-tag.show { opacity: 1; }
.label-tag .name { font-size: 0.85rem; font-weight: 800; }
.label-tag .amount { font-size: 0.75rem; font-weight: 800; }

.footer { text-align: center; padding-top: 20px; }
.notice { font-size: 0.7rem; color: var(--text-secondary); font-weight: 600; }

/* 인디케이터 */
.indicators {
    display: flex; gap: 8px; margin-top: 15px; margin-bottom: 10px;
}
.dot {
    width: 8px; height: 8px; background-color: #d1d9e6; border-radius: 50%;
    transition: all 0.3s ease;
}
.dot.active {
    width: 24px; border-radius: 4px; background-color: var(--text-secondary);
}

@media (max-width: 480px) {
    .slider-container { height: 90vh; padding: 10px; }
    .page { border-radius: 35px; }
}
