﻿*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

:root {
    --primary: #4361EE;
    --secondary: #3A86FF;
    --accent: #FF6B6B;
    --success: #06D6A0;
    --warning: #FFD166;
    --ai-color: #7209B7;
    --light: #F8F9FA;
    --light-blue: #E9F0FF;
    --light-pink: #FFE9EC;
    --light-green: #E8F8F3;
    --light-yellow: #FFF9E6;
    --light-purple: #F3E8FF;
    --text-dark: #2B2D42;
    --text-gray: #6C757D;
    --border-radius: 20px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --font-heading: 'Tajawal', sans-serif;
    --font-body: 'Tajawal', sans-serif;
    --font-small: 'Tajawal', sans-serif;
    /* ألوان الـ Charts */
    --chart-text: #2B2D42;
    --chart-grid: rgba(0, 0, 0, 0.05);
    --chart-bg: rgba(255, 255, 255, 0.1);
}

body {
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
    font-family: var(--font-body);
    transition: var(--transition);
}

.metric-value {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    line-height: 1.1;
    word-break: break-all;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 60px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

    .shape:nth-child(1) {
        width: 80px;
        height: 80px;
        top: 10%;
        right: 10%;
        animation-delay: 0s;
    }

    .shape:nth-child(2) {
        width: 120px;
        height: 120px;
        bottom: 15%;
        left: 5%;
        animation-delay: 2s;
    }

    .shape:nth-child(3) {
        width: 60px;
        height: 60px;
        top: 50%;
        right: 20%;
        animation-delay: 4s;
    }

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-20px) rotate(120deg);
    }

    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 50px 40px;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    color: white;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1.3rem;
    margin-bottom: 35px;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
    animation: pulse 3s infinite;
    border: 1px solid rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
    text-transform: uppercase;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    line-height: 1.1;
    font-family: var(--font-heading);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-body);
}

.hero-date {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-family: var(--font-body);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
}

.hero-stat {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    padding: 30px 25px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    overflow: visible;
}

    .hero-stat.animated {
        opacity: 1;
        transform: translateY(0);
    }

    .hero-stat:hover {
        transform: translateY(-10px);
        background: rgba(255, 255, 255, 0.25);
    }

    .hero-stat .number {
        font-size: 2.5rem;
        font-weight: 800;
        display: block;
        margin-bottom: 10px;
        color: white;
        font-family: var(--font-heading);
    }

    .hero-stat .label {
        font-size: 1.1rem;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 500;
        font-family: var(--font-body);
    }

/* Stats Section */
.stats-section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    position: relative;
    display: inline-block;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-top: 10px;
    position: relative;
    display: inline-block;
    font-family: var(--font-small);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-left: 5px solid var(--primary);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

    .stat-card.animated {
        opacity: 1;
        transform: translateY(0);
    }

    .stat-card:nth-child(2) {
        border-left-color: var(--secondary);
    }

    .stat-card:nth-child(3) {
        border-left-color: var(--accent);
    }

    .stat-card:nth-child(4) {
        border-left-color: var(--success);
    }

    .stat-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    }

    .stat-card .icon {
        font-size: 3rem;
        margin-bottom: -30px;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .stat-card .number {
        font-size: 1.5rem;
        font-weight: 800;
        margin-bottom: 10px;
        color: var(--text-dark);
        font-family: var(--font-heading);
    }

    .stat-card .label {
        font-size: 1.2rem;
        color: var(--text-gray);
        font-weight: 500;
        font-family: var(--font-body);
    }

    .stat-card .trend {
        display: flex;
        align-items: center;
        margin-top: 15px;
        font-size: 1rem;
        font-weight: 600;
        font-family: var(--font-small);
    }

.trend.up {
    color: var(--success);
}

/* AI Section */
.ai-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 50px 40px;
    margin-bottom: 60px;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.ai-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--ai-color), #9D4EDD);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    animation: pulse-ai 2s infinite;
}

@keyframes pulse-ai {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.ai-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.ai-recommendations {
    background: var(--light-purple);
    border-radius: var(--border-radius);
    padding: 30px;
}

.ai-predictions {
    background: var(--light-green);
    border-radius: var(--border-radius);
    padding: 30px;
}

.ai-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--ai-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
}

.recommendation-list, .prediction-list {
    list-style: none;
}

.recommendation-item, .prediction-item {
    padding: 15px;
    margin-bottom: 12px;
    background: white;
    border-radius: 12px;
    border-right: 4px solid var(--ai-color);
    transition: var(--transition);
    opacity: 0;
    transform: translateX(30px);
}

    .recommendation-item.animated, .prediction-item.animated {
        opacity: 1;
        transform: translateX(0);
    }

    .recommendation-item:hover, .prediction-item:hover {
        transform: translateX(-5px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .recommendation-item h4, .prediction-item h4 {
        font-size: 1.1rem;
        margin-bottom: 8px;
        color: var(--text-dark);
        font-family: var(--font-heading);
    }

    .recommendation-item p, .prediction-item p {
        color: var(--text-gray);
        font-size: 0.95rem;
        font-family: var(--font-small);
    }

.prediction-item {
    border-right-color: var(--success);
}

/* Chart Section */
.chart-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px 30px;
    margin-bottom: 60px;
    box-shadow: var(--box-shadow);
    opacity: 0;
    transform: translateY(30px);
}

    .chart-section.animated {
        opacity: 1;
        transform: translateY(0);
    }

.chart-container {
    height: 400px;
    position: relative;
    margin-top: 30px;
}

/* Campaign Overview */
/* Campaign Overview */
.campaign-overview {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Left 60%, right 40% */
    gap: 40px;
    margin-bottom: 60px;
    align-items: start; /* prevent right panel pushing left panel */
}

.overview-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
    opacity: 0;
    transform: translateX(-30px);
    min-width: 0; /* allow shrinking without breaking layout */
}

    .overview-content.animated {
        opacity: 1;
        transform: translateX(0);
    }

.overview-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
    color: var(--text-dark);
    font-family: var(--font-body);
}

.hashtags-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    opacity: 0;
    transform: translateX(30px);
    display: flex;
    flex-direction: column;
    max-width: 100%; /* prevent panel from expanding beyond 40% */
    overflow-x: hidden; /* prevent horizontal scroll for long hashtags */
}

    .hashtags-container.animated {
        opacity: 1;
        transform: translateX(0);
    }

.hashtags-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

.hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-height: 150px;
    overflow: hidden;
    transition: max-height 0.5s ease;
    margin-bottom: 20px;
    word-break: break-word; /* break long hashtags */
}

    .hashtags.expanded {
        max-height: 1000px;
    }

.hashtag {
    background: var(--light-blue);
    color: var(--primary);
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    opacity: 0;
    transform: scale(0.8);
    font-family: var(--font-small);
}

    .hashtag.animated {
        opacity: 1;
        transform: scale(1);
    }

    .hashtag:hover {
        background: var(--primary);
        color: white;
        transform: translateY(-3px);
    }

.show-more-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    align-self: center;
    margin-top: auto;
}

    .show-more-btn:hover {
        background: var(--primary);
        color: white;
    }

/* Mobile responsiveness */
@media (max-width: 768px) {
    .campaign-overview {
        grid-template-columns: 1fr; /* stack panels vertically */
        gap: 20px;
    }

    .hashtags-container {
        margin-top: 20px;
    }
}

