/* styles.css */

/* ==========================================================================
   Base & Typography
   ========================================================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f6; /* 부드러운 배경색 */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* header, main, footer 수직 정렬 */
    min-height: 100vh; /* 최소 높이를 화면 전체로 */
}

h1 {
    font-weight: 600; /* 약간 굵게 */
    color: #ffffff; /* 헤더 색상 */
}

h2 {
    font-weight: 600; /* 약간 굵게 */
    color: #2c3e50; /* 헤더 색상 */
}

a {
    color: #3498db; /* 링크 색상 */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #2980b9; /* 호버 시 링크 색상 */
    text-decoration: underline;
}

/* ==========================================================================
   Header
   ========================================================================== */
header {
    background-color: #2c3e50; /* 헤더 배경색 */
    color: white;
    padding: 20px 40px; /* 상하, 좌우 패딩 */
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2em; /* 제목 크기 */
    letter-spacing: 1px; /* 글자 간격 */
}

/* ==========================================================================
   Main Content
   ========================================================================== */
main {
    flex-grow: 1; /* 남은 공간을 모두 차지하여 footer를 아래로 밀어냄 */
    padding: 30px 20px; /* 메인 콘텐츠 영역 패딩 */
    max-width: 900px; /* 콘텐츠 최대 너비 (중앙 정렬 효과) */
    width: 100%;
    margin: 0 auto; /* 가로 중앙 정렬 */
    box-sizing: border-box;
}

section#file-list {
    background-color: #ffffff; /* 섹션 배경 흰색 */
    padding: 25px;
    border-radius: 8px; /* 모서리 둥글게 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* 부드러운 그림자 */
}

section#file-list h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.6em;
    border-bottom: 2px solid #ecf0f1; /* 제목 아래 구분선 */
    padding-bottom: 10px;
}

section#file-list ul {
    list-style: none; /* 기본 목록 스타일 제거 */
    padding: 0;
    margin: 0;
}

section#file-list li {
    padding: 12px 0; /* 목록 아이템 상하 패딩 */
    border-bottom: 1px dashed #e0e0e0; /* 아이템 구분선 (점선) */
    transition: background-color 0.2s ease;
}

section#file-list li:last-child {
    border-bottom: none; /* 마지막 아이템 구분선 제거 */
}

section#file-list li a {
    font-size: 1.1em; /* 링크 폰트 크기 */
    font-weight: 500; /* 약간 굵게 */
    display: block; /* 링크 영역을 전체로 확장 */
    padding: 5px; /* 클릭 영역 확보 */
    border-radius: 4px; /* 링크 영역에도 약간의 둥근 모서리 */
}

section#file-list li a:hover {
    background-color: #f9f9f9; /* 링크 호버 시 배경색 */
    color: #1a5276; /* 링크 호버 시 글자색 */
    text-decoration: none; /* 호버 시 밑줄은 제거 (배경색으로 구분) */
}


/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: #34495e; /* 푸터 배경색 */
    color: #ecf0f1; /* 푸터 글자색 */
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    /* margin-top: auto;  main에 flex-grow:1이 있으므로 자동 하단 정렬 */
}

footer p {
    margin: 0;
}

/* ==========================================================================
   Responsive (Optional - 간단한 예시)
   ========================================================================== */
@media (max-width: 600px) {
    header {
        padding: 15px 20px;
    }
    header h1 {
        font-size: 1.6em;
    }
    main {
        padding: 20px 15px;
    }
    section#file-list h2 {
        font-size: 1.4em;
    }
    section#file-list li a {
        font-size: 1em;
    }
}