:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --gold: #d4af37;
    --gold-light: #f0d060;
    --gold-dark: #b8962f;
    --purple-deep: #2d0a4e;
    --purple-dark: #4a0e78;
    --purple-main: #6b2fa0;
    --purple-light: #9b5de5;
    --purple-glow: rgba(107, 47, 160, 0.3);
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0b0;
    --accent-blue: #4a9eff;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ===== Navigation ===== */
.navbar {
    background: rgba(10, 10, 15, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(107, 47, 160, 0.2);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand-dxb { color: var(--gold); }
.brand-blog { color: var(--text-primary); }

.nav-link {
    font-weight: 500;
    transition: color 0.3s;
    color: var(--text-secondary) !important;
}

.nav-link:hover { color: var(--gold) !important; }
.nav-link.active { color: var(--purple-light) !important; }

/* ===== Hero Section ===== */
.hero-section {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 30%, var(--purple-deep) 70%, #0a0a0f 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 6s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--gold) 50%, var(--purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.text-gold { color: var(--gold) !important; -webkit-text-fill-color: var(--gold); }
.text-purple { color: var(--purple-light) !important; -webkit-text-fill-color: var(--purple-light); }

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-visual {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-icon {
    font-size: 6rem;
    background: linear-gradient(135deg, var(--gold), var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== Posts Section ===== */
.posts-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--purple-light));
    border-radius: 2px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid rgba(107, 47, 160, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    height: 100%;
    position: relative;
    transition: all 0.4s ease;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--purple-light), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: rgba(107, 47, 160, 0.3);
    box-shadow: 0 20px 50px rgba(107, 47, 160, 0.15), 0 0 30px rgba(212, 175, 55, 0.05);
}

.post-card:hover::before {
    transform: translateX(100%);
}

.post-card-body {
    position: relative;
    z-index: 1;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.post-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-category.crypto { background: rgba(245, 158, 11, 0.15); color: var(--accent-orange); }
.post-category.finance { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.post-category.dubai { background: rgba(212, 175, 55, 0.15); color: var(--gold); }
.post-category.tech { background: rgba(107, 47, 160, 0.2); color: var(--purple-light); }

.post-date, .post-views {
    color: var(--text-secondary);
}

.post-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover { color: var(--purple-light); }

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.post-card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

/* ===== Post Article ===== */
.post-article {
    padding: 8rem 0 4rem;
}

.post-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-article .post-title {
    font-size: 2.5rem;
    margin: 1.5rem 0;
    background: linear-gradient(135deg, #fff 0%, var(--gold) 50%, var(--purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-author-info {
    margin-top: 1.5rem;
}

.author-name {
    font-weight: 600;
    display: block;
}

.author-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
}

.post-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--gold);
    border-bottom: 1px solid rgba(107, 47, 160, 0.2);
    padding-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--purple-light);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content a {
    color: var(--purple-light);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.3s;
}

.post-content a:hover {
    color: var(--gold);
}

.post-content code {
    background: rgba(107, 47, 160, 0.15);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--purple-light);
}

.post-content blockquote {
    border-left: 3px solid var(--purple-light);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(107, 47, 160, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0;
}

.tag {
    padding: 0.3rem 0.8rem;
    background: rgba(107, 47, 160, 0.1);
    border: 1px solid rgba(107, 47, 160, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.tag:hover {
    background: rgba(107, 47, 160, 0.2);
    color: var(--purple-light);
}

.post-share {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

.post-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.nav-link:hover { color: var(--gold); }

.nav-text {
    font-size: 0.9rem;
}

/* ===== Page Content (About, Contact, Privacy) ===== */
.page-section {
    padding: 8rem 0 4rem;
}

.page-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
}

.page-content h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--gold) 50%, var(--purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--gold);
}

.page-content p {
    margin-bottom: 1.5rem;
}

.page-content ul, .page-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

/* ===== Newsletter ===== */
.newsletter-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--purple-deep) 100%);
    border-top: 1px solid rgba(107, 47, 160, 0.2);
    border-bottom: 1px solid rgba(107, 47, 160, 0.2);
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
    border-radius: 50%;
}

.newsletter-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.newsletter-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
    color: #000;
    font-weight: 700;
    border: none;
    padding: 0.75rem 2rem;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    color: #000;
}

.btn-purple {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple-main), var(--purple-light));
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 0.75rem 2rem;
    transition: all 0.3s;
}

.btn-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--purple-glow);
    color: #fff;
}

