/* تنسيقات عامة */
.text-truncate-2 {
   display: -webkit-box;
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
   overflow: hidden;
   text-overflow: ellipsis;
   height: 48px;
}

.video-thumbnail img, .tweet-thumbnail img {
   aspect-ratio: 16 / 9;
   object-fit: cover;
   width: 100%;
}
.video-thumbnail img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    transition: transform 0.5s;
}

.video-card:hover .video-thumbnail img {
    transform: translate(-50%, -50%) scale(1.05);
}

.play-button {
   opacity: 0.7;
   transition: opacity 0.2s ease;
}

.video-card:hover .play-button,
.tweet-card:hover .play-button,
.youtube-video-card:hover .play-button {
   opacity: 1 !important;
}

/* تنسيقات التبويبات */
#searchTabs .nav-link {
   border-radius: 0.5rem;
   margin: 0 0.2rem;
   padding: 0.5rem 1rem;
   font-weight: 500;
   position: relative;
   transition: all 0.3s ease;
}

#searchTabs .nav-link:hover {
   background-color: rgba(0, 0, 0, 0.05);
}

#searchTabs .nav-link.active {
   color: white;
}

#searchTabs .nav-link.active:first-child {
   background-color: #0d6efd;
}

#searchTabs .nav-link.active:nth-child(2) {
   background-color: #ff0000;
}

#searchTabs .nav-link.active:nth-child(3) {
   background-color: #1DA1F2;
}

.sticky-top {
   top: 70px;
   z-index: 1020;
}

/* تنسيقات خاصة بيوتيوب */
.youtube-video-thumbnail {
   position: relative;
   overflow: hidden;
}

.youtube-video-thumbnail img {
   transition: transform 0.3s ease;
}

.youtube-video-card:hover .youtube-video-thumbnail img {
   transform: scale(1.05);
}

.youtube-play-button {
   width: 50px;
   height: 50px;
   opacity: 0.8;
   transition: all 0.3s ease;
}

.youtube-video-card:hover .youtube-play-button {
   opacity: 1;
   transform: scale(1.1);
}

/* تنسيقات خاصة بتويتر */
.tweet-card {
   transition: transform 0.2s, box-shadow 0.2s;
}

.tweet-card:hover {
   transform: translateY(-5px);
   box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.tweet-text {
   line-height: 1.5;
   overflow: hidden;
   display: -webkit-box;
   -webkit-line-clamp: 4;
   -webkit-box-orient: vertical;
}

.twitter-avatar img {
   border: 2px solid #f8f9fa;
}

.user-name .fa-check-circle {
   font-size: 0.8em;
   color: #1DA1F2;
}

.search-platform-card {
   transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-platform-card:hover {
   transform: translateY(-10px);
   box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.view-list-mode .video-card, 
.view-list-mode .youtube-video-card, 
.view-list-mode .tweet-card {
    display: flex !important;
    flex-direction: row !important;
}

.view-list-mode .video-thumbnail, 
.view-list-mode .youtube-video-thumbnail, 
.view-list-mode .tweet-thumbnail {
    width: 220px !important;
    flex-shrink: 0;
}

.view-list-mode .video-info, 
.view-list-mode .youtube-video-info, 
.view-list-mode .tweet-info {
    flex-grow: 1;
    padding-right: 15px;
}

@media (max-width: 768px) {
   #searchTabs .nav-link {
       font-size: 0.9rem;
       padding: 0.4rem 0.6rem;
   }
   
   .sticky-top {
       top: 56px;
   }
   
   .view-list-mode .video-thumbnail, 
   .view-list-mode .youtube-video-thumbnail, 
   .view-list-mode .tweet-thumbnail {
       width: 150px !important;
   }
}
.search-tabs .nav-link {
    border: 2px solid transparent;
    border-radius: 10px 10px 0 0;
    padding: 12px 20px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin-right: 5px;
    position: relative;
    overflow: hidden;
}

.search-tabs .nav-link:hover {
    border-color: var(--bs-primary);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.search-tabs .nav-link.active {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-color: var(--bs-primary);
    border-bottom-color: #fff;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.search-tabs .nav-link .tab-title {
    font-weight: 600;
}

.video-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
    border-color: var(--bs-primary);
}

.play-btn-circle {
    width: 60px;
    height: 60px;
    transition: all 0.3s ease;
}

.video-card:hover .play-btn-circle {
    transform: scale(1.1);
    background-color: var(--bs-primary) !important;
}


.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.search-status-bar {
    border-left: 4px solid var(--bs-primary);
}

.empty-results {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

.filter-group .dropdown-toggle {
    border-radius: 25px;
    padding: 8px 16px;
}

.active-filters .badge {
    transition: all 0.3s ease;
}

.active-filters .badge:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

@media (max-width: 768px) {
    .search-tabs .nav-link {
        padding: 8px 12px;
        margin-right: 2px;
        font-size: 0.9rem;
    }
    
    .search-tabs .nav-link .tab-title {
        display: none;
    }
    
    .play-btn-circle {
        width: 45px;
        height: 45px;
    }
}