/* 전역 스타일 */
body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ASCII Art 스타일 */
.ascii-art {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    line-height: 1.2;
    color: #6c757d;
    overflow-x: auto;
}

/* 카드 호버 효과 */
.hover-shadow {
    transition: all 0.3s ease;
    cursor: pointer;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 열차 아이템 스타일 */
.train-item {
    transition: all 0.2s ease;
}

.train-item:hover {
    background-color: #f8f9fa;
}

.train-item .form-check-input:checked ~ .form-check-label {
    background-color: #e7f3ff;
}

/* 로딩 오버레이 */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 알림 컨테이너 */
#alert-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.alert {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 배지 스타일 */
.badge {
    font-weight: 500;
}

/* 푸터 스타일 */
.footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* 반응형 */
@media (max-width: 768px) {
    .ascii-art {
        font-size: 0.4rem;
    }
    
    #alert-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* 버튼 그룹 활성 상태 */
.btn-group .btn.active {
    font-weight: bold;
}

/* 카드 헤더 아이콘 */
.card-header i {
    margin-right: 0.5rem;
}

/* 폼 레이블 */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* 체크박스 크기 조정 */
.form-check-input {
    width: 1.2em;
    height: 1.2em;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    padding-left: 0.5rem;
}

/* 모달 오버레이 */
.modal-backdrop.show {
    opacity: 0.7;
}

/* 성공/실패 색상 */
.text-available {
    color: #28a745;
    font-weight: bold;
}

.text-soldout {
    color: #dc3545;
    font-weight: bold;
}

/* 네비게이션 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

/* 로딩 애니메이션 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* 입력 필드 포커스 */
.form-control:focus,
.form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 텍스트 선택 색상 */
::selection {
    background-color: #007bff;
    color: white;
}

::-moz-selection {
    background-color: #007bff;
    color: white;
}

/* 스크롤바 스타일 (Webkit) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 버튼 호버 효과 */
.btn {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

/* 카드 그림자 */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* 링크 스타일 */
a {
    text-decoration: none;
    color: #007bff;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 테이블 반응형 */
.table-responsive {
    overflow-x: auto;
}

/* 사용자 정의 체크박스 */
.custom-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* 툴팁 */
.tooltip-inner {
    max-width: 300px;
    text-align: left;
}

/* 프로그레스 바 */
.progress {
    height: 1.5rem;
}

.progress-bar {
    font-size: 0.9rem;
}
