/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 헤더 스타일 */
.header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.header h1 i {
    color: #3498db;
    margin-right: 15px;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 25px;
    font-weight: 400;
}

/* 전체 진행률 표시 */
.progress-overview {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: linear-gradient(90deg, #4CAF50, #45a049);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

/* 메인 콘텐츠 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 체크리스트 섹션 */
.checklist-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.checklist-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* 섹션 헤더 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f4;
}

.section-header h2 {
    font-size: 1.4rem;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.section-header h2 i {
    margin-right: 12px;
    color: #3498db;
    font-size: 1.2rem;
}

/* 섹션별 진행률 */
.section-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: #7f8c8d;
    min-width: 60px;
    text-align: right;
}

.section-progress-bar {
    width: 80px;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.section-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* 서브섹션 */
.subsection {
    margin-bottom: 30px;
}

.subsection:last-child {
    margin-bottom: 0;
}

.subsection h3 {
    font-size: 1.1rem;
    color: #34495e;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.subsection h3 i {
    margin-right: 8px;
    color: #e74c3c;
    font-size: 1rem;
}

/* 체크리스트 아이템들 */
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checklist-item {
    position: relative;
    transition: all 0.2s ease;
}

.checklist-item:hover {
    transform: translateX(5px);
}

.checklist-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checklist-item label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    user-select: none;
}

.checklist-item label:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.checklist-item input[type="checkbox"]:checked + label {
    background: #d4edda;
    border-color: #4CAF50;
}

.checklist-item input[type="checkbox"]:checked + label .item-text {
    text-decoration: line-through;
    color: #6c757d;
}

/* 커스텀 체크박스 */
.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 12px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checklist-item input[type="checkbox"]:checked + label .checkbox-custom {
    background: #4CAF50;
    border-color: #4CAF50;
}

.checklist-item input[type="checkbox"]:checked + label .checkbox-custom::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* 아이템 텍스트 */
.item-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #2c3e50;
}

/* 액션 버튼들 */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .section-progress {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .section-progress-bar {
        flex: 1;
        margin-left: 15px;
        width: auto;
    }
    
    .checklist-section {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header h1 i {
        margin-right: 8px;
    }
    
    .checklist-item label {
        padding: 10px 12px;
    }
    
    .item-text {
        font-size: 0.9rem;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
}

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

.checklist-section {
    animation: fadeIn 0.6s ease forwards;
}

.checklist-section:nth-child(1) { animation-delay: 0.1s; }
.checklist-section:nth-child(2) { animation-delay: 0.2s; }
.checklist-section:nth-child(3) { animation-delay: 0.3s; }
.checklist-section:nth-child(4) { animation-delay: 0.4s; }
.checklist-section:nth-child(5) { animation-delay: 0.5s; }
.checklist-section:nth-child(6) { animation-delay: 0.6s; }

/* 체크된 항목에 대한 시각적 피드백 강화 */
.checklist-item input[type="checkbox"]:checked + label {
    animation: checkAnimation 0.3s ease;
}

@keyframes checkAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}