/* Top Videos Section */
.top-videos {
    margin-bottom: 60px;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.video-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    display: flex;
    flex-direction: column;
    height: 100%; /* ensure equal height if parent allows */
}

    .video-card.animated {
        opacity: 1;
        transform: translateY(0);
    }

    .video-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

.video-thumbnail {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3.5rem;
}

.video-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-small);
}

.video-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* make content stretch */
}

.video-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    font-family: var(--font-heading);
    display: -webkit-box;
    -webkit-line-clamp: 2; /* max 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-desc {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
    font-family: var(--font-body);
    display: -webkit-box;
    -webkit-line-clamp: 2; /* max 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-stats {
    margin-top: auto; /* push stats to bottom */
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-family: var(--font-small);
}

/* New: username badge styling */
.video-username {
    margin-top: 12px;
    padding: 6px 12px;
    text-align: center;
    background-color: #ffc107; /* golden warning color */
    color: #212529;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-username1 {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    font-size: 0.9rem;
    background: var(--accent);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    text-align: center;
    margin-top: 10px;
}

/* Videos Table Section */
.videos-table-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px 30px;
    margin-bottom: 60px;
    box-shadow: var(--box-shadow);
    opacity: 0;
    transform: translateY(30px);
    margin-top: 40px;
}

    .videos-table-section.animated {
        opacity: 1;
        transform: translateY(0);
    }

/* Table styling */
.videos-table {
    width: 100%;
    border-collapse: collapse; /* ensures single line borders */
    margin-top: 30px;
    background: white;
}

    .videos-table th {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        padding: 20px;
        text-align: right;
        font-weight: 700;
        font-size: 1.1rem;
        color: white;
        font-family: var(--font-heading);
    }

    .videos-table td {
        padding: 20px;
        vertical-align: top; /* ensures multi-line content aligns at top */
    }

    .videos-table tr {
        border-bottom: 1px solid rgba(200, 200, 200, 0.3); /* horizontal line per row */
    }

        .videos-table tr:last-child {
            border-bottom: none;
        }

        .videos-table tr:hover {
            background: rgba(0, 0, 0, 0.02);
        }

/* Video Number */
.video-number {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    text-align: center;
    font-family: var(--font-heading);
}

/* Video Description */
.video-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    font-family: var(--font-body);
}

/* Video Link */
.video-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    font-family: var(--font-body);
}

    .video-link:hover {
        color: var(--accent);
        transform: translateX(-5px);
    }

/* Video Status */
.video-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-small);
}

.status-new {
    background: rgba(0, 230, 118, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.status-trending {
    background: rgba(255, 75, 145, 0.2);
    color: var(--accent);
    border: 1px solid var(--accent);
}


/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 60px 0 40px;
    padding: 20px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--box-shadow);
    font-family: var(--font-body);
}

    .page-btn:hover {
        background: var(--primary);
        color: white;
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
    }

    .page-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
        background: #f8f9fa;
        color: var(--text-gray);
        border-color: #dee2e6;
    }

.page-info {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 0 20px;
    background: white;
    border-radius: 30px;
    padding: 10px 20px;
    border: 2px solid var(--light-blue);
    box-shadow: var(--box-shadow);
    font-family: var(--font-body);
}

/* Footer */
footer {
    background: white;
    border-radius: var(--border-radius);
    padding: 50px 0 25px;
    margin-top: 60px;
    box-shadow: var(--box-shadow);
    opacity: 0;
}

    footer.animated {
        opacity: 1;
    }

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    padding: 0 40px;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
    font-weight: 700;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

    .footer-section h3::after {
        content: "";
        position: absolute;
        bottom: 0;
        right: 0;
        width: 40px;
        height: 4px;
        background: linear-gradient(to right, var(--accent), var(--primary));
    }

.footer-links {
    list-style: none;
}

    .footer-links li {
        margin-bottom: 12px;
    }

    .footer-links a {
        color: var(--text-gray);
        text-decoration: none;
        transition: var(--transition);
        display: flex;
        align-items: center;
        gap: 10px;
        font-family: var(--font-body);
    }

        .footer-links a:hover {
            color: var(--primary);
            padding-right: 8px;
        }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-gray);
    padding: 10px 0;
    transition: var(--transition);
    font-family: var(--font-body);
}

    .contact-item:hover {
        color: var(--primary);
        transform: translateX(-5px);
    }

    .contact-item:last-child {
        border-bottom: none;
    }

    .contact-item i {
        width: 24px;
        text-align: center;
        color: var(--primary);
    }

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-family: var(--font-small);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
    font-family: var(--font-body);
}

    .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 25px rgba(67, 97, 238, 0.4);
    }

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

    .btn-outline:hover {
        background: var(--primary);
        color: white;
    }

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 180px;
    left: 30px;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    font-family: var(--font-body);
}

    .back-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    .back-to-top:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 30px rgba(67, 97, 238, 0.7);
    }

/* Themes Button & Panel */
.themes-btn {
    position: fixed;
    bottom: 120px;
    left: 30px;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
}

    .themes-btn:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 30px rgba(67, 97, 238, 0.7);
    }

.themes-panel {
    position: fixed;
    bottom: 240px;
    left: 30px;
    z-index: 1000;
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--light-blue);
    box-shadow: var(--box-shadow);
    display: none;
    flex-direction: column;
    gap: 15px;
    width: 220px;
    max-height: 300px;
    overflow-y: auto;
}

    .themes-panel.active {
        display: flex;
    }

    .themes-panel::-webkit-scrollbar {
        width: 6px;
    }

    .themes-panel::-webkit-scrollbar-track {
        background: var(--light-blue);
        border-radius: 10px;
    }

    .themes-panel::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 10px;
    }

        .themes-panel::-webkit-scrollbar-thumb:hover {
            background: var(--secondary);
        }

.theme-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

    .theme-option:hover {
        background: var(--light-blue);
    }

    .theme-option.active {
        border-color: var(--primary);
    }

.theme-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.theme-name {
    font-weight: 600;
    color: var(--text-dark);
    font-family: var(--font-body);
}

/* Export Button */
.export-btn {
    position: fixed;
    bottom: 60px;
    left: 30px;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
}

    .export-btn:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 30px rgba(67, 97, 238, 0.7);
    }

/* Background Animation */
.animated-bg {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.05;
    pointer-events: none;
    overflow: hidden;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    filter: blur(60px);
    animation: bg-float 20s ease-in-out infinite;
}

    .bg-shape:nth-child(1) {
        width: 400px;
        height: 400px;
        top: 10%;
        right: 10%;
        animation-delay: 0s;
    }

    .bg-shape:nth-child(2) {
        width: 300px;
        height: 300px;
        bottom: 15%;
        left: 5%;
        animation-delay: 7s;
    }

    .bg-shape:nth-child(3) {
        width: 350px;
        height: 350px;
        top: 60%;
        right: 60%;
        animation-delay: 14s;
    }

    .bg-shape:nth-child(4) {
        width: 250px;
        height: 250px;
        top: 20%;
        left: 20%;
        animation-delay: 21s;
    }

@keyframes bg-float {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.05;
    }

    25% {
        transform: translate(100px, -50px) scale(1.2) rotate(90deg);
        opacity: 0.1;
    }

    50% {
        transform: translate(-80px, 80px) scale(0.8) rotate(180deg);
        opacity: 0.08;
    }

    75% {
        transform: translate(120px, 60px) scale(1.1) rotate(270deg);
        opacity: 0.12;
    }
}

/* Floating particles animation */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.1;
    animation: particle-float 15s linear infinite;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.1;
    }

    90% {
        opacity: 0.1;
    }

    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* إضافة أنيميشن للعلامات في الخلفية */
