:root {
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #212529;
    --text-sub: #6c757d;
    --primary: #4a90e2;
    --primary-soft: rgba(74, 144, 226, 0.1);
    --border: #e9ecef;
    --sun: #ff4d4f;
    --sat: #1890ff;
    --success: #52c41a;
    --error: #ff4d4f;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-main: #e9ecef;
    --text-sub: #adb5bd;
    --border: #333333;
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    font-size: 17px;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.main-title { font-size: 1.25rem; font-weight: 800; margin: 0; }

/* 조건 가이드 스타일 */
.condition-guide {
    background: var(--primary-soft);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--primary);
}

.guide-title {
    font-size: 1.1rem; /* 달력 헤더 크기와 맞춤 */
    margin: 0 0 10px 0;
    font-weight: 800;
    color: var(--text-main);
}

.condition-guide p {
    margin: 5px 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-main);
}

/* 달력 */
.calendar-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-header {
    grid-column: span 7;
    font-weight: 700;
    padding: 10px 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.day-header { text-align: center; font-size: 0.75rem; padding: 5px 0; color: var(--text-sub); }
.day {
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 10px;
    font-size: 0.95rem;
}

.day.selected { background: var(--primary) !important; color: white !important; font-weight: bold; }
.day.today { border: 2px solid var(--primary); font-weight: bold; }
.day.other-month { opacity: 0.2; pointer-events: none; }
.sun { color: var(--sun); }
.sat { color: var(--sat); }

/* 데이터 요약 세로 나열 */
.data-summary {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 5px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.data-row:last-child { border-bottom: none; }
.data-row.highlight .value { color: var(--primary); font-size: 1.2rem; }
.data-row .label { color: var(--text-sub); font-weight: 600; }
.data-row .value { font-weight: 800; }

/* 결과창 */
.result-box {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 15px;
    border: 2px solid var(--border);
}

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

.result-header h3 { margin: 0; font-size: 1.05rem; }
.final-badge { padding: 4px 12px; border-radius: 12px; font-size: 0.85rem; font-weight: 700; background: #eee; }

.eligible { border-color: var(--success); }
.not-eligible { border-color: var(--error); }
.eligible .final-badge { background: var(--success); color: white; }
.not-eligible .final-badge { background: var(--error); color: white; }

.next-date { font-size: 0.9rem; color: var(--text-sub); margin: 0; }

.app-footer { margin-top: auto; padding: 20px 0; text-align: center; }
.disclaimer { font-size: 0.8rem; color: var(--text-sub); margin-bottom: 15px; }
.reset-btn { 
    width: 100%; 
    padding: 16px; 
    border-radius: 15px; 
    border: none; 
    background: var(--border); 
    color: var(--text-main);
    font-weight: 700; 
    font-size: 1.1rem; 
    cursor: pointer; 
}
