/* ========================================
   Admin Videos Page - Modern & Responsive
   ======================================== */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #fe2c55;
    --secondary-color: #f12950;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-dark: #161823;
    --text-gray: #8a8a8e;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Container ===== */
.admin-videos-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    direction: rtl;
}

/* ===== Statistics Grid ===== */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card.stat-total {
    border-color: #3b82f6;
}

.stat-card.stat-auctions {
    border-color: var(--primary-color);
}

.stat-card.stat-regular {
    border-color: var(--success-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-total .stat-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-auctions .stat-icon {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.stat-regular .stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-family: "Rubik", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-gray);
    margin: 0 0 0.5rem 0;
}

.stat-value {
    font-family: "Rubik", sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 2rem;
    text-align: center;
}

.page-title {
    font-family: "Rubik", sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
}

.page-subtitle {
    font-family: "Rubik", sans-serif;
    font-size: 16px;
    color: var(--text-gray);
    margin: 0;
}

/* ===== Videos Grid ===== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.video-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ===== Video Thumbnail ===== */
.video-thumbnail-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--bg-light);
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.video-badges {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-family: "Rubik", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(8px);
}

.badge-auction {
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.95), rgba(241, 41, 80, 0.95));
}

.badge-ad {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
}

.badge-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
}

.badge-closed {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
}

/* ===== Video Info ===== */
.video-info {
    padding: 1.5rem;
}

.video-title {
    font-family: "Rubik", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 48px;
}

/* ===== User Info ===== */
.video-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-avatar-placeholder-small {
    width: 40px;
    height: 40px;
    color: var(--text-gray);
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-family: "Rubik", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-family: "Rubik", sans-serif;
    font-size: 12px;
    color: var(--text-gray);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Property Details ===== */
.video-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: "Rubik", sans-serif;
    font-size: 14px;
}

.detail-label {
    font-weight: 600;
    color: var(--text-dark);
}

.detail-value {
    color: var(--text-gray);
    font-weight: 500;
}

.detail-icon {
    font-size: 16px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.detail-price {
    background: linear-gradient(135deg, var(--bg-light), #fef3f2);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border-right: 3px solid var(--primary-color);
}

.detail-price .detail-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 16px;
}

/* ===== Video Footer ===== */
.video-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.video-date {
    font-family: "Rubik", sans-serif;
    font-size: 13px;
    color: var(--text-gray);
}

.video-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-family: "Rubik", sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.video-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* ===== No Videos ===== */
.no-videos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
}

.no-videos-icon {
    font-size: 64px;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.no-videos p {
    font-family: "Rubik", sans-serif;
    font-size: 18px;
    color: var(--text-gray);
    margin: 0;
}

/* ===== Pagination ===== */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: var(--radius-md);
    font-family: "Rubik", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.pagination-link:hover:not(.disabled) {
    background: var(--bg-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination-link.active {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border-color: transparent;
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Media Player Components ===== */

/* Video Wrapper */
.admin-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Image Wrapper */
.admin-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Play/Pause Overlay */
.admin-play-pause-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
}

.admin-play-pause-overlay:hover {
    opacity: 1;
}

.admin-play-pause-overlay.active {
    background: rgba(0, 0, 0, 0.1);
}

.admin-play-pause-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.admin-play-pause-btn:hover {
    transform: scale(1.1);
    background: white;
}

/* Mute Button */
.admin-mute-btn {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.admin-mute-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Media Indicator */
.admin-media-indicator {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-md);
    font-family: "Rubik", sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(8px);
    z-index: 10;
}

.admin-media-indicator.video-indicator {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95));
}

.admin-media-indicator.image-indicator {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
}

/* Media Navigation Buttons */
.admin-media-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    opacity: 0;
}

.video-thumbnail-container:hover .admin-media-nav-btn {
    opacity: 1;
}

.admin-media-nav-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.admin-prev-btn {
    right: 0.75rem;
}

.admin-next-btn {
    left: 0.75rem;
}

/* Media Thumbnails */
.admin-media-thumbnails {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    z-index: 10;
}

.admin-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
}

.admin-thumbnail:hover {
    transform: scale(1.1);
    border-color: white;
}

.admin-thumbnail.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(254, 44, 85, 0.3);
}

.admin-thumbnail-video {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.admin-thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* No Media Placeholder */
.no-media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Rubik", sans-serif;
    font-size: 14px;
    color: var(--text-gray);
    background: var(--bg-light);
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 1024px) {
    .admin-videos-container {
        padding: 1.5rem;
    }

    .statistics-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1rem;
    }

    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .page-title {
        font-size: 28px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .admin-videos-container {
        padding: 1rem;
    }

    .statistics-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .stat-value {
        font-size: 28px;
    }

    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .page-title {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .video-thumbnail-container {
        height: 200px;
    }

    .admin-play-pause-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .admin-mute-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .admin-media-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .admin-media-thumbnails {
        bottom: 0.5rem;
        padding: 0.375rem;
        gap: 0.375rem;
    }

    .admin-thumbnail {
        width: 36px;
        height: 36px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .admin-videos-container {
        padding: 0.75rem;
    }

    .statistics-grid {
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .stat-value {
        font-size: 24px;
    }

    .videos-grid {
        gap: 1rem;
    }

    .video-info {
        padding: 1rem;
    }

    .video-title {
        font-size: 16px;
    }

    .video-thumbnail-container {
        height: 180px;
    }

    .admin-play-pause-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .admin-mute-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
        bottom: 0.75rem;
        left: 0.75rem;
    }

    .admin-media-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .admin-prev-btn {
        right: 0.5rem;
    }

    .admin-next-btn {
        left: 0.5rem;
    }

    .admin-media-thumbnails {
        bottom: 0.5rem;
        padding: 0.25rem;
        gap: 0.25rem;
    }

    .admin-thumbnail {
        width: 32px;
        height: 32px;
    }

    .admin-media-indicator {
        font-size: 10px;
        padding: 0.25rem 0.5rem;
        top: 0.75rem;
        left: 0.75rem;
    }
}
