/* ================================== */
/* Navbar Styles (from header.html) */
/* ================================== */
.navbar-glass {
    position: sticky; top: 0; z-index: 1070;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.navbar-glass .nav-link {
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    transition: color 0.3s ease;
}
.navbar-glass .nav-link::after {
    content: ''; position: absolute; width: 100%; height: 2px;
    bottom: 0; left: 0; background-color: #ffffff;
    transform: scaleX(0); transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}
.navbar-glass .nav-link:hover {
    color: #ffffff;
}
.navbar-glass .nav-link:hover::after {
    transform: scaleX(1); transform-origin: bottom left;
}
.navbar-glass .navbar-brand {
    display: flex;
    align-items: center;
    color: #ffffff;
    font-weight: bold;
}
.logo-image {
    width: 40px;
    height: auto;
}
.logo-text {
    margin-left: 0.75rem;
    font-size: 1.25rem;
}

/* ================================== */
/* Footer Styles (from footer.html) */
/* ================================== */
.footer-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 10;
}
.footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}
.footer-logo {
    max-width: 150px;
    height: auto;
    margin-right: 15px;
}
.footer-text {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 500;
}
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        justify-content: center;
    }
    .footer-logo {
        margin-right: 0;
        margin-bottom: 10px;
        max-width: 100px;
    }
    .footer-text {
        text-align: center;
    }
}

/* ★★★ 스티키 푸터와 반응형 레이아웃을 위한 스타일 ★★★ */
body {
    min-height: 100vh; /* 뷰포트 최소 높이를 100%로 설정 */
}

/* 헤더와 푸터를 제외한 메인 콘텐츠 영역 */
.content-wrapper {
    flex: 1; /* 남는 공간을 모두 차지하도록 설정 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================================== */
/* Common Content Card Styles       */
/* ================================== */
.content-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 2rem;
    color: white;
}

.content-card .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.content-card .form-control:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #3f9eff;
    color: white;
    box-shadow: none;
}

.content-card .form-label {
    color: rgba(255, 255, 255, 0.8);
}

/* ================================== */
/* Chatbot Styles                     */
/* ================================== */
.chatbot-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1080;
    transition: transform 0.2s ease;
}
.chatbot-fab:hover {
    transform: scale(1.1);
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    max-width: 90%;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 1080;

    /* 부드럽게 나타나고 사라지는 효과 */
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none; /* 숨겨져 있을 때 클릭 안 되게 */
}
.chat-window.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 768px) {
    .chatbot-fab {
        bottom: 24px;
        right: 0;
        left: auto;
        width: 56px;
        height: 56px;
        z-index: 1080;
        transform: none !important;
    }
    .chat-window {
        bottom: 96px;
        right: 0;
        left: 0;
        width: auto;
        height: 70vh;
        max-height: 500px;
        z-index: 1079;
    }
}

/* ================================== */
/* Train Loader Indicator              */
/* ================================== */
.train-loader {
    position: relative;
    width: 180px;
    height: 80px;
    margin: 0 auto;
}

.train-loader__skyline {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.25) 100%);
    border-radius: 50px;
    opacity: 0.6;
}

.train-loader__track {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.2);
    overflow: hidden;
}

.train-loader__track::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg,
    rgba(21,30,52,0.25) 0,
    rgba(21,30,52,0.25) 14px,
    rgba(255,255,255,0.35) 14px,
    rgba(255,255,255,0.35) 28px);
    animation: track-shift 1.4s linear infinite;
}

.train-loader__vehicle {
    position: absolute;
    bottom: 18px;
    left: -70px;
    display: flex;
    gap: 6px;
    animation: train-move 2.4s ease-in-out infinite;
}

.train-loader__car {
    width: 36px;
    height: 24px;
    background: linear-gradient(180deg, #ffd166 0%, #ff8c42 100%);
    border-radius: 5px;
    position: relative;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

.train-loader__car.engine {
    width: 42px;
    border-top-left-radius: 50% 80%;
    border-top-right-radius: 8px;
}

.train-loader__car::before,
.train-loader__car::after {
    content: '';
    position: absolute;
    bottom: -6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1b1f3b;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
    animation: wheel-spin 0.6s linear infinite;
}

.train-loader__car::before {
    left: 4px;
}

.train-loader__car::after {
    right: 4px;
}

@keyframes train-move {
    0% { transform: translateX(0); }
    50% { transform: translateX(220px); }
    100% { transform: translateX(0); }
}

@keyframes track-shift {
    from { transform: translateX(0); }
    to { transform: translateX(-56px); }
}

@keyframes wheel-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 채팅창 헤더 */
.chat-header {
    background-color: #343a40;
    color: white;
    padding: 1rem;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}
.chat-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%); /* Bootstrap 닫기 버튼을 흰색으로 변경 */
}

/* 채팅 메시지 영역 */
.chat-body {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* 메시지 말풍선 */
.chat-message {
    padding: 0.5rem 1rem;
    border-radius: 1.25rem;
    max-width: 80%;
    line-height: 1.5;
    white-space: pre-wrap; /* 줄바꿈 보존 */
    word-wrap: break-word; /* 긴 단어 줄바꿈 */
}
.chat-message.bot {
    background-color: #e9ecef;
    color: #343a40;
    border-top-left-radius: 0;
    align-self: flex-start; /* 봇 메시지는 왼쪽에 */
}
.chat-message.user {
    background-color: #0d6efd;
    color: white;
    border-top-right-radius: 0;
    align-self: flex-end; /* 사용자 메시지는 오른쪽에 */
}

/* 메시지 입력창 */
.chat-input {
    display: flex;
    border-top: 1px solid #dee2e6;
    padding: 0.5rem;
}
.chat-input input {
    flex-grow: 1;
    border: none;
    padding: 0.75rem;
    outline: none;
    font-size: 1rem;
}
.chat-input button {
    border: none;
    background-color: #0d6efd;
    color: white;
    font-weight: bold;
    padding: 0.75rem 1.25rem;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: background-color 0.2s ease;
}
.chat-input button:hover {
    background-color: #0b5ed7;
}