/* ===== Footer ===== */
.footer {
    padding: 4rem 0 2rem;
    background: var(--bg-primary);
    border-top: 1px solid rgba(107, 47, 160, 0.15);
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover { color: var(--purple-light); }

.footer h5 {
    color: var(--gold);
    margin-bottom: 1.2rem;
}

.social-links a:hover {
    color: var(--purple-light) !important;
}

.footer-divider {
    border-color: rgba(107, 47, 160, 0.2);
    margin: 2rem 0;
}

/* ===== Pagination ===== */
.pagination .page-link {
    background: var(--bg-card);
    border-color: rgba(107, 47, 160, 0.2);
    color: var(--text-primary);
    transition: all 0.3s;
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple-main));
    color: #fff;
    border-color: var(--purple-main);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple-main));
    border-color: var(--purple-main);
    color: #fff;
}

/* ===== Admin ===== */
.admin-section {
    padding-top: 6rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(107, 47, 160, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: rgba(107, 47, 160, 0.3);
    box-shadow: 0 5px 20px var(--purple-glow);
}

.stat-icon {
    font-size: 2rem;
    color: var(--purple-light);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===== Category Badge in Hero ===== */
.category-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(107, 47, 160, 0.15);
    border: 1px solid rgba(107, 47, 160, 0.3);
    border-radius: 30px;
    font-size: 1.2rem;
    color: var(--purple-light);
}

/* ===== Card Styles ===== */
.card {
    background: var(--bg-card) !important;
    border-color: rgba(107, 47, 160, 0.15) !important;
}

.card-header {
    background: rgba(107, 47, 160, 0.1) !important;
    border-bottom: 1px solid rgba(107, 47, 160, 0.15) !important;
}

/* ===== Table Styles ===== */
.table-dark {
    --bs-table-bg: var(--bg-card);
}

.badge.bg-crypto { background: var(--accent-orange) !important; }
.badge.bg-finance { background: var(--accent-green) !important; }
.badge.bg-dubai { background: var(--gold) !important; color: #000 !important; }
.badge.bg-tech { background: var(--purple-main) !important; }

/* ===== AdSense Placeholder ===== */
.adsense-container {
    text-align: center;
    padding: 2rem;
    margin: 2rem 0;
    background: rgba(107, 47, 160, 0.05);
    border: 1px dashed rgba(107, 47, 160, 0.2);
    border-radius: 12px;
    min-height: 100px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .post-article .post-title {
        font-size: 1.6rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .newsletter-title {
        font-size: 1.5rem;
    }

    .page-content h1 {
        font-size: 2rem;
    }
}

/* ===== Loading Spinner ===== */
.spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* ===== Alert Customization ===== */
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--accent-orange);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
}

.alert-info {
    background: rgba(107, 47, 160, 0.1);
    border-color: rgba(107, 47, 160, 0.3);
    color: var(--purple-light);
}

/* ===== Improved Table Styles ===== */
.post-content table,
.page-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.6;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.post-content thead,
.page-content thead {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple-main));
}

.post-content th,
.page-content th {
    padding: 1rem 1.2rem;
    font-weight: 600;
    text-align: left;
    color: #fff;
    border-bottom: 2px solid var(--purple-light);
    letter-spacing: 0.5px;
}

.post-content td,
.page-content td {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid rgba(107, 47, 160, 0.1);
    vertical-align: top;
}

.post-content tbody tr:nth-child(even),
.page-content tbody tr:nth-child(even) {
    background: rgba(107, 47, 160, 0.06);
}

.post-content tbody tr:hover,
.page-content tbody tr:hover {
    background: rgba(107, 47, 160, 0.12);
    transition: background 0.2s ease;
}

.post-content tbody tr:last-child td,
.page-content tbody tr:last-child td {
    border-bottom: none;
}

/* ===== Improved Content Spacing ===== */
.post-content,
.page-content {
    line-height: 1.9;
    letter-spacing: 0.01em;
}

.post-content p,
.page-content p {
    margin-bottom: 1.5rem;
}

.post-content ul li,
.post-content ol li,
.page-content ul li,
.page-content ol li {
    margin-bottom: 0.6rem;
    line-height: 1.7;
}

/* ===== Better Code Blocks ===== */
.post-content pre,
.page-content pre {
    background: var(--bg-card);
    border: 1px solid rgba(107, 47, 160, 0.2);
    border-radius: 12px;
    padding: 1.2rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 1.5rem 0;
    position: relative;
}

.post-content pre code,
.page-content pre code {
    background: none;
    padding: 0;
    font-size: 0.9rem;
    color: var(--accent-green);
}

