/* 전체 페이지 레이아웃 */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 제목 */
h1 {
    text-align: center;
    color: #00509e;
    font-size: 1.8em;
    margin-bottom: 30px;
}

/* 공유 버튼 및 카운트다운 */
#countdown, #shareButton {
    position: fixed;
    top: 16px;
    font-size: 0.9em;
    color: #666;
    background-color: #f9f9f9;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    z-index: 100;
}

#countdown {
    right: 16px;
}

#shareButton {
    left: 16px;
    cursor: pointer;
}

/* 검색 영역 */
.search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
}

#lineSelect,
input[type="text"],
.search-container button {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 1em;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    box-sizing: border-box;
}

/* 노선 선택창 */
#lineSelect {
    flex: 0 0 auto;
    min-width: 100px;
}

/* 역명 입력창 */
input[type="text"] {
    flex: 0 0 auto;
    min-width: 160px;
}

/* 검색 버튼 */
.search-container button {
    background-color: #00509e;
    color: #fff;
    border: none;
    cursor: pointer;
    flex: 0 0 auto;
    min-width: 80px;
}

.search-container button:hover {
    background-color: #003f7d;
}

/* 결과 출력 영역 */
#result {
    width: 100%;
    max-width: 600px;
    margin-top: 20px;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    margin-bottom: 12px;
    font-size: 1em;
    line-height: 1.5;
    padding: 14px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* 강조 정보 */
.express, .first-last-train {
    color: #d40000;
    font-weight: bold;
}

/* 토스트 메시지 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    z-index: 1000;
    transition: opacity 0.5s ease-in-out;
}

.toast.fade-out {
    opacity: 0;
}

/* 푸터 스타일 */
footer {
    margin-top: 20px;
    background-color: #f8f8f8;
    text-align: center;
    font-size: 10px;
    padding: 5px;
    border-top: 1px solid #ddd;
}

footer a {
    color: #333;
}

/* 반응형 처리 */
@media (max-width: 480px) {
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }

    #lineSelect,
    input[type="text"],
    .search-container button {
        width: 100%;
    }

    #countdown,
    #shareButton {
        font-size: 0.8em;
        padding: 6px 10px;
    }
}
