body {
    background-color: #f8fafc;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Modern Ad Placeholder Styling */
.ad-space {
    position: relative;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    max-width: 100%;
}

.ad-space::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

/* --- Rail Ads / Skyscraper Ads Optimization --- */
.rail-ad-left,
.rail-ad-right {
    display: none;
    position: fixed;
    top: 130px;
    z-index: 40;
}

@media (min-width: 1920px) {
    .rail-ad-left {
        display: block;
        left: calc(50% - 640px - 320px);
    }

    .rail-ad-right {
        display: block;
        right: calc(50% - 640px - 180px);
    }
}

/* Smooth Image Zoom on Hover */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

.group:hover .img-hover-zoom img {
    transform: scale(1.05);
}

/* Hide scrollbar for top navbar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- Dark Mode Overrides --- */
.dark body {
    background-color: #0f172a;
    color: #f1f5f9;
}

.dark .bg-white {
    background-color: #1e293b !important;
}

.dark .border-slate-100 {
    border-color: #334155 !important;
}

.dark .border-slate-200 {
    border-color: #475569 !important;
}

.dark .text-slate-900 {
    color: #f8fafc !important;
}

.dark .text-slate-800 {
    color: #f1f5f9 !important;
}

.dark .text-slate-700 {
    color: #e2e8f0 !important;
}

.dark .text-slate-600 {
    color: #cbd5e1 !important;
}

.dark .text-slate-500 {
    color: #94a3b8 !important;
}

.dark .text-slate-400 {
    color: #64748b !important;
}

.dark .bg-slate-50 {
    background-color: #0f172a !important;
}

.dark .bg-slate-100 {
    background-color: #334155 !important;
}

.dark .bg-white\/70 {
    background-color: rgba(30, 41, 59, 0.8) !important;
}

.dark .from-white {
    --tw-gradient-from: #1e293b !important;
}

.dark .via-white\/90 {
    --tw-gradient-via: rgba(30, 41, 59, 0.9) !important;
}

.dark .hover\:bg-slate-50:hover {
    background-color: #334155 !important;
}

.dark .hover\:bg-slate-200:hover {
    background-color: #475569 !important;
}

.dark .shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5) !important;
}

.dark .bg-brand-50 {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
}

.dark .text-brand-600 {
    color: #60a5fa !important;
}

.dark .hover\:text-brand-600:hover {
    color: #93c5fd !important;
}

.dark .ad-space {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-color: #475569 !important;
    color: #94a3b8 !important;
}

.dark .ad-space::before {
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent) !important;
}

.dark #search-input,
.dark #mobile-search-input {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

.dark #search-input:focus,
.dark #mobile-search-input:focus {
    background-color: #1e293b !important;
    border-color: #3b82f6 !important;
}

/* --- Speed Optimization --- */
.category-section {
    content-visibility: auto;
    contain-intrinsic-size: 1000px;
}