/* 기본 폰트 크기 상향 및 배경 설정 */
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    margin: 0;
    font-size: 18px; /* 기본 폰트 크기 크게 조정 */
}

/* 메인 컨테이너 너비 확장 */
.todo-container {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 600px; /* 조금 더 넉넉하게 확장 */
}

h2 {
    color: #1a1a1a;
    font-size: 1.8rem; /* 제목 크게 */
    margin-bottom: 25px;
    border-left: 5px solid #4a90e2;
    padding-left: 15px;
}

/* 입력 폼 디자인 */
.input-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
}

.input-form label {
    font-size: 1rem; /* 라벨 크기 상향 */
    font-weight: 700;
    color: #444;
    grid-column: span 2;
}

/* 입력창 크기 및 폰트 상향 */
input, textarea {
    padding: 15px;
    border: 2px solid #e1e4e8; /* 테두리 조금 더 두껍게 */
    border-radius: 12px;
    font-size: 1.1rem; /* 입력 글자 크기 상향 */
    transition: all 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #4a90e2;
    background: #fff;
}

#memo {
    grid-column: span 2;
    height: 120px;
}

/* 메인 추가 버튼 크게 */
button[onclick="addSchedule()"] {
    grid-column: span 2;
    padding: 18px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.2rem; /* 버튼 글자 크게 */
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* 검색 및 리스트 헤더 */
.list-header {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#search-input {
    flex: 1;
    padding: 15px;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 2px solid #e1e4e8;
}

.view-btn {
    background: #34c759;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
}

/* 일정 아이템 카드 디자인 (가독성 위주) */
.schedule-item {
    background: #ffffff;
    border: 2px solid #f0f0f0;
    padding: 25px;
    border-radius: 18px;
    margin-bottom: 20px;
    list-style: none;
    line-height: 1.6; /* 줄 간격 넓게 */
    font-size: 1.1rem;
}

.schedule-item strong {
    display: block;
    font-size: 1.3rem; /* 날짜 제목 크게 */
    color: #4a90e2;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* 카드 내 버튼 크기 조절 */
.edit-btn, .delete-btn {
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.edit-btn { background: #e9ecef; color: #495057; margin-right: 10px; }
.delete-btn { background: #ffe3e3; color: #ff4d4d; }
/* 화면 너비가 600px보다 작을 때 (모바일 기기 등) 적용되는 규칙 */
@media (max-width: 600px) {
    .todo-container {
        padding: 20px; /* 여백을 조금 줄여서 화면을 넓게 씀 */
        border-radius: 0; /* 모바일에서는 꽉 차게 보이도록 굴곡 제거 가능 */
    }

    .input-form {
        grid-template-columns: 1fr; /* 2열에서 1열로 변경 */
        gap: 15px;
    }

    /* 모든 입력창과 버튼을 한 줄씩 차지하게 만듦 */
    #date, #location, #end-time, #teammates, #memo, button[onclick="addSchedule()"] {
        grid-column: span 1;
    }

    h2 {
        font-size: 1.5rem;
    }

    .list-header {
        align-items: stretch; /* 검색창과 버튼을 가로로 꽉 채움 */
    }

    .search-group {
        flex-direction: column; /* 검색창과 버튼도 세로로 배치 */
    }

    #search-input {
        width: auto; /* 너비 자동 조절 */
    }
}
