:root {
        /* Common Layout */
        --grid-size: calc(100vw / 12);

        /* LIGHT MODE COLORS (Default) */
        --grid-line: rgba(128, 128, 128, 0.1); /* Faint Grey Static Grid */
        --beam-color: rgba(0, 0, 0, 0.7);      /* Black Drops */
        --beam-shadow: none;                   /* No Glow */
    }

    /* SYSTEM DARK MODE DETECTOR */
    @media (prefers-color-scheme: dark) {
        :root {
            /* DARK MODE OVERRIDES */
            --grid-line: rgba(255, 255, 255, 0.1); /* Faint White Static Grid */
            --beam-color: rgba(255, 255, 255, 0.5);                 /* Pure White Drops */
            --beam-shadow: 0 0 0px rgba(255, 255, 255, 0.5); /* Heavy White Glow */
        }
    }

    /* --- 1. VERTICAL BEAM (Long Smooth Drop) --- */
    .v-beam {
        position: absolute;
        top: -350px; bottom: 0; right: -1px; width: 1px;
        height: 350px; 
        /* Gradient uses Variable */
        background: linear-gradient(to bottom, transparent 0%, var(--beam-color) 50%, transparent 100%);
        box-shadow: var(--beam-shadow);
        display: none; 
        animation: drop-vertical 4s linear infinite;
    }

    /* --- 2. HORIZONTAL BEAM (Long Smooth Drop) --- */
    .h-beam {
        position: absolute;
        left: -350px; right: 0; bottom: -1px; height: 1px;
        width: 350px;
        /* Gradient uses Variable */
        background: linear-gradient(to right, transparent 0%, var(--beam-color) 50%, transparent 100%);
        box-shadow: var(--beam-shadow);
        display: none; 
        animation: drop-horizontal 5s linear infinite;
    }

    /* --- 3. SHOW ONLY ON ODD LINES --- */
    .v-col:nth-child(odd) .v-beam { display: block; opacity: 0.6; }
    .h-row:nth-child(odd) .h-beam { display: block; opacity: 0.6; }

    /* --- 4. ANIMATIONS --- */
    @keyframes drop-vertical {
        0% { top: -350px; }
        100% { top: 100vh; }
    }
    @keyframes drop-horizontal {
        0% { left: -350px; }
        100% { left: 100vw; }
    }

    /* --- 5. RANDOM DELAYS --- */
    .v-col:nth-child(1) .v-beam { animation-delay: 0s; }
    .v-col:nth-child(3) .v-beam { animation-delay: 2s; }
    .v-col:nth-child(5) .v-beam { animation-delay: 1s; }
    .v-col:nth-child(7) .v-beam { animation-delay: 3s; }
    .v-col:nth-child(9) .v-beam { animation-delay: 0.5s; }
    
    .h-row:nth-child(1) .h-beam { animation-delay: 1.5s; }
    .h-row:nth-child(3) .h-beam { animation-delay: 0.2s; }
    .h-row:nth-child(5) .h-beam { animation-delay: 2.8s; }
    .h-row:nth-child(7) .h-beam { animation-delay: 1.1s; }
    .h-row:nth-child(9) .h-beam { animation-delay: 3.5s; }
    .h-row:nth-child(11) .h-beam { animation-delay: 0.5s; }
    .h-row:nth-child(13) .h-beam { animation-delay: 2.2s; }



@keyframes shimmer-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}
.animate-shimmer-slide {
    animation: shimmer-slide 3s infinite linear;
}
body,html{
    font-smooth: always;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    scroll-behavior: smooth;
}


/* --- CORE LAYOUT & SIDEBAR --- */
#sidebar { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 50; }

/* Desktop */
@media (min-width: 768px) {
    .sidebar-open #sidebar { transform: translateX(0); }
    .sidebar-closed #sidebar { transform: translateX(-100%); }
    .sidebar-open #mainContent { margin-left: 280px; }
    .sidebar-closed #mainContent { margin-left: 0; }
}
/* Mobile */
@media (max-width: 767px) {
    .sidebar-open #sidebar { transform: translateX(0); box-shadow: 10px 0 30px rgba(0,0,0,0.2); }
    .sidebar-closed #sidebar { transform: translateX(-100%); }
    #mainContent { margin-left: 0 !important; width: 100%; }
}

/* --- TYPEAHEAD / DROPDOWN --- */
/* Added dark mode support via Tailwind classes mainly, but kept structure here */
.typeahead-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    z-index: 60; display: none; max-height: 400px; overflow-y: auto; margin-top: 4px; padding: 0; list-style: none;
}
.hs-search-item { display: flex; align-items: center; padding: 12px 16px; cursor: pointer; transition: background 0.2s; text-decoration: none; }
.hs-search-img { width: 50px; height: 50px; border-radius: 6px; object-fit: cover; margin-right: 15px; flex-shrink: 0; }
.hs-search-content { flex: 1; min-width: 0; }
.hs-search-title { display: block; font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-search-desc { display: block; font-size: 0.75rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-search-load-more { text-align: center; padding: 10px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }

/* --- ANIMATIONS --- */
.post-card { opacity: 0; animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }
.skeleton-bg { background-image: linear-gradient(to right, var(--tw-gradient-from) 0%, var(--tw-gradient-to) 20%, var(--tw-gradient-from) 40%, var(--tw-gradient-from) 100%); background-repeat: no-repeat; background-size: 800px 100%; animation: shimmer 1.5s infinite linear; }

/* --- UTILS --- */
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1); }
.grid-btn.active { background-color: #ff7a59; color: white; border-color: #ff7a59; }
.toggle-checkbox:checked { right: 0; border-color: #ff7a59; }
.toggle-checkbox:checked + .toggle-label { background-color: #ff7a59; }
.select-wrapper::after { content: '\f0d7'; font-family: 'Font Awesome 5 Free'; font-weight: 900; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: #64748b; font-size: 0.8rem; }

/* Scrollbar reset to default (Removed custom-scroll class styles) */