.social-icons-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.social-icon {
    position: absolute;
    font-size: 28px;
    opacity: 0.15;
    animation: socialFloat 15s linear infinite;
}

    .social-icon.eye {
        color: var(--primary);
    }

    .social-icon.heart {
        color: var(--accent);
    }

    .social-icon.share {
        color: var(--secondary);
    }

@keyframes socialFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.15;
    }

    90% {
        opacity: 0.15;
    }

    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* إضافة أنيميشن للعلامات في الخلفية - النسخة الثانية */
.social-icons-animation-2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.social-icon-2 {
    position: absolute;
    font-size: 22px;
    opacity: 0.12;
    animation: socialFloat2 20s linear infinite;
}

    .social-icon-2.eye {
        color: var(--primary);
    }

    .social-icon-2.heart {
        color: var(--accent);
    }

    .social-icon-2.share {
        color: var(--secondary);
    }

@keyframes socialFloat2 {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.12;
    }

    90% {
        opacity: 0.12;
    }

    100% {
        transform: translateY(-100px) translateX(-100px) rotate(-360deg);
        opacity: 0;
    }
}

/* إضافة أنيميشن للنجوم */
.floating-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    color: var(--warning);
    font-size: 18px;
    opacity: 0;
    animation: star-twinkle 6s ease-in-out infinite;
}

@keyframes star-twinkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* إضافة فلتر للفيديوهات */
.videos-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--light-blue);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-gray);
    font-family: var(--font-body);
}

    .filter-btn.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

    .filter-btn:hover {
        background: var(--light-blue);
        color: var(--primary);
    }

/* إضافة عرض المزيد للفيديوهات */
.videos-container {
    position: relative;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

    .videos-grid.hidden {
        display: none;
    }

.show-more-videos {
    text-align: center;
    margin-top: 30px;
}

/* إضافة مخططات بيانية إضافية */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.chart-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    opacity: 0;
    transform: translateY(30px);
}

    .chart-card.animated {
        opacity: 1;
        transform: translateY(0);
    }

    .chart-card .chart-container {
        height: 300px;
        position: relative;
    }

/* تنسيق إضافي للفلتر */
.videos-table-section .videos-filter {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--light-blue);
    border-radius: var(--border-radius);
}

.videos-table-section .filter-btn {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
}

    .videos-table-section .filter-btn.active {
        background: var(--primary);
        color: white;
    }

/* تنسيق أزرار عرض المزيد والعرض الأقل */
.table-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.show-more-table-btn, .show-less-table-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
}

    .show-more-table-btn:hover, .show-less-table-btn:hover {
        background: var(--primary);
        color: white;
    }

.show-less-table-btn {
    display: none;
}

/* تنسيق الجدول المخفي */
.videos-table.hidden {
    display: none;
}

/* الميزات الجديدة */

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1001;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.3s ease;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--light-blue);
    box-shadow: var(--box-shadow);
}

.quick-stat-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.quick-stat-content h4 {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 5px;
    font-family: var(--font-small);
}

.quick-stat-content p {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

/* Live Counter */
.live-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--success);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 15px;
    font-family: var(--font-small);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: live-pulse 1.5s infinite;
}

@keyframes live-pulse {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Interactive Elements */
.interactive-element {
    cursor: pointer;
    transition: var(--transition);
}

    .interactive-element:hover {
        transform: scale(1.05);
    }

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px 20px;
    box-shadow: var(--box-shadow);
    border-right: 4px solid var(--success);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 350px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

    .notification.show {
        transform: translateX(0);
    }

    .notification.error {
        border-right-color: var(--accent);
    }

    .notification.warning {
        border-right-color: var(--warning);
    }

    .notification.info {
        border-right-color: var(--primary);
    }

.notification-icon {
    font-size: 1.2rem;
}

.notification.success .notification-icon {
    color: var(--success);
}

.notification.error .notification-icon {
    color: var(--accent);
}

.notification.warning .notification-icon {
    color: var(--warning);
}

.notification.info .notification-icon {
    color: var(--primary);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    margin-bottom: 5px;
    font-family: var(--font-heading);
}

.notification-close {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: var(--transition);
}

    .notification-close:hover {
        color: var(--accent);
    }

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .loading-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--light-blue);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: var(--text-gray);
    font-size: 1.2rem;
    font-family: var(--font-body);
}

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

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

/* Search Bar */
.search-container {
    position: relative;
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid var(--light-blue);
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    font-family: var(--font-body);
}

    .search-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    }

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}

/* Export Modal */
.export-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .export-modal.active {
        opacity: 1;
        visibility: visible;
    }

.export-modal-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.export-modal.active .export-modal-content {
    transform: scale(1);
}

