/* 비디오 다운로더 커스텀 스타일 */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

/* 전체 레이아웃 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* 네비게이션 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.4rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* 카드 스타일 */
.card {
    border: none;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* 입력 필드 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control-lg {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

.input-group .btn {
    border-color: #ced4da;
}

/* 버튼 스타일 */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* 진행률 바 */
.progress {
    border-radius: 1rem;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.3s ease;
    border-radius: 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

/* 비디오 정보 카드 */
#video-info-card img {
    max-height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
}

#video-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    line-height: 1.4;
}

/* 상태 카드 */
.card.border-success {
    border-width: 2px !important;
}

.card.border-danger {
    border-width: 2px !important;
}

/* 아이콘 스타일 */
.bi {
    vertical-align: -0.125em;
}

/* 로딩 스피너 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 토스트 알림 */
.toast {
    min-width: 300px;
}

.toast-header {
    background-color: rgba(13, 110, 253, 0.1);
    border-bottom: 1px solid rgba(13, 110, 253, 0.2);
}

/* 모달 */
.modal-header {
    background-color: var(--light-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.modal-title {
    font-weight: 600;
}

/* 히스토리 테이블 */
.history-item {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.3s ease;
}

.history-item:hover {
    background-color: var(--light-color);
}

.file-size {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--info-color);
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

.bounce {
    animation: bounce 1s ease;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    #video-info-card .row {
        text-align: center;
    }
    
    #video-info-card .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .d-grid.gap-2.d-md-flex {
        gap: 0.5rem !important;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
}

/* 다크 모드 지원 (선택사항) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .card {
        background-color: #2d2d2d;
        color: #ffffff;
    }
    
    .form-control {
        background-color: #3d3d3d;
        border-color: #555555;
        color: #ffffff;
    }
    
    .form-control:focus {
        background-color: #3d3d3d;
        color: #ffffff;
    }
}

/* 추가 유틸리티 클래스 */
.text-primary-light {
    color: rgba(13, 110, 253, 0.7) !important;
}

.bg-primary-light {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.border-primary-light {
    border-color: rgba(13, 110, 253, 0.3) !important;
}

/* 파일 크기 표시 */
.file-info {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.85rem;
    background-color: rgba(108, 117, 125, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* 상태 배지 */
.status-badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border-radius: 50rem;
}

/* 커스텀 그림자 */
.shadow-custom {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* 호버 효과 */
.hover-lift {
    transition: transform 0.15s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* 성공/에러 상태 아이콘 */
.status-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.status-icon.success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
}

.status-icon.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}