/* ============ 메인 CSS ============ */

/* 기본 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 버튼 스타일 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 카드 스타일 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background-color: #f8f9fa;
}

/* 폼 스타일 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 그리드 시스템 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col {
    flex: 1;
    padding: 0 10px;
}

.col-1 {
    flex: 0 0 8.333333%;
}

.col-2 {
    flex: 0 0 16.666667%;
}

.col-3 {
    flex: 0 0 25%;
}

.col-4 {
    flex: 0 0 33.333333%;
}

.col-6 {
    flex: 0 0 50%;
}

.col-8 {
    flex: 0 0 66.666667%;
}

.col-9 {
    flex: 0 0 75%;
}

.col-12 {
    flex: 0 0 100%;
}

/* 유틸리티 클래스 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.d-inline {
    display: inline;
}

.d-inline-block {
    display: inline-block;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-around {
    justify-content: space-around;
}

.align-items-center {
    align-items: center;
}

.align-items-start {
    align-items: flex-start;
}

.align-items-end {
    align-items: flex-end;
}

.flex-column {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.m-0 {
    margin: 0;
}

.m-1 {
    margin: 5px;
}

.m-2 {
    margin: 10px;
}

.m-3 {
    margin: 15px;
}

.m-4 {
    margin: 20px;
}

.m-5 {
    margin: 25px;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 5px;
}

.p-2 {
    padding: 10px;
}

.p-3 {
    padding: 15px;
}

.p-4 {
    padding: 20px;
}

.p-5 {
    padding: 25px;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 5px;
}

.mt-2 {
    margin-top: 10px;
}

.mt-3 {
    margin-top: 15px;
}

.mt-4 {
    margin-top: 20px;
}

.mt-5 {
    margin-top: 25px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 5px;
}

.mb-2 {
    margin-bottom: 10px;
}

.mb-3 {
    margin-bottom: 15px;
}

.mb-4 {
    margin-bottom: 20px;
}

.mb-5 {
    margin-bottom: 25px;
}

.ml-0 {
    margin-left: 0;
}

.ml-1 {
    margin-left: 5px;
}

.ml-2 {
    margin-left: 10px;
}

.ml-3 {
    margin-left: 15px;
}

.ml-4 {
    margin-left: 20px;
}

.ml-5 {
    margin-left: 25px;
}

.mr-0 {
    margin-right: 0;
}

.mr-1 {
    margin-right: 5px;
}

.mr-2 {
    margin-right: 10px;
}

.mr-3 {
    margin-right: 15px;
}

.mr-4 {
    margin-right: 20px;
}

.mr-5 {
    margin-right: 25px;
}

.pt-0 {
    padding-top: 0;
}

.pt-1 {
    padding-top: 5px;
}

.pt-2 {
    padding-top: 10px;
}

.pt-3 {
    padding-top: 15px;
}

.pt-4 {
    padding-top: 20px;
}

.pt-5 {
    padding-top: 25px;
}

.pb-0 {
    padding-bottom: 0;
}

.pb-1 {
    padding-bottom: 5px;
}

.pb-2 {
    padding-bottom: 10px;
}

.pb-3 {
    padding-bottom: 15px;
}

.pb-4 {
    padding-bottom: 20px;
}

.pb-5 {
    padding-bottom: 25px;
}

.pl-0 {
    padding-left: 0;
}

.pl-1 {
    padding-left: 5px;
}

.pl-2 {
    padding-left: 10px;
}

.pl-3 {
    padding-left: 15px;
}

.pl-4 {
    padding-left: 20px;
}

.pl-5 {
    padding-left: 25px;
}

.pr-0 {
    padding-right: 0;
}

.pr-1 {
    padding-right: 5px;
}

.pr-2 {
    padding-right: 10px;
}

.pr-3 {
    padding-right: 15px;
}

.pr-4 {
    padding-right: 20px;
}

.pr-5 {
    padding-right: 25px;
}

/* 색상 클래스 */
.text-primary {
    color: #007bff;
}

.text-secondary {
    color: #6c757d;
}

.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

.text-warning {
    color: #ffc107;
}

.text-info {
    color: #17a2b8;
}

.text-light {
    color: #f8f9fa;
}

.text-dark {
    color: #343a40;
}

.text-muted {
    color: #6c757d;
}

.bg-primary {
    background-color: #007bff;
}

.bg-secondary {
    background-color: #6c757d;
}

.bg-success {
    background-color: #28a745;
}

.bg-danger {
    background-color: #dc3545;
}

.bg-warning {
    background-color: #ffc107;
}

.bg-info {
    background-color: #17a2b8;
}

.bg-light {
    background-color: #f8f9fa;
}

.bg-dark {
    background-color: #343a40;
}

/* 반응형 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .row {
        margin: 0 -5px;
    }

    .col {
        padding: 0 5px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .card-body {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .card-body {
        padding: 10px;
    }
}

/* ============ 로딩 스크린 ============ */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 동영상 배지 - 좌측 하단 */
.video-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    width: 24px;
    height: 24px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}