.export-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.export-option {
    background: white;
    border: 2px solid var(--light-blue);
    border-radius: var(--border-radius);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

    .export-option:hover {
        border-color: var(--primary);
        transform: translateY(-5px);
    }

    .export-option i {
        font-size: 2rem;
        margin-bottom: 10px;
    }

.export-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* إضافة نجووم متطايرة */
.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    background: gold;
    border-radius: 50%;
    animation: confetti-fall 5s linear infinite;
    pointer-events: none;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* تحسين النص في السمات الداكنة */
body[class*="theme-"] {
    color: #FFFFFF;
}

    body[class*="theme-"] .section-title,
    body[class*="theme-"] .stat-card .number,
    body[class*="theme-"] .hero-title,
    body[class*="theme-"] .ai-title,
    body[class*="theme-"] .video-title,
    body[class*="theme-"] .hashtags-title,
    body[class*="theme-"] .footer-section h3 {
        color: var(--text-dark) !important;
    }

    body[class*="theme-"] .stat-card .label,
    body[class*="theme-"] .section-subtitle,
    body[class*="theme-"] .overview-text,
    body[class*="theme-"] .video-desc,
    body[class*="theme-"] .recommendation-item p,
    body[class*="theme-"] .prediction-item p,
    body[class*="theme-"] .footer-links a,
    body[class*="theme-"] .contact-item {
        color: var(--text-gray) !important;
    }

    /* تحسين البطاقات في السمات الداكنة */
    body[class*="theme-"] .stat-card,
    body[class*="theme-"] .ai-section,
    body[class*="theme-"] .chart-section,
    body[class*="theme-"] .chart-card,
    body[class*="theme-"] .overview-content,
    body[class*="theme-"] .hashtags-container,
    body[class*="theme-"] .video-card,
    body[class*="theme-"] .videos-table-section,
    body[class*="theme-"] footer {
        background: var(--light) !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* تحسين الهيرو سيكشن */
    body[class*="theme-"] .hero-section {
        background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    }

    /* تحسين الجدول */
    body[class*="theme-"] .videos-table th {
        background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    }

    body[class*="theme-"] .videos-table td {
        background: var(--light) !important;
        color: var(--text-dark) !important;
    }

    /* تحسين الأزرار */
    body[class*="theme-"] .btn-outline {
        border-color: var(--primary);
        color: var(--primary);
    }

        body[class*="theme-"] .btn-outline:hover {
            background: var(--primary);
            color: white;
        }

/* خلفيات السمات الداكنة */
body.theme-midnight {
    background: linear-gradient(135deg, #0A1128 0%, #1A2B4A 100%);
}

body.theme-forest {
    background: linear-gradient(135deg, #0D1F12 0%, #1A3B2A 100%);
}

body.theme-royal {
    background: linear-gradient(135deg, #10002B 0%, #240046 100%);
}

body.theme-sunset {
    background: linear-gradient(135deg, #2B003A 0%, #4A0065 100%);
}

body.theme-coffee {
    background: linear-gradient(135deg, #3E2723 0%, #5D4037 100%);
}

body.theme-ocean {
    background: linear-gradient(135deg, #003D44 0%, #005A65 100%);
}

body.theme-purple {
    background: linear-gradient(135deg, #2D1B69 0%, #5A2A8C 100%);
}

body.theme-emerald {
    background: linear-gradient(135deg, #064E3B 0%, #065F46 100%);
}

body.theme-rose {
    background: linear-gradient(135deg, #831843 0%, #BE185D 100%);
}

body.theme-amber {
    background: linear-gradient(135deg, #78350F 0%, #D97706 100%);
}

body.theme-cyan {
    background: linear-gradient(135deg, #164E63 0%, #0891B2 100%);
}

body.theme-lime {
    background: linear-gradient(135deg, #365314 0%, #65A30D 100%);
}

body.theme-pink {
    background: linear-gradient(135deg, #831843 0%, #DB2777 100%);
}

body.theme-indigo {
    background: linear-gradient(135deg, #312E81 0%, #4338CA 100%);
}

body.theme-teal {
    background: linear-gradient(135deg, #134E4A 0%, #0D9488 100%);
}

body.theme-orange {
    background: linear-gradient(135deg, #7C2D12 0%, #EA580C 100%);
}

body.theme-violet {
    background: linear-gradient(135deg, #4C1D95 0%, #7C3AED 100%);
}

body.theme-sky {
    background: linear-gradient(135deg, #0C4A6E 0%, #0284C7 100%);
}

body.theme-fuchsia {
    background: linear-gradient(135deg, #701A75 0%, #C026D3 100%);
}

body.theme-stone {
    background: linear-gradient(135deg, #292524 0%, #78716C 100%);
}

body.theme-zinc {
    background: linear-gradient(135deg, #18181B 0%, #52525B 100%);
}

body.theme-neutral {
    background: linear-gradient(135deg, #262626 0%, #737373 100%);
}

/* منع تغيير ألوان الـ charts مع السمات */
body[class*="theme-"] .chart-section,
body[class*="theme-"] .advanced-chart-card {
    background: white !important;
}

    body[class*="theme-"] .advanced-chart-card .section-title,
    body[class*="theme-"] .chart-section .section-title {
        color: #2B2D42 !important;
    }

/* أنماط التهنئة الداخلية */
.inline-celebration {
    position: absolute;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
    z-index: 100;
    animation: inline-celebration-pulse 0.6s ease-in-out 3, inline-celebration-float 5s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    border: 2px solid white;
}

    .inline-celebration.show {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    .inline-celebration.views {
        background: linear-gradient(135deg, #4361EE, #3A86FF);
        color: white;
    }

    .inline-celebration.likes {
        background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
        color: white;
    }

    .inline-celebration.shares {
        background: linear-gradient(135deg, #06D6A0, #4CC9A7);
        color: white;
    }

    .inline-celebration.comments {
        background: linear-gradient(135deg, #7209B7, #9D4EDD);
        color: white;
    }

@keyframes inline-celebration-pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes inline-celebration-float {
    0% {
        transform: translateY(0px) scale(1);
    }

    25% {
        transform: translateY(-5px) scale(1.05);
    }

    50% {
        transform: translateY(0px) scale(1);
    }

    75% {
        transform: translateY(-3px) scale(1.02);
    }

    100% {
        transform: translateY(0px) scale(1);
    }
}

/* تعديل مواضع التهنئة حسب نوع المؤشر */
.stat-card {
    position: relative;
    overflow: visible;
}

.hero-stat {
    position: relative;
    overflow: visible;
}

/* إصلاح ألوان النص في الـ Charts */
body[class*="theme-"] .chart-section,
body[class*="theme-"] .chart-card {
    background: white !important;
}

    body[class*="theme-"] .chart-section .section-title,
    body[class*="theme-"] .chart-card .section-title,
    body[class*="theme-"] .chart-section .section-subtitle,
    body[class*="theme-"] .chart-card .section-subtitle {
        color: #2B2D42 !important;
    }

    /* إصلاح ألوان النص في الـ Charts نفسها */
    body[class*="theme-"] .chart-section canvas,
    body[class*="theme-"] .chart-card canvas {
        filter: none !important;
    }

/* إصلاح لون صفحة المعلومات */
body[class*="theme-"] .page-info {
    color: #2B2D42 !important;
    background: white !important;
    border-color: var(--light-blue) !important;
}

/* إصلاح أسماء الألوان في لوحة السمات */
body[class*="theme-"] .themes-panel {
    background: var(--light) !important;
    border: 1px solid var(--light-blue) !important;
}

body[class*="theme-"] .theme-name {
    color: var(--text-dark) !important;
    font-weight: 600;
}

body[class*="theme-"] .theme-option:hover {
    background: var(--light-blue) !important;
}

body[class*="theme-"] .theme-option.active {
    border-color: var(--primary) !important;
    background: var(--light-blue) !important;
}

/* منع تأثير السمات على المناطق الحرجة */
.chart-section,
.chart-card,
.videos-table-section,
.pagination-container,
.export-modal-content {
    background: white !important;
}

    .chart-section .section-title,
    .chart-card .section-title,
    .videos-table-section .section-title,
    .page-info,
    .export-modal-content h3,
    .export-modal-content p {
        color: #2B2D42 !important;
    }

/* إصلاح الجدول */
.videos-table th {
    background: linear-gradient(135deg, #4361EE, #3A86FF) !important;
    color: white !important;
}

.videos-table td {
    background: white !important;
    color: #2B2D42 !important;
    border-bottom: 1px solid #eee !important;
}

/* إصلاح إشعارات السمات */
body[class*="theme-"] .notification {
    background: white !important;
    border-right: 4px solid var(--success) !important;
}

    body[class*="theme-"] .notification.success {
        border-right-color: var(--success) !important;
    }

    body[class*="theme-"] .notification.error {
        border-right-color: var(--accent) !important;
    }

    body[class*="theme-"] .notification.warning {
        border-right-color: var(--warning) !important;
    }

    body[class*="theme-"] .notification.info {
        border-right-color: var(--primary) !important;
    }

body[class*="theme-"] .notification-title {
    color: #2B2D42 !important;
    font-weight: 700;
}

body[class*="theme-"] .notification-message {
    color: #6C757D !important;
}

body[class*="theme-"] .notification-close {
    color: #6C757D !important;
}

    body[class*="theme-"] .notification-close:hover {
        color: var(--accent) !important;
    }

/* تحسين ألوان قسم الذكاء الاصطناعي */
.ai-recommendations,
.ai-predictions {
    position: relative;
}

    .ai-recommendations .ai-title,
    .ai-predictions .ai-title {
        color: var(--ai-color) !important;
        border-bottom: 2px solid rgba(114, 9, 183, 0.2);
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

    .ai-recommendations .recommendation-item,
    .ai-predictions .prediction-item {
        background: white;
        border-right: 4px solid var(--ai-color);
        transition: var(--transition);
        margin-bottom: 15px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

        .ai-recommendations .recommendation-item:hover,
        .ai-predictions .prediction-item:hover {
            transform: translateX(-5px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        }

        .ai-recommendations .recommendation-item h4,
        .ai-predictions .prediction-item h4 {
            color: var(--text-dark);
            font-weight: 700;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

            .ai-recommendations .recommendation-item h4::before,
            .ai-predictions .prediction-item h4::before {
                content: "🎯";
                font-size: 1.2em;
            }

        .ai-recommendations .recommendation-item p,
        .ai-predictions .prediction-item p {
            color: var(--text-gray);
            line-height: 1.6;
            margin: 0;
        }

/* تحسين الأيقونات في العناوين */
.ai-title i {
    color: var(--ai-color) !important;
    background: rgba(114, 9, 183, 0.1);
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* تحسينات إضافية للسمات الداكنة */
body[class*="theme-"] .ai-recommendations .recommendation-item,
body[class*="theme-"] .ai-predictions .prediction-item {
    background: var(--light) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

    body[class*="theme-"] .ai-recommendations .recommendation-item h4,
    body[class*="theme-"] .ai-predictions .prediction-item h4 {
        color: var(--text-dark) !important;
    }

    body[class*="theme-"] .ai-recommendations .recommendation-item p,
    body[class*="theme-"] .ai-predictions .prediction-item p {
        color: var(--text-gray) !important;
    }

/* تحسينات خاصة للقسم التنبؤي */
.ai-predictions .prediction-item {
    border-right-color: var(--success);
}

    .ai-predictions .prediction-item h4::before {
        content: "📈" !important;
    }

/* جعل لون "توقعات الأداء" والأيقونة أخضر افتراضي */
.ai-predictions .ai-title {
    color: var(--success) !important; /* اللون الأخضر من المتغيرات */
}

    .ai-predictions .ai-title i {
        color: var(--success) !important;
        background: rgba(6, 214, 160, 0.15) !important;
        border: 2px solid rgba(6, 214, 160, 0.3);
    }

/* تحسين مظهر العناصر داخل قسم التوقعات */
.ai-predictions .prediction-item {
    border-right-color: var(--success) !important;
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.05), rgba(6, 214, 160, 0.02));
}

    .ai-predictions .prediction-item:hover {
        background: linear-gradient(135deg, rgba(6, 214, 160, 0.08), rgba(6, 214, 160, 0.04));
        transform: translateX(-5px) scale(1.02);
    }

    /* تحسين الأيقونة في العناوين الفرعية */
    .ai-predictions .prediction-item h4::before {
        content: "📈";
        font-size: 1.1em;
        margin-left: 5px;
    }

/* إزالة الخط من العنوان الرئيسي */
.section-title::after {
    display: none;
}

/* إزالة الخط من العنوان الفرعي */
.section-subtitle::after {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 30px 40px;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* إزالة أي مسافة سفلية */
    margin-bottom: 0;
}

.hero-date {
    font-size: 1rem;
    margin-bottom: 0; /* جعل المسافة السفلية صفر */
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-family: var(--font-body);
    /* إضافة مسافة علوية فقط إذا لزم الأمر */
    padding-bottom: 0;
}

.hero-badge {
    position: relative;
    text-align: center;
}

/* X Overlay */
.x-mark-overlay {
    position: absolute;
    top: clamp(-80px, -10vw, -100px); /* responsive top */
    right: 50%;
    transform: translateX(50%);
    width: clamp(50px, 15vw, 70px);
    height: clamp(50px, 15vw, 70px);
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 3px solid white;
    z-index: 2;
}

    .x-mark-overlay::before,
    .x-mark-overlay::after {
        content: '';
        position: absolute;
        width: 60%;
        height: 10%;
        background: white;
        border-radius: 2px;
    }

    .x-mark-overlay::before {
        transform: rotate(45deg);
    }

    .x-mark-overlay::after {
        transform: rotate(-45deg);
    }

/* Hero Icon */
.hero-icon {
    position: absolute;
    top: clamp(-40px, -10vw, -100px); /* match X overlay */

    right: 50%;
    transform: translateX(50%);
    width: clamp(50px, 10vw, 50px);
    height: clamp(50px, 10vw, 50px);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 2;
    object-fit: cover;
    background: white;
}

/* تحسينات للهواتف */
@media (max-width: 768px) {
    .ai-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .ai-recommendations,
    .ai-predictions {
        padding: 20px;
    }

    .ai-title {
        font-size: 1.3rem;
    }

    .campaign-overview {
        grid-template-columns: 1fr;
    }

    .ai-content {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-stats {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

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

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .videos-table {
        display: block;
        overflow-x: auto;
    }

    .footer-content {
        padding: 0 20px;
        grid-template-columns: 1fr;
    }

    .export-btn, .themes-btn, .back-to-top {
        bottom: 20px;
        left: 20px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .themes-btn {
        bottom: 80px;
    }

    .back-to-top {
        bottom: 140px;
    }

    .themes-panel {
        bottom: 200px;
        left: 20px;
        width: 180px;
    }

    .pagination-container {
        flex-direction: column;
        gap: 15px;
    }

    .export-options {
        grid-template-columns: 1fr;
    }

    .ai-content {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .hero-content, .ai-section, .chart-section, .overview-content, .hashtags-container, .videos-table-section {
        padding: 30px 20px;
    }

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

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .stat-card {
        padding: 20px 15px;
    }

        .stat-card .number {
            font-size: 1.2rem;
        }
}
/* تنسيق التهنئة المليونية الفخمة */
.million-celebration {
    position: absolute;
    top: -25px;
    left: -20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    color: #2B2D42;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
    animation: million-float 4s ease-in-out infinite;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border: 2px solid rgba(255, 215, 0, 0.5);
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

    .million-celebration.show {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    .million-celebration::before {
        content: "✨";
        font-size: 1.2em;
        animation: sparkle 2s infinite;
    }

@keyframes million-float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    33% {
        transform: translateY(-8px) rotate(2deg);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    }

    66% {
        transform: translateY(-4px) rotate(-2deg);
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* فقاعات التهنئة */
.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    animation: bubble-float 3s ease-in forwards;
}

@keyframes bubble-float {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) scale(1.2);
        opacity: 0;
    }
}

/* تحسين المظهر على الهواتف */
@media (max-width: 768px) {
    .million-celebration {
        font-size: 0.9rem;
        padding: 10px 16px;
        top: -20px;
        left: -15px;
    }
}

.million-celebration-right {
    position: relative;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 15px 25px;
    border-radius: 30px;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
    margin: -30px auto 40px;
    width: fit-content;
    text-align: center;
    animation: million-float 4s ease-in-out infinite;
    border: 2px solid white;
    z-index: 100;
    max-width: 90%;
}

    .million-celebration-right::before {
        content: "✨";
        font-size: 1.2em;
        animation: sparkle 2s infinite;
        margin-left: 10px;
    }

/* تحسين الخطوط والأيقونات في قسم الفيديوهات */
.video-stats {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-size: 1rem; /* زيادة حجم الخط */
    font-family: 'Tajawal', sans-serif;
    font-weight: 600; /* زيادة سماكة الخط */
}

    .stat i {
        font-size: 1.2rem; /* زيادة حجم الأيقونات */
        color: var(--primary); /* إضافة لون للأيقونات */
    }

/* تحسين أرقام مؤشرات الأداء */
.hero-stat .number {
    font-size: 2.5rem;
    font-weight: 900; /* زيادة السماكة */
    display: block;
    margin-bottom: 10px;
    color: white;
    font-family: 'Tajawal', sans-serif;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* إضافة ظل للنص */
}

.stat-card .number {
    font-size: 1.8rem;
    font-weight: 900; /* زيادة السماكة */
    margin-bottom: 10px;
    color: var(--text-dark);
    font-family: 'Tajawal', sans-serif;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1); /* إضافة ظل خفيف */
}

/* تحسين مؤشرات الأداء الرئيسية */
.hero-stat .number {
    font-size: 2.8rem; /* زيادة الحجم */
    font-weight: 900;
    display: block;
    margin-bottom: 10px;
    color: white;
    font-family: 'Tajawal', sans-serif;
    text-shadow: 0 3px 6px rgba(0,0,0,0.4); /* ظل أقوى */
    letter-spacing: -1px; /* تقريب الحروف */
    line-height: 1.1;
}

.hero-stat .label {
    font-size: 1.2rem; /* زيادة حجم التسمية */
    color: rgba(255, 255, 255, 0.95); /* زيادة الوضوح */
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* تحسين بطاقات الإحصائيات */
.stat-card .number {
    font-size: 2.2rem; /* زيادة الحجم */
    font-weight: 900;
    margin-bottom: 12px;
    color: var(--text-dark);
    font-family: 'Tajawal', sans-serif;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    letter-spacing: -1px;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .label {
    font-size: 1.3rem; /* زيادة حجم التسمية */
    color: var(--text-gray);
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    margin-bottom: 8px;
}

.stat-card .icon {
    font-size: 3.5rem; /* زيادة حجم الأيقونات */
    margin-bottom: -20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.stat-card .trend {
    display: flex;
    align-items: center;
    margin-top: 15px;
    font-size: .8rem; /* زيادة حجم النص */
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    padding: 8px 12px;
    background: rgba(6, 214, 160, 0.1);
    border-radius: 8px;
    border-right: 3px solid var(--success);
}

/* تحسين إحصائيات الفيديو */
.video-stats {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 18px;
    margin-top: 10px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-gray);
    font-size: 1.1rem; /* زيادة حجم الخط */
    font-family: 'Tajawal', sans-serif;
    font-weight: 700; /* زيادة السماكة */
    text-align: center;
    flex: 1;
}

    .stat i {
        font-size: 1.4rem; /* زيادة حجم الأيقونات */
        color: var(--primary);
        background: var(--light-blue);
        padding: 8px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    .stat:hover i {
        background: var(--primary);
        color: white;
        transform: scale(1.1);
    }

    .stat span {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--text-dark);
    }

/* تحسين العداد الحي */
.live-counter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--success);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 700;
    margin-right: 15px;
    font-family: 'Tajawal', sans-serif;
    box-shadow: 0 4px 12px rgba(6, 214, 160, 0.3);
}

/* تحسين الأرقام في الهيرو */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
}

.hero-stat {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    padding: 35px 25px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: var(--transition);
    position: relative;
    overflow: visible;
    text-align: center;
}

    .hero-stat:hover {
        transform: translateY(-10px);
        background: rgba(255, 255, 255, 0.25);
        box-shadow: 0 15px 35px rgba(255, 255, 255, 0.2);
    }

    .hero-stat::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
        border-radius: var(--border-radius);
        opacity: 0;
        transition: var(--transition);
    }

    .hero-stat:hover::before {
        opacity: 1;
    }
/* تحسين الـ Responsive لمؤشرات الأداء */
@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr); /* صفين بدلاً من 4 */
        gap: 15px;
        margin-top: 30px;
        padding: 0 10px;
    }

    .hero-stat {
        padding: 20px 15px;
        margin: 0;
    }

        .hero-stat .number {
            font-size: 2rem;
            letter-spacing: 0;
        }

        .hero-stat .label {
            font-size: 1rem;
        }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr; /* عمود واحد للشاشات الصغيرة جداً */
        gap: 12px;
    }

    .hero-stat {
        padding: 18px 12px;
    }

        .hero-stat .number {
            font-size: 1.8rem;
        }
}
/* تحسين الـ Responsive للـ Charts */
@media (max-width: 768px) {
    .charts-section {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 10px;
    }

    .chart-card {
        padding: 25px 20px;
        margin: 0 auto;
        max-width: 100%;
    }

    .chart-container {
        height: 300px; /* تقليل الارتفاع في الموبايل */
    }
    /* تأكد من أن الـ Charts في المنتصف */
    .chart-section,
    .chart-card {
        margin-left: auto;
        margin-right: auto;
    }
    /* تحسين عناوين الـ Charts */
    .section-title {
        font-size: 1.5rem;
        text-align: center;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .chart-card {
        padding: 20px 15px;
    }

    .chart-container {
        height: 250px;
    }

    .section-title {
        font-size: 1.3rem;
    }
}
/* تحسين الـ Container العام */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        overflow-x: hidden; /* منع التمرير الأفقي */
    }
    /* إزالة المسافات الزائدة */
    .hero-content {
        padding: 25px 20px;
        margin: 0 10px;
    }
    /* تحسين الـ Grids المختلفة */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr); /* صفين في الموبايل */
        gap: 15px;
        padding: 0 5px;
    }

    .stat-card {
        padding: 20px 15px;
        margin: 0;
    }

        .stat-card .number {
            font-size: 1.5rem;
        }

        .stat-card .label {
            font-size: 1.1rem;
        }
    /* تحسين الـ AI Section */
    .ai-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ai-section {
        padding: 30px 20px;
    }
    /* تحسين الـ Campaign Overview */
    .campaign-overview {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    /* تحسين الفيديوهات */
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    /* تحسين إحصائيات الفيديو */
    .video-stats {
        padding-top: 15px;
    }

    .stat {
        font-size: 1rem;
    }

        .stat i {
            font-size: 1.2rem;
            width: 35px;
            height: 35px;
        }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr; /* عمود واحد للشاشات الصغيرة جداً */
    }

    .stat-card .number {
        font-size: 1.2rem;
    }

    .video-stats {
        flex-wrap: wrap;
        gap: 10px;
    }

    .stat {
        flex: 0 0 calc(50% - 10px); /* عمودين للإحصائيات */
        font-size: 0.9rem;
    }

        .stat i {
            font-size: 1.1rem;
            width: 32px;
            height: 32px;
        }
}
/* تحسين الـ Hero Section للموبايل */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
        margin-bottom: 40px;
        border-radius: 15px;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
        text-align: center;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        text-align: center;
    }

    .hero-date {
        font-size: 0.9rem;
        text-align: center;
    }

    .hero-badge {
        font-size: 1rem;
        padding: 12px 25px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-badge {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}
/* تحسين الـ Footer والـ Pagination للموبايل */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }

    .pagination-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .page-btn {
        width: 100%;
        justify-content: center;
    }
    /* إخفاء الأزرار الثابتة في الموبايل أو تصغيرها */
    .export-btn, .themes-btn, .back-to-top {
        padding: 12px 18px;
        font-size: 0.9rem;
        bottom: 15px;
        left: 15px;
    }

    .themes-btn {
        bottom: 70px;
    }

    .back-to-top {
        bottom: 125px;
    }

    .themes-panel {
        bottom: 180px;
        left: 15px;
        width: 200px;
    }
}
/* تحسين مؤشرات الأداء للموبايل */
@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr) !important; /* إجبار صفين */
        gap: 15px;
        margin-top: 30px;
        padding: 0 5px;
    }

    .hero-stat {
        padding: 20px 15px;
        margin: 0;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

        .hero-stat .number {
            font-size: 1.8rem;
            letter-spacing: 0;
            margin-bottom: 8px;
            text-align: center;
        }

        .hero-stat .label {
            font-size: 0.9rem;
            text-align: center;
            line-height: 1.3;
        }

        .hero-stat .trend {
            font-size: 0.8rem;
            padding: 6px 10px;
            margin-top: 10px;
            text-align: center;
            justify-content: center;
        }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr) !important; /* الحفاظ على صفين */
        gap: 12px;
        padding: 0;
    }

    .hero-stat {
        padding: 15px 10px;
        min-height: 110px;
    }

        .hero-stat .number {
            font-size: 1.6rem;
        }

        .hero-stat .label {
            font-size: 0.85rem;
        }
}

/* إذا كان فيه أي CSS آخر يسبب المشكلة، نضيف هذه القواعد */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    .stat-card {
        padding: 20px 15px;
        text-align: center;
    }

        .stat-card .number {
            font-size: 1.2rem;
        }

        .stat-card .label {
            font-size: 1rem;
        }

        .stat-card .icon {
            font-size: 2.8rem;
            margin-bottom: -15px;
        }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .stat-card {
        padding: 18px 12px;
    }

        .stat-card .number {
            font-size: 1.5rem;
        }

        .stat-card .label {
            font-size: 0.9rem;
        }
}
/* تحسين النجوم في قسم التقييم */
.video-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    font-family: var(--font-body);
    justify-content: center; /* جعل النجوم في المنتصف */
    text-align: center;
    width: 100%;
}

    .video-rating i {
        color: #FFD700; /* لون النجوم أصفر ثابت */
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

/* تحسين الخلايا في الجدول */
.videos-table td {
    padding: 15px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: white;
    text-align: center; /* جعل كل المحتوى في المنتصف */
    vertical-align: middle;
}

.videos-table .video-rating {
    justify-content: center;
    margin: 0 auto;
}

/* تحسين حالة الفيديو */
.video-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-small);
    justify-content: center; /* جعل المحتوى في المنتصف */
    margin: 0 auto;
}
/* إصلاح ألوان الخلفية في السمات الداكنة */
body[class*="theme-"] .videos-table td {
    background: var(--light) !important;
    color: var(--text-dark) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* التأكد من أن النجوم تظهر بشكل صحيح في جميع السمات */
body[class*="theme-"] .video-rating i {
    color: #FFD700 !important; /* لون النجوم أصفر في جميع السمات */
}

/* إصلاح ألوان النص في السمات الداكنة */
body[class*="theme-"] .video-rating {
    color: var(--text-dark) !important;
}

body[class*="theme-"] .video-number {
    color: var(--primary) !important;
}

body[class*="theme-"] .video-desc {
    color: var(--text-dark) !important;
}

body[class*="theme-"] .video-link {
    color: var(--primary) !important;
}

/* إصلاح ألوان الحالات */
body[class*="theme-"] .status-new {
    background: rgba(0, 230, 118, 0.2) !important;
    color: var(--success) !important;
    border: 1px solid var(--success) !important;
}

body[class*="theme-"] .status-trending {
    background: rgba(255, 75, 145, 0.2) !important;
    color: var(--accent) !important;
    border: 1px solid var(--accent) !important;
}
/* تحسين الجدول في الموبايل */
@media (max-width: 768px) {
    .videos-table-section {
        padding: 25px 15px;
        margin: 0 10px 40px;
        overflow-x: auto;
    }

    .videos-table {
        min-width: 600px; /* الحد الأدنى لعرض الجدول */
    }

        .videos-table th,
        .videos-table td {
            padding: 12px 8px;
            font-size: 0.9rem;
            text-align: center;
        }

    .video-rating {
        font-size: 0.85rem;
    }

    .video-status {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* تحسين إضافي للشاشات الصغيرة */
@media (max-width: 480px) {
    .videos-table-section {
        padding: 20px 10px;
        margin: 0 5px 30px;
    }

    .videos-table {
        min-width: 550px;
    }

        .videos-table th,
        .videos-table td {
            padding: 10px 6px;
            font-size: 0.85rem;
        }

    .video-rating {
        flex-direction: column;
        gap: 4px;
    }
}
/* تحسين محاذاة الجدول بالكامل */
.videos-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    overflow: hidden;
    text-align: center; /* محاذاة النص في المنتصف */
}

    .videos-table th {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        padding: 18px;
        text-align: center; /* محاذاة العناوين في المنتصف */
        font-weight: 700;
        font-size: 1.1rem;
        color: white;
        font-family: var(--font-heading);
    }

    .videos-table td {
        padding: 16px;
        border-bottom: 1px solid #eee;
        background: white;
        text-align: center; /* محاذاة المحتوى في المنتصف */
        vertical-align: middle;
    }

        /* تحسين الأعمدة الفردية */
        .videos-table td:first-child {
            font-weight: 700;
            font-size: 1.1rem;
        }

        .videos-table td:nth-child(2) {
            text-align: right; /* وصف الفيديو يبقى على اليمين */
            direction: rtl;
        }

        .videos-table td:nth-child(3),
        .videos-table td:nth-child(4),
        .videos-table td:nth-child(5) {
            text-align: center;
        }
/* تنسيق صورة الشخص والاسم */
.user-profile-header {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 8px 15px 8px 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

    .user-profile-header:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    }

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

.user-role {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-gray);
    font-family: var(--font-body);
}

/* تحسين التنسيق في الموبايل */
@media (max-width: 768px) {
    .user-profile-header {
        top: 15px;
        left: 15px;
        padding: 6px 12px 6px 6px;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
    }

    .user-name {
        font-size: 0.9rem;
    }

    .user-role {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .user-profile-header {
        top: 10px;
        left: 10px;
        padding: 5px 10px 5px 5px;
    }

    .user-avatar {
        width: 35px;
        height: 35px;
    }

    .user-name {
        font-size: 0.85rem;
    }
}
/* إذا كنت تريد الصورة على اليمين */
.user-profile-header.right {
    left: auto;
    right: 20px;
}

@media (max-width: 768px) {
    .user-profile-header.right {
        right: 15px;
    }
}

@media (max-width: 480px) {
    .user-profile-header.right {
        right: 10px;
    }
}
/* تصميم متطور */
.user-profile-header.advanced {
    padding: 10px 20px 10px 10px;
    border-radius: 25px;
}

.avatar-container {
    position: relative;
}

.online-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--success);
    border: 2px solid white;
    border-radius: 50%;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
}
/* تحسين الـ Hero Section للموبايل */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh !important; /* تقليل الطول */
        margin-bottom: 30px;
        border-radius: 15px;
    }

    .hero-content {
        padding: 20px 15px !important;
        margin: 0 5px;
    }

    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 8px;
    }

    .hero-date {
        font-size: 0.85rem !important;
        margin-bottom: 0;
    }

    .hero-badge {
        font-size: 0.9rem !important;
        padding: 10px 20px !important;
        margin-bottom: 20px !important;
    }
    /* تقليل المسافة بين العناصر */
    .hero-content > * {
        margin-bottom: 12px !important;
    }

        .hero-content > *:last-child {
            margin-bottom: 0 !important;
        }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 50vh !important; /* تقليل أكثر للشاشات الصغيرة */
    }

    .hero-title {
        font-size: 1.6rem !important;
    }

    .hero-subtitle {
        font-size: 0.9rem !important;
    }

    .hero-badge {
        font-size: 0.85rem !important;
        padding: 8px 16px !important;
    }
}
/* تحسين إحصائيات الفيديو في الموبايل */
@media (max-width: 768px) {
    .video-stats {
        display: flex !important;
        flex-wrap: nowrap !important; /* منع الانتقال لسطر جديد */
        justify-content: space-between !important;
        gap: 8px !important;
        padding-top: 15px;
        overflow-x: auto; /* إذا كانت الشاشة ضيقة جداً */
    }

    .stat {
        flex: 1 !important; /* كل عنصر يأخذ مساحة متساوية */
        min-width: 60px !important; /* حد أدنى للعرض */
        font-size: 0.8rem !important;
        gap: 4px !important;
    }

        .stat i {
            font-size: 1rem !important;
            width: 32px !important;
            height: 32px !important;
            padding: 6px !important;
        }

        .stat span {
            font-size: 0.75rem !important;
            font-weight: 600;
        }
}

@media (max-width: 480px) {
    .video-stats {
        gap: 5px !important;
    }

    .stat {
        min-width: 55px !important;
        font-size: 0.75rem !important;
    }

        .stat i {
            font-size: 0.9rem !important;
            width: 28px !important;
            height: 28px !important;
            padding: 5px !important;
        }

        .stat span {
            font-size: 0.7rem !important;
        }
}

/* إذا كانت الشاشة ضيقة جداً، نسمح بالتمرير الأفقي */
@media (max-width: 360px) {
    .video-stats {
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .stat {
        min-width: 50px !important;
        flex-shrink: 0; /* منع التقلص */
    }
}
/* تحسين عام للفيديوهات في الموبايل */
@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .video-card {
        margin: 0 5px;
    }

    .video-content {
        padding: 20px;
    }

    .video-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .video-desc {
        font-size: 0.85rem;
        line-height: 1.5;
    }
}

/* تحسين الـ Badge في الموبايل */
@media (max-width: 768px) {
    .video-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
        top: 10px;
        left: 10px;
    }
}
/* تحريك التهنئة للأسفل في الموبايل */
@media (max-width: 768px) {
    .million-celebration-right {
        margin: 20px auto 30px !important; /* تقليل المسافة العلوية وزيادة السفلية */
        position: relative;
        top: 0;
        transform: none;
        font-size: 1rem;
        padding: 12px 20px;
        max-width: 85%;
    }
        /* إذا كنت تريد تحريكها أكثر للأسفل */
        .million-celebration-right.lower {
            margin: 10px auto 40px !important;
        }
    /* تحسين التخطيط العام */
    .hero-section {
        margin-bottom: 20px !important;
    }

    .stats-section {
        margin-top: 10px !important;
    }
}

@media (max-width: 480px) {
    .million-celebration-right {
        margin: 15px auto 25px !important;
        font-size: 0.9rem;
        padding: 10px 16px;
        max-width: 90%;
    }

        .million-celebration-right::before {
            font-size: 1em;
            margin-left: 5px;
        }
}

/* إذا كنت تريد تحريك التهنئة داخل الـ Hero Section */
@media (max-width: 768px) {
    .hero-section {
        position: relative;
        padding-bottom: 20px;
    }

    .million-celebration-right.inside-hero {
        position: absolute;
        bottom: -20px;
        left: 50%;
        transform: translateX(-50%);
        margin: 0 !important;
        z-index: 100;
    }
}
/* إصلاح تداخل علامة X مع النص في الموبايل */
@media (max-width: 768px) {
    .hero-content {
        padding-top: 50px !important; /* زيادة المساحة العلوية */
        position: relative;
    }

    .x-mark-overlay {
        top: -25px !important; /* رفعها أكثر */
        right: 50% !important;
        transform: translateX(50%) !important;
        width: 45px !important;
        height: 45px !important;
        z-index: 5; /* تأكد أنها تحت النص */
    }

    .hero-badge {
        position: relative;
        z-index: 10; /* جعل النص فوق العلامة */
        margin-top: 15px !important; /* تحريك النص لأسفل */
        padding-top: 10px !important;
    }
    /* إذا لسه في تداخل، حرك العلامة لليمين أو اليسار */
    .x-mark-overlay.right-position {
        right: 20px !important;
        left: auto !important;
        transform: none !important;
    }

    .x-mark-overlay.left-position {
        left: 20px !important;
        right: auto !important;
        transform: none !important;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding-top: 45px !important;
    }

    .x-mark-overlay {
        top: -20px !important;
        width: 40px !important;
        height: 40px !important;
    }

    .hero-badge {
        margin-top: 12px !important;
        padding-top: 8px !important;
        font-size: 0.9rem !important;
        padding: 12px 25px !important;
    }
}
/* رفع علامة X قليلاً للأعلى في الموبايل */
@media (max-width: 768px) {
    .x-mark-overlay {
        top: -30px !important; /* رفعها أكثر */
        right: 50% !important;
        transform: translateX(50%) !important;
        width: 40px !important;
        height: 40px !important;
    }

    .hero-content {
        padding-top: 35px !important; /* تقليل المساحة العلوية */
    }

    .hero-badge {
        margin-top: 5px !important; /* تقريب النص من الأعلى */
    }
}

@media (max-width: 480px) {
    .x-mark-overlay {
        top: -25px !important;
        width: 35px !important;
        height: 35px !important;
    }

    .hero-content {
        padding-top: 30px !important;
    }
}
/* تعديل تنسيق خيارات التصدير */
.export-options {
    display: flex;
    justify-content: center; /* توسيط الزر */
    gap: 15px;
    margin: 30px 0;
}

.export-option {
    background: white;
    border: 2px solid var(--primary);
    border-radius: var(--border-radius);
    padding: 25px 30px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 120px;
}

    .export-option:hover {
        border-color: var(--primary);
        transform: translateY(-5px);
        background: var(--light-blue);
    }

    .export-option i {
        font-size: 2.5rem;
        margin-bottom: 10px;
        color: var(--primary);
    }

.expiry-celebration-right {
    position: relative;
    background: linear-gradient(135deg, #ff6b6b, #ff4d4d); /* red gradient */
    color: #fff;
    padding: 15px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: .8rem;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.4);
    margin: -30px auto 40px;
    width: fit-content;
    text-align: center;
    animation: expiry-float 4s ease-in-out infinite;
    border: 2px solid #fff;
    z-index: 100;
    max-width: 90%;
}

    .expiry-celebration-right::before {
        content: "⚠️";
        font-size: .8rem;
        animation: blink 1.5s infinite;
        margin-left: 10px;
    }

/* Same floating animation as the celebration version */
@keyframes expiry-float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Warning icon animation */
@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.stats-filter-header {
    background: #ffffff;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
    gap: 20px;
}

    /* text section */
    .stats-filter-header .text h3 {
        margin: 0;
        font-size: 20px;
        font-weight: 700;
    }

    .stats-filter-header .text p {
        margin: 3px 0 0;
        font-size: 14px;
        color: #666;
    }

/* buttons */
.time-filter-row {
    display: flex;
    gap: 10px;
}

.time-filter-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #f6f6f6;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s ease;
    white-space: nowrap;
}

    .time-filter-btn.active {
        background: #4a90e2;
        color: #fff;
        border-color: #4a90e2;
        font-weight: bold;
    }

/*  🔥 MOBILE FIX 🔥 */
@media (max-width: 768px) {
    .stats-filter-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: right;
        padding: 15px 18px;
    }

        .stats-filter-header .text h3 {
            font-size: 18px;
        }

        .stats-filter-header .text p {
            font-size: 13px;
        }

    .time-filter-row {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
    }

    .time-filter-btn {
        flex: 1; /* all 3 buttons same width */
        text-align: center;
        padding: 10px;
        font-size: 13px ;
        
    }
}
 

