* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #020617;
    color: #e5e7eb;
}

a {
    color: #60a5fa;
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* HEADER */
.header {
    padding: 16px 20px;
    background: #020617;
    border-bottom: 1px solid #1f2937;
    display: flex;
    align-items: center;
    justify-content: space-between; /* was center */
}
.logo-wrap img {
    height: 36px;
    width: auto;
    display: block;
}
.header-title-block {
    display: flex;
    flex-direction: column;
}
.header h1 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 1px;
}
.header small {
    color: #9ca3af;
    font-size: 12px;
}

/* TOP FLOATING FILTER BAR */
.top-filter-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #020617;
    padding: 10px 20px 12px;
    border-bottom: 1px solid #0b1120;
    box-shadow: 0 10px 25px rgba(0,0,0,0.9);
}

.top-filter-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.top-filter-bar .search-box {
    margin-bottom: 0;
}

/* LAYOUT */
.container {
    display: flex;
    padding: 20px;
    gap: 20px;
}
.content { flex: 3; }
.sidebar {
    flex: 1;
    background: radial-gradient(circle at top left, rgba(37,99,235,0.16), transparent 55%),
                radial-gradient(circle at bottom right, rgba(15,23,42,0.9), #020617);
    padding: 18px 18px 16px;
    border-radius: 18px;
    border: 1px solid rgba(30,64,175,0.7);
    box-shadow: 0 18px 40px rgba(0,0,0,0.8), 0 0 0 1px rgba(15,23,42,0.95);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.sidebar-about {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: radial-gradient(circle at top left, rgba(59,130,246,0.12), rgba(15,23,42,0.9));
    border: 1px solid rgba(148,163,184,0.25);
    box-shadow: 0 10px 20px rgba(0,0,0,0.6), 0 0 0 1px rgba(15,23,42,0.95);
}
.sidebar-about h4 {
    margin: 0 0 6px;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e5e7eb;
}
.sidebar-about p {
    font-size: 14.5px;
    line-height: 1.5;
    color: #cbd5e1;
    opacity: 0.95;
}

/* SEARCH + TAG FILTER BAR */
.search-box { margin-bottom: 18px; }
.filter-bar {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

/* search input */
.filter-search {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 999px;
    background: #020617;
    border: 1px solid #111827;
    box-shadow: 0 0 0 1px rgba(15,23,42,0.9), 0 12px 28px rgba(0,0,0,0.7);
}
.filter-icon {
    font-size: 14px;
    color: #9ca3af;
    margin-right: 8px;
}

/* UPDATED: style both text + search inputs */
.filter-search input[type="text"],
.filter-search input[type="search"] {
    border: none;
    outline: none;
    background: transparent;
    color: #e5e7eb;
    width: 100%;
    padding: 10px 0;
    font-size: 14px;
}

/* UPDATED: placeholder color for both */
.filter-search input[type="text"]::placeholder,
.filter-search input[type="search"]::placeholder {
    color: #6b7280;
}

/* TAG / PAGES SELECT */
.filter-select {
    min-width: 180px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.4);
    background: #f9fafb;
    color: #111827;
    font-size: 13px;
    outline: none;
    box-shadow: 0 0 0 1px rgba(17,24,39,0.6), 0 10px 22px rgba(0,0,0,0.55);
    appearance: none;
    cursor: pointer;
}
.filter-select:hover,
.filter-select:focus {
    border-color: rgba(59,130,246,0.9);
    box-shadow: 0 0 0 1px rgba(37,99,235,0.9), 0 12px 26px rgba(37,99,235,0.45);
}

/* RESPONSIVE */
@media (max-width: 700px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-select { width: 100%; }
}

/* POST GRID */
.post-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 10px;
}

/* POST CARD */
.post-card {
    background: radial-gradient(circle at top left, rgba(59,130,246,0.18), transparent 55%),
                radial-gradient(circle at bottom right, rgba(248,250,252,0.06), transparent 60%),
                #020617;
    border-radius: 22px;
    border: 1px solid rgba(148,163,184,0.18);
    padding: 16px 14px 14px;
    position: relative;
    overflow: hidden;
    text-align: center;
    margin-bottom: 0;
    box-shadow: 0 16px 35px rgba(0,0,0,0.55), 0 0 0 1px rgba(15,23,42,0.9);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.post-card::before {
    content: "";
    position: absolute;
    inset: -60%;
    background: radial-gradient(circle at top, rgba(59,130,246,0.08), transparent 65%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(96,165,250,0.6);
    box-shadow: 0 22px 40px rgba(0,0,0,0.75), 0 0 0 1px rgba(37,99,235,0.7);
}
.post-card:hover::before { opacity: 1; }

.post-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #e5e7eb;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 8px;
    opacity: 0.9;
}
.post-meta span:last-child { margin-left: 0; }
.post-meta-badge {
    font-size: 14px;
    padding: 3px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #f9fafb;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid rgba(15,23,42,0.9);
    box-shadow: 0 2px 6px rgba(37,99,235,0.65), 0 0 0 1px rgba(15,23,42,0.9);
}

.tag-badge {
    display: inline-block;
    margin: 6px 4px 0;
    text-decoration: none;
}

/* IMAGE WRAPPER */
.post-image-wrapper {
    width: 100%;
    max-width: 270px;
    height: 400px;
    margin: 12px auto;
    overflow: hidden;
    border-radius: 18px;
    position: relative;
    border: 1px solid rgba(148,163,184,0.3);
    box-shadow: 0 10px 24px rgba(0,0,0,0.75), 0 0 18px rgba(15,23,42,0.9);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    background: radial-gradient(circle at top, rgba(15,23,42,0.7), rgba(15,23,42,1));
}
.post-image-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15,23,42,0.4),
        transparent 35%,
        transparent 75%,
        rgba(15,23,42,0.45)
    );
    mix-blend-mode: soft-light;
    pointer-events: none;
}
.post-card:hover .post-image-wrapper {
    transform: scale(1.03);
    border-color: rgba(129,140,248,0.9);
    box-shadow: 0 16px 32px rgba(0,0,0,0.85), 0 0 22px rgba(59,130,246,0.6);
}
.post-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}
.post-card:hover .post-image-wrapper img {
    transform: scale(1.05);
    filter: saturate(1.08);
}

