/* =========================================================
   STING WEB - VIDEOS MODULE STYLES
   Harmonized with site design system and YSscores style
   ========================================================= */

.video-page-container {
    max-width: var(--Max-Size, 1180px);
    width: 93%;
    margin: 20px auto 40px auto;
}

/* Page Header & Breadcrumb */
.video-top-header {
    background: var(--B-Color, #151b26);
    border: 1px solid var(--Border-Color, rgba(255, 255, 255, 0.07));
    border-radius: var(--Card-Radius, 14px);
    padding: 22px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.video-top-header-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-top-header-right h2 {
    color: var(--Primary-A-Color, #00dfa2);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-top-header-right .video-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(0, 223, 162, 0.12);
    border-radius: 999px;
}

.video-top-header-path {
    display: flex;
    gap: 8px;
    font-size: 14px;
    color: var(--Primary-C-Color, #8e9ab2);
}

.video-top-header-path a {
    color: var(--Primary-E-Color, #c8d3e6);
    transition: color 0.2s;
}

.video-top-header-path a:hover {
    color: var(--Primary-A-Color, #00dfa2);
}

/* Categories Bar */
.video-categories-container {
    position: relative;
    margin-bottom: 25px;
    background: var(--B-Color, #151b26);
    border: 1px solid var(--Border-Color, rgba(255, 255, 255, 0.07));
    border-radius: var(--Card-Radius, 14px);
    padding: 10px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.video-categories-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 223, 162, 0.3) transparent;
    padding: 4px 2px 8px 2px;
}

.video-categories-scroll::-webkit-scrollbar {
    height: 4px;
}

.video-categories-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.video-categories-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 223, 162, 0.25);
    border-radius: 4px;
}

.video-categories-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--Primary-A-Color, #00dfa2);
}

.tag-item.champ_v {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--Primary-E-Color, #c8d3e6);
    background: #1a2232;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    user-select: none;
    transition: all 0.25s ease;
    text-decoration: none;
    outline: none;
}

.tag-item.champ_v:hover {
    color: var(--Primary-A-Color, #00dfa2);
    border-color: rgba(0, 223, 162, 0.35);
    background: rgba(0, 223, 162, 0.08);
    transform: translateY(-1px);
}

.tag-item.champ_v.active {
    color: #0c1017;
    background: var(--Primary-A-Color, #00dfa2);
    border-color: var(--Primary-A-Color, #00dfa2);
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 223, 162, 0.35);
}

/* Videos Grid */
.videos-grid-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 25px;
}

@media (max-width: 1024px) {
    .videos-grid-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .videos-grid-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .video-page-container {
        width: 95%;
        margin-top: 10px;
    }
    .video-top-header {
        padding: 16px;
        margin-bottom: 15px;
    }
    .video-top-header-right h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .videos-grid-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Video Card Item */
.video-card-item {
    display: flex;
    flex-direction: column;
    background: var(--B-Color, #151b26);
    border: 1px solid var(--Border-Color, rgba(255, 255, 255, 0.07));
    border-radius: var(--Card-Radius, 14px);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.video-card-item:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 223, 162, 0.35);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

/* Thumbnail Wrap */
.video-thumb-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 ratio */
    background: #0c1017;
    overflow: hidden;
}

.video-thumb-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.video-card-item:hover .video-thumb-wrap img {
    transform: scale(1.06);
}

/* Play Badge Overlay */
.video-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(12, 16, 23, 0.75);
    backdrop-filter: blur(6px);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 2;
}

.video-play-badge svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    margin-left: 2px;
    transition: fill 0.25s ease;
}

[dir="rtl"] .video-play-badge svg {
    margin-left: 0;
    margin-right: 2px;
}

.video-card-item:hover .video-play-badge {
    background: var(--Primary-A-Color, #00dfa2);
    border-color: var(--Primary-A-Color, #00dfa2);
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 0 0 20px rgba(0, 223, 162, 0.5);
}

.video-card-item:hover .video-play-badge svg {
    fill: #0c1017;
}

/* Time Badge */
.video-time-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(12, 16, 23, 0.82);
    backdrop-filter: blur(4px);
    color: #e0e0e0;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[dir="rtl"] .video-time-badge {
    right: auto;
    left: 8px;
}

/* Card Body */
.video-card-body {
    padding: 12px 14px 14px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.video-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--Primary-B-Color, #ffffff);
    line-height: 1.45;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.video-card-item:hover .video-card-title {
    color: var(--Primary-A-Color, #00dfa2);
}

.video-card-meta {
    font-size: 12px;
    color: var(--Primary-C-Color, #8e9ab2);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Show More Container & Button */
.video-more-container {
    text-align: center;
    margin: 25px 0 50px 0;
    display: flex;
    justify-content: center;
}

.btn-show-more-videos {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--B-Color, #151b26);
    border: 1.5px solid rgba(0, 223, 162, 0.35);
    color: var(--Primary-A-Color, #00dfa2);
    padding: 12px 36px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    outline: none;
}

.btn-show-more-videos:hover {
    background: var(--Primary-A-Color, #00dfa2);
    color: #0c1017;
    border-color: var(--Primary-A-Color, #00dfa2);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0, 223, 162, 0.35);
}

.btn-show-more-videos:active {
    transform: translateY(0);
}

.btn-show-more-videos:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-show-more-videos .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(0, 223, 162, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-show-more-videos.loading .spinner {
    display: inline-block;
}

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

/* Skeleton / Shimmer Loading State */
.video-skeleton-card {
    background: var(--B-Color, #151b26);
    border: 1px solid var(--Border-Color, rgba(255, 255, 255, 0.05));
    border-radius: var(--Card-Radius, 14px);
    overflow: hidden;
}

.video-skeleton-thumb {
    width: 100%;
    padding-top: 56.25%;
    background: linear-gradient(90deg, #151b26 25%, #1e2638 50%, #151b26 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.video-skeleton-body {
    padding: 14px;
}

.video-skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #151b26 25%, #1e2638 50%, #151b26 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 8px;
}

.video-skeleton-line.short {
    width: 60%;
    margin-bottom: 0;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty State */
.video-empty-box {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--B-Color, #151b26);
    border-radius: var(--Card-Radius, 14px);
    border: 1px solid var(--Border-Color, rgba(255, 255, 255, 0.07));
}

.video-empty-box svg {
    width: 64px;
    height: 64px;
    fill: var(--Primary-C-Color, #8e9ab2);
    margin-bottom: 16px;
    opacity: 0.6;
}

.video-empty-box h3 {
    color: var(--Primary-E-Color, #c8d3e6);
    font-size: 18px;
    margin-bottom: 8px;
}

.video-empty-box p {
    color: var(--Primary-C-Color, #8e9ab2);
    font-size: 14px;
}

/* Video Modal Player */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 16, 23, 0.88);
    backdrop-filter: blur(12px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.video-modal-dialog {
    width: 100%;
    max-width: 880px;
    background: #151b26;
    border: 1px solid rgba(0, 223, 162, 0.3);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.video-modal-overlay.active .video-modal-dialog {
    transform: scale(1);
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #182030;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.video-modal-header h3 {
    font-size: 15px;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 15px;
}

[dir="rtl"] .video-modal-header h3 {
    padding-right: 0;
    padding-left: 15px;
}

.video-modal-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.video-modal-close-btn:hover {
    background: #ff4757;
    transform: rotate(90deg);
}

.video-modal-body {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #0c1017;
}

.video-modal-body iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #151b26;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.video-modal-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--Primary-A-Color, #00dfa2);
    font-size: 13px;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0, 223, 162, 0.08);
    border: 1px solid rgba(0, 223, 162, 0.2);
    transition: background 0.2s, color 0.2s;
}

.video-modal-footer-btn:hover {
    background: rgba(0, 223, 162, 0.2);
    color: #ffffff;
}