/* ===== Blockquote Improvements ===== */
.post-content blockquote,
.page-content blockquote {
    border-left: 4px solid var(--gold);
    padding: 1.2rem 1.8rem;
    margin: 1.8rem 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(107, 47, 160, 0.05));
    border-radius: 0 12px 12px 0;
    font-style: italic;
    font-size: 1.05rem;
}

/* ===== Image Improvements ===== */
.post-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* ===== Horizontal Rule ===== */
.post-content hr,
.page-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--purple-main), transparent);
    margin: 2.5rem 0;
}


/* ===== Custom Category Dropdown - Hover Only ===== */
.custom-dropdown {
    position: relative;
}

.custom-dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.custom-dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.3em;
    font-size: 0.75em;
    transition: transform 0.2s ease;
}

.custom-dropdown:hover .custom-dropdown-toggle::after {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    min-width: 180px;
    padding: 0.5rem 0;
    margin: 0.25rem 0 0;
    background-color: #1a1d23;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    list-style: none;
}

/* Show on hover - parent hover */
.custom-dropdown:hover .custom-dropdown-menu,
.custom-dropdown-menu:hover {
    display: block;
    opacity: 1;
    visibility: visible;
}

.custom-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.6rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.custom-dropdown-item:hover {
    background-color: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
}

/* First and last item border radius */
.custom-dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.custom-dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

/* Mobile: tap to toggle */
@media (max-width: 991.98px) {
    .custom-dropdown-menu {
        position: static;
        transform: none;
        left: auto;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 1rem;
    }
    
    .custom-dropdown-menu.show-mobile {
        display: block;
        opacity: 1;
        visibility: visible;
    }
}

/* ===== Footer Categories ===== */
.footer-categories li {
    margin-bottom: 0.5rem;
}

.footer-categories li a {
    display: inline-block;
    padding: 0.25rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s, transform 0.2s;
}

.footer-categories li a:hover {
    color: var(--purple-light);
    transform: translateX(4px);
}


/* ===== Navigation Icons Uniform Size ===== */
.nav-link .bi,
.nav-link [class^="bi-"] {
    font-size: 1.1rem;
    vertical-align: middle;
}

/* Uniform emoji/icon size in dropdown and footer */
.custom-dropdown-item .emoji,
.custom-dropdown-item img,
.custom-dropdown-item svg,
.footer-categories li a .emoji,
.footer-categories li a img,
.footer-categories li a svg,
.nav-link .emoji-icon {
    display: inline-block;
    width: 1.3em;
    height: 1.3em;
    font-size: 1.1rem;
    text-align: center;
    vertical-align: middle;
    line-height: 1.3em;
}

/* Force uniform size for all emoji characters in nav */
.custom-dropdown-item,
.footer-categories li a {
    font-size: 0.95rem;
}

/* All category icons same width */
.custom-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-dropdown-item::before {
    content: '';
    display: inline-block;
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

/* Uniform image/icons in post content */
.post-content img[src*="/static/img/"] {
    max-width: 120px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
    margin: 1rem auto;
}

.post-content img[src*="/static/img/"].expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    max-width: 80vw;
    max-height: 80vh;
    z-index: 9999;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.8);
    border-radius: 8px;
}

/* ===== Lightbox for article images ===== */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.post-content img.lightbox-expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    z-index: 99999;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.85);
    cursor: zoom-out;
    transition: all 0.3s ease;
}

/* Force uniform icon/emoji size in navbar dropdown and footer */
.custom-dropdown-item {
    font-size: 15px !important;
    line-height: 1.4 !important;
}

.custom-dropdown-item::before {
    content: '';
    display: inline-block;
    width: 28px !important;
    text-align: center;
    font-size: 18px !important;
    line-height: 1 !important;
    vertical-align: middle;
}

.custom-dropdown-item .emoji,
.custom-dropdown-item img,
.custom-dropdown-item svg,
.footer-categories li a .emoji,
.footer-categories li a img,
.footer-categories li a svg {
    width: 28px !important;
    height: 28px !important;
    font-size: 18px !important;
    line-height: 28px !important;
    vertical-align: middle !important;
    text-align: center !important;
    display: inline-block !important;
}

/* Footer categories uniform */
.footer-categories li a {
    font-size: 16px !important;
    line-height: 2 !important;
}

