/* 기본 스타일 초기화 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 중앙 정렬 및 최대 너비 설정 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0;
}

/* ================== Header 스타일 ================== */
#header {
    /* 배경색 변경: 짙은 보라색 (#582c83) */
    background: #582c83;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.8em;
    font-weight: bold;
}

/* 검색 버튼의 색상도 헤더 배경색에 맞춰 어둡게 조정 */
.search-form input[type="text"] {
    padding: 8px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1em;
}

.search-form button {
    padding: 8px 15px;
    /* 버튼 배경색 조정 */
    background: #3c1e57; 
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.search-form button:hover {
    background: #28143d;
}

/* ================== Content 스타일 ================== */
#content {
    flex: 1; 
    padding: 40px 0;
}

.search-results {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.search-results h2 {
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.result-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
}

.result-item h3 {
    color: #c0392b;
    margin-bottom: 15px;
}

/* JPG + TXT 파일 쌍을 위한 레이아웃 */
.item-content-pair {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.image-area {
    flex: 1; 
    max-width: 300px;
}

.image-area img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.text-area {
    flex: 2; 
}

.text-area h4 {
    margin-bottom: 8px;
    color: #34495e;
}

.text-area pre {
    white-space: pre-wrap; 
    background-color: #ecf0f1;
    border: 1px solid #bdc3c7;
    padding: 15px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #2c3e50;
}

/* ================== Footer 스타일 ================== */
#footer {
    /* 배경색 변경: 회색 (#808080) */
    background: #808080;
    color: white;
    padding: 20px 0;
    text-align: center;
}

#footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.copyright {
    margin-bottom: 10px;
    font-size: 0.9em;
}

.footer-links a {
    color: #e0e0e0; /* 링크 색상 조정 */
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.9em;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

/* 현재 시간 글자색 변경 (추가된 스타일) */
.current-time {
    color: #fff000; /* 밝은 노란색 */
    font-weight: bold;
    margin-bottom: 5px;
}

/* 검색 결과 내 URL 링크 스타일 (추가) */
.result-link {
    margin: 10px 0;
    font-size: 0.95em;
    font-weight: bold;
}

.result-link a {
    color: #3498db; /* 파란색 링크 */
    text-decoration: none;
    transition: color 0.3s;
}

.result-link a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 전체 목록 보기 버튼 스타일 (추가) */
.show-all-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f39c12; /* 주황색 계열 */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.show-all-btn:hover {
    background-color: #e67e22;
}

/* PDF 링크 스타일 (새로 추가) */
.pdf-link {
    margin: 10px 0;
    font-size: 0.95em;
    font-weight: bold;
}

.pdf-link a {
    color: #e74c3c; /* 붉은색 계열 */
    text-decoration: none;
    transition: color 0.3s;
}

.pdf-link a:hover {
    color: #c0392b;
    text-decoration: underline;
}
