/* Video Library Frontend Styles */

:root {
    --yvl-primary: #0d6efd;
    --yvl-secondary: #6c757d;
    --yvl-success: #198754;
    --yvl-danger: #dc3545;
    --yvl-border: #dee2e6;
}

/* ====== CARD STYLES ====== */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    line-height: 1.4;
}

/* ====== CAROUSEL CONTROLS ====== */
.carousel-control-prev,
.carousel-control-next {
    opacity: 1;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 0.8;
}

.carousel-control-prev:hover i,
.carousel-control-next:hover i {
    transform: scale(1.1);
}

/* ====== BUTTONS ====== */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
    transform: translateY(-2px);
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
    transition: all 0.2s ease;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #157347;
    transform: translateY(-2px);
}

.rounded-pill {
    border-radius: 50rem;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .card-title {
        font-size: 0.9rem;
    }

    .card-text {
        font-size: 0.85rem;
    }

    .btn {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    .btn-sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ====== ARCHIVE PAGE ====== */
.yvl-archive-container {
    background-color: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.yvl-archive-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #212529;
}

.yvl-archive-description {
    font-size: 1.1rem;
    color: #6c757d;
}

/* ====== SEARCH SECTION ====== */
.yvl-search-section {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.yvl-search-input {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border-color: var(--yvl-border);
    transition: all 0.3s ease;
}

.yvl-search-input:focus {
    border-color: var(--yvl-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.yvl-category-filter,
.yvl-tag-filter {
    font-size: 1rem;
    border-color: var(--yvl-border);
    transition: all 0.3s ease;
}

.yvl-category-filter:focus,
.yvl-tag-filter:focus {
    border-color: var(--yvl-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
    border-color: var(--yvl-border);
    color: #6c757d;
}

/* ====== PAGINATION ====== */
.pagination {
    gap: 0.5rem;
}

.page-link {
    border-radius: 0.35rem;
    color: var(--yvl-primary);
    border-color: var(--yvl-border);
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: var(--yvl-primary);
    border-color: var(--yvl-primary);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--yvl-primary);
    border-color: var(--yvl-primary);
}

/* ====== ALERTS ====== */
.alert {
    border-radius: 0.5rem;
}

.alert-info {
    background-color: #cfe2ff;
    border: 1px solid #b6d4fe;
    color: #084298;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffecb5;
    color: #664d03;
}

.alert-success {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

/* ====== SPINNER ====== */
.spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.25em;
}

/* ====== SINGLE VIDEO PAGE ====== */
.yvl-single-video {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.yvl-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #212529;
}

.yvl-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    background-color: #000;
}

.yvl-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ====== SIDEBAR ====== */
.yvl-sidebar {
    position: sticky;
    top: 20px;
}

.yvl-sidebar .card {
    border: 1px solid var(--yvl-border);
    border-radius: 0.5rem;
}

/* ====== UTILITY CLASSES ====== */
.bg-light {
    background-color: #f8f9fa;
}

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

.fw-bold {
    font-weight: 700;
}

.h-100 {
    height: 100%;
}

.w-100 {
    width: 100%;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1200px) {
    .yvl-title {
        font-size: 2rem;
    }

    .yvl-archive-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .yvl-single-video {
        padding: 1rem;
    }

    .yvl-title {
        font-size: 1.75rem;
    }

    .yvl-archive-title {
        font-size: 1.75rem;
    }

    .yvl-search-section {
        padding: 1.5rem;
    }

    .yvl-sidebar {
        position: static;
        top: auto;
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .yvl-search-section {
        padding: 1rem;
    }

    .yvl-single-video {
        padding: 0.75rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    .h2 {
        font-size: 1.5rem;
    }

    .fs-6 {
        font-size: 0.95rem;
    }
}

/* ====== LOADING STATES ====== */
.yvl-loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ====== TRANSITIONS ====== */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}