        * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Cairo", sans-serif;
    background: hsl(220 25% 8% / 1);
    color: #fff;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(to right, hsl(240 10% 20%) 1px, transparent 1px),
        linear-gradient(to bottom, hsl(240 10% 20%) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    background: rgba(10, 14, 39, 0.8);
}

.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #7c3aed;
}

.nav-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s;
}

.nav-btn:hover {
    transform: translateY(-2px);
}

.container {
    margin-top: 5rem;
    padding: 2rem 5%;
    position: relative;
    z-index: 1;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 4rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.highlight {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: #94a3b8;
    font-size: 1rem;
}

.quick-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.action-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.3);
}

.action-btn.secondary {
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: #a855f7;
}

.action-btn.secondary:hover {
    background: rgba(124, 58, 237, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(124, 58, 237, 0.5);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.85rem;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stat-change.negative {
    color: #ef4444;
}

/* Blog Analytics Section */
.analytics-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #a855f7;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.blog-stat-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.blog-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #a855f7;
    margin-bottom: 0.5rem;
}

.blog-stat-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Top Blogs Table */
.top-blogs-table {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.table-header {
    display: grid;
    grid-template-columns: 100px 1fr 2fr 60px;
    padding: 1rem 1.5rem;
    background: rgba(124, 58, 237, 0.1);
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    font-weight: 600;
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-row {
    display: grid;
    grid-template-columns: 100px 1fr 2fr 60px;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    align-items: center;
}

.table-row:hover {
    background: rgba(124, 58, 237, 0.05);
    border-right: 4px solid #7c3aed;
}

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

.rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: #a855f7;
}

.blog-title {
    font-weight: 600;
    color: #fff;
}

.category-badge {
    background: rgba(124, 58, 237, 0.2);
    color: #a855f7;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.views-count {
    font-family: "JetBrains Mono", monospace;
    color: #cbd5e1;
    font-weight: 600;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(124, 58, 237, 0.2);
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .table-header,
    .table-row {
        grid-template-columns: 80px 2fr 50px;
    }

    .table-header > :nth-child(2),
    .table-row > :nth-child(2) {
        display: none;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .logo img {
        height: 32px;
        max-width: 120px;
    }

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

    .quick-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

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

    .table-header,
    .table-row {
        grid-template-columns: 1fr 80px;
        padding: 1rem;
    }

    .table-header > :nth-child(1),
    .table-header > :nth-child(2),
    .table-row > :nth-child(1),
    .table-row > :nth-child(2) {
        display: none;
    }
}