/* ===== Uniform Nav Icon Width ===== */
.nav-icon {
    display: inline-block !important;
    width: 28px !important;
    min-width: 28px !important;
    text-align: center !important;
    font-size: 18px !important;
    line-height: 28px !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

.custom-dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.footer-categories li a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* ===== Cookie Consent Banner ===== */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border-top: 1px solid #333;
    z-index: 9999;
    padding: 14px 0;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 250px;
}

.cookie-consent-text p {
    margin: 0;
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-consent-text p strong {
    color: #f0c040;
}

.cookie-link {
    color: #a78bfa;
    text-decoration: underline;
}

.cookie-link:hover {
    color: #c4b5fd;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-consent-buttons .btn-warning {
    background: #f0c040;
    border-color: #f0c040;
    color: #1a1a2e;
    font-weight: 600;
}

.cookie-consent-buttons .btn-warning:hover {
    background: #f5d060;
    border-color: #f5d060;
    color: #1a1a2e;
}

.cookie-consent-buttons .btn-outline-secondary {
    color: #aaa;
    border-color: #555;
}

.cookie-consent-buttons .btn-outline-secondary:hover {
    color: #fff;
    border-color: #888;
    background: rgba(255,255,255,0.1);
}

/* ===== Admin Fixes: main-content padding for fixed navbar ===== */
.main-content {
    padding-top: 76px;
    min-height: 80vh;
}

/* ===== Admin Edit Page ===== */
.edit-container {
    padding: 2rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.edit-container h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #f0c27f, #fc5c7d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.edit-card {
    background: var(--bg-card);
    border: 1px solid rgba(107, 47, 160, 0.15);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.edit-card .form-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.edit-card .form-control,
.edit-card .form-select {
    background: #0a0a1a;
    border: 1px solid #2a2a3e;
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    transition: all 0.3s;
}

.edit-card .form-control:focus,
.edit-card .form-select:focus {
    border-color: var(--purple-main);
    box-shadow: 0 0 0 3px rgba(107, 47, 160, 0.2);
    background: #0a0a1a;
    color: #fff;
}

.edit-card .form-control::placeholder {
    color: #555;
}

.edit-card textarea#content {
    min-height: 400px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

.char-count span {
    color: var(--gold);
    font-weight: 600;
}

/* ===== Preview Box ===== */
.preview-box {
    background: #0a0a1a;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 200px;
    max-height: 500px;
    overflow-y: auto;
    color: #ddd;
    font-size: 0.95rem;
    line-height: 1.7;
}

.preview-box h1 { font-size: 1.6rem; color: var(--gold); margin: 1rem 0 0.5rem; }
.preview-box h2 { font-size: 1.3rem; color: var(--gold); margin: 1rem 0 0.5rem; }
.preview-box h3 { font-size: 1.1rem; color: var(--purple-light); margin: 0.8rem 0 0.4rem; }
.preview-box p { margin-bottom: 0.8rem; }
.preview-box img { max-width: 100%; border-radius: 8px; margin: 0.8rem 0; }
.preview-box strong { color: #fff; }
.preview-box code { background: rgba(107, 47, 160, 0.15); padding: 2px 6px; border-radius: 4px; font-size: 0.9rem; color: var(--accent-green); }
.preview-box pre { background: #000; border-radius: 8px; padding: 1rem; overflow-x: auto; }
.preview-box pre code { background: none; padding: 0; }
.preview-box blockquote { border-left: 3px solid var(--gold); padding: 0.5rem 1rem; margin: 0.8rem 0; background: rgba(212,175,55,0.05); border-radius: 0 8px 8px 0; }
.preview-box ul, .preview-box ol { padding-left: 1.5rem; margin-bottom: 0.8rem; }
.preview-box li { margin-bottom: 0.3rem; }

/* ===== Edit Buttons ===== */
.btn-save {
    background: linear-gradient(135deg, #f0c27f, #fc5c7d);
    border: none;
    color: #000;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 10px;
    transition: all 0.3s;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240,194,127,0.3);
    color: #000;
}

.btn-cancel {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
    padding: 12px 28px;
    border-radius: 10px;
    transition: all 0.3s;
    margin-right: 8px;
}

.btn-cancel:hover {
    border-color: #888;
    color: #fff;
}

/* ===== Admin Table Responsive ===== */
@media (max-width: 768px) {
    .admin-section {
        padding-top: 5rem !important;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .edit-container {
        padding: 1rem 0.5rem;
    }

    .edit-card {
        padding: 1rem;
    }

    .edit-card textarea#content {
        min-height: 300px;
        font-size: 0.85rem;
    }

    .table-responsive table {
        font-size: 0.8rem;
    }

    .table-responsive .btn-group .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

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

    .edit-container h1 {
        font-size: 1.3rem;
    }

    /* Restore admin card grid for mobile */
    .admin-section .row.g-4 .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Fix post generator + API settings on mobile */
    .admin-section .col-lg-6 {
        padding-left: 0;
        padding-right: 0;
    }

    /* Better post generator button on mobile */
    #generateBtn {
        padding: 10px !important;
        font-size: 0.9rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .admin-section .row.g-4 .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .edit-card .row .col-md-8,
    .edit-card .row .col-md-4,
    .edit-card .row .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ===== Admin Login Page Responsive ===== */
@media (max-width: 576px) {
    .login-card {
        padding: 2rem 1.5rem !important;
        margin: 0 1rem;
    }
}

/* ===== Admin Preview for mobile ===== */
@media (max-width: 768px) {
    .preview-box {
        max-height: 350px;
        font-size: 0.85rem;
        padding: 1rem;
    }
}

/* ===== Admin panel card improvements ===== */
.card.bg-dark {
    background: var(--bg-card) !important;
}

.card-header h5 {
    color: var(--gold);
    font-weight: 600;
}

/* ===== Generate button loading state ===== */
#generateBtn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* ===== Fix admin action buttons alignment ===== */
.admin-section .btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* ===== Admin stats row equal height ===== */
.admin-section .stat-card {
    height: 100%;
}

/* ===== Admin table column widths ===== */
.table-responsive table th:first-child,
.table-responsive table td:first-child {
    min-width: 180px;
}

.table-responsive table th:nth-child(2),
.table-responsive table td:nth-child(2) {
    min-width: 70px;
}

.table-responsive table th:last-child,
.table-responsive table td:last-child {
    min-width: 80px;
    white-space: nowrap;
}

/* ===== Flash messages in admin ===== */
.admin-section .alert {
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ===== Image upload area improvement ===== */
#dropZone {
    background: #0a0a1a;
    border: 2px dashed #333;
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s;
}

#dropZone.dragover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
}

/* ===== Admin edit save button area ===== */
.edit-card .d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 576px) {
    .edit-card .d-flex.justify-content-between {
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .edit-card .d-flex.justify-content-between > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-save, .btn-cancel {
        width: 100%;
        text-align: center;
    }
}

/* ===== Select dropdown in dark mode ===== */
.edit-card .form-select option {
    background: #1a1a2e;
    color: #fff;
}

/* ===== Admin table row hover ===== */
.table-dark tbody tr {
    transition: background 0.2s;
}

/* ===== Fix admin page title alignment ===== */
.admin-section .d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-section .d-flex.justify-content-between h1 {
    font-size: 1.8rem;
}

@media (max-width: 576px) {
    .admin-section .d-flex.justify-content-between h1 {
        font-size: 1.3rem;
    }
}

/* ===== Fix "You are logged in as" message ===== */
.admin-section .card .alert {
    margin-bottom: 0;
}

/* ===== Admin input group fix ===== */
.admin-section .input-group .form-control {
    border-right: none;
}

.admin-section .input-group .btn {
    border-left: none;
}

/* ===== Comments Section ===== */
.comments-section {
    margin-top: 3rem;
}

.comments-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.bg-dark-secondary {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}

.comment-form .card-title {
    font-size: 1.1rem;
    font-weight: 500;
}

.comment-form .form-control {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
}

.comment-form .form-control:focus {
    background: rgba(0,0,0,0.4);
    border-color: var(--purple-light);
    box-shadow: 0 0 0 0.2rem rgba(107, 47, 160, 0.25);
    color: #fff;
}

.comment-form .form-control::placeholder {
    color: rgba(255,255,255,0.4);
}

.comment-card {
    transition: transform 0.15s;
}

.comment-card:hover {
    transform: translateX(4px);
}

.comment-author strong {
    color: var(--purple-light);
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-actions .btn {
    padding: 0.15rem 0.4rem;
    font-size: 0.8rem;
}

.comment-count {
    font-size: 0.9rem;
}

/* Delete confirmation */
.comment-delete-confirm {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
}

/* Modal dark theme */
.modal-content.bg-dark {
    border: 1px solid rgba(255,255,255,0.1);
}

.modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 576px) {
    .comments-section {
        margin-top: 2rem;
    }
    
    .comment-card .card-body {
        padding: 0.75rem;
    }
    
    .comment-actions .btn {
        padding: 0.1rem 0.3rem;
        font-size: 0.7rem;
    }
}