.post-desc {
    font-size: 14px;
    margin-top: 4px;
    margin-bottom: 10px;
    line-height: 1.5;
    color: #d1d5db;
}

/* BUTTON */
.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fde047, #f97316);
    color: #111827;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    box-shadow: 0 8px 18px rgba(0,0,0,0.6), 0 0 0 1px rgba(15,23,42,0.9);
    margin: 4px auto 0;
}
.btn-link:hover {
    background: linear-gradient(135deg, #facc15, #ea580c);
    box-shadow: 0 10px 22px rgba(0,0,0,0.8), 0 0 0 1px rgba(15,23,42,0.9);
    transform: translateY(-1px);
}
.btn-link,
.btn-link:hover,
.btn-link:focus {
    text-decoration: none;
}

/* TAG CLOUD */
.tag-list { margin-top: 8px; text-align: center; }
.sidebar h3 {
    margin-top: 0;
    font-size: 15px;
    margin-bottom: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #e5e7eb;
}
.tag-cloud { margin-bottom: 8px; }
.tag-cloud a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 4px 6px 4px 0;
    padding: 6px 14px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.35);
    color: #e5e7eb;
    background: radial-gradient(circle at top, rgba(15,23,42,0.9), #020617);
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    transition: all 0.25s ease;
}
.tag-cloud a:hover {
    border-color: rgba(96,165,250,0.9);
    color: #f9fafb;
    box-shadow: 0 4px 12px rgba(37,99,235,0.55), 0 0 0 1px rgba(15,23,42,0.9);
    transform: translateY(-1px);
}
.tag-cloud a.selected {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #f9fafb;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(37,99,235,0.75), 0 0 0 1px rgba(15,23,42,0.95);
}
.tag-cloud a:first-child {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    border-color: transparent;
    color: #f9fafb;
    box-shadow: 0 4px 14px rgba(37,99,235,0.8), 0 0 0 1px rgba(15,23,42,0.95);
}
.tag-cloud a,
.tag-cloud a:hover,
.tag-cloud a:focus {
    text-decoration: none;
}

/* LOADER */
#load-indicator {
    text-align: center;
    padding: 15px 0 5px;
    font-size: 13px;
    color: #9ca3af;
    display: none;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .container { flex-direction: column; }
}

/* FANCY SPINNER */
.loading-spinner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.15);
    border-top-color: #60a5fa;
    animation: spin 1s linear infinite;
    margin: 0 auto 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
    font-size: 13px;
    color: #9ca3af;
    letter-spacing: .5px;
    opacity: .8;
}

/* REMOVE SIDEBAR COMPLETELY */
.sidebar {
    display: none !important;
}

/* MAIN CONTENT WIDTH */
.container {
    display: block;
    padding: 20px;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
}

/* 4-POST GRID LAYOUT */
.post-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin-top: 10px;
}

/* cards just fill their grid cell */
.post-card {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Fix list alignment inside content cards */
.post-desc ul,
.post-desc ol {
    text-align: left;
    list-style-position: outside;
    margin: 10px 0 10px 1.5rem;
    padding-left: 0;
}

.post-desc li {
    margin: 4px 0;
}

.logo-wrap img {
    height: 44px;
    width: auto;
    display: block;

    /* base look */
    filter: drop-shadow(0 0 0 rgba(248, 113, 113, 0.0));
    transition: transform 0.25s ease;
}

/* continuous glow animation */
.logo-wrap img.logo-glow {
    animation: logoGlow 2.4s ease-in-out infinite;
}

/* slightly zoom on hover */
.logo-wrap img.logo-glow:hover {
    transform: scale(1.04);
}

/* keyframes for glow */
@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(248, 113, 113, 0.0));
    }
    50% {
        filter:
            drop-shadow(0 0 12px rgba(248, 113, 113, 0.95))
            drop-shadow(0 0 20px rgba(59, 130, 246, 0.7));
    }
}
