 
:root{
    --bg:#ffffff;            /* main page background now white */
    --card:#0b1220;          /* cards can remain dark if you like */
    --muted:#516075;         /* darker muted text for readability on white */
    --accent-1:#6ee7b7;
    --accent-2:#60a5fa;
    --glass: rgba(2,6,23,0.04); /* subtle glass for inputs */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
    margin:0;
    font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;
    background: var(--bg);          /* white background */
    color:#071427;                  /* dark page text for contrast */
    -webkit-font-smoothing:antialiased;
}

        .wrap{max-width:1180px;margin:36px auto;padding:26px}
        /* Top header */
        .top{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px;flex-wrap:wrap}
        .brand{display:flex;align-items:center;gap:14px;min-width:0}
        .logo{width:56px;height:56px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-weight:700;background:linear-gradient(135deg,var(--accent-1),var(--accent-2));color:#062131;flex:0 0 56px}
        .title h1{margin:0;font-size:20px;letter-spacing:0.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
        .title p{margin:0;color:var(--muted);font-size:13px}
        /* Controls container (search-only now) */
        .controls{display:flex;gap:12px;align-items:center;flex:1;justify-content:flex-end;min-width:0}
        /* make search larger and more prominent where tags used to be */
        .search{
            background:var(--glass);
            border:1px solid rgba(255,255,255,0.04);
            padding:12px 14px;border-radius:12px;color:inherit;
            min-width:320px;max-width:760px;width:64%;
            box-shadow:inset 0 1px 0 rgba(255,255,255,0.01);
            font-size:14px;
            outline:none;
        }
 .search::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

        /* Grid & cards */
        .grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:20px;margin-top:22px;align-items:stretch}
        .card{
            background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
            border:1px solid rgba(255,255,255,0.03);
            border-radius:14px;overflow:hidden;
            box-shadow:0 6px 24px rgba(2,6,23,0.6);
            cursor:pointer;transition:transform .22s ease, box-shadow .22s ease;
            display:flex;flex-direction:column;align-items:stretch;height:100%;
        }
        .card:hover{transform:translateY(-6px);box-shadow:0 16px 40px rgba(2,6,23,0.75)}
        /* thumb with fixed aspect ratio */
        .thumb{background:#081226;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:0 0 auto}
        .thumb img{width:100%;height:100%;object-fit:cover;display:block}
        /* Use aspect-ratio for consistent image height; fallback via height if unsupported */
        .thumb{aspect-ratio:16/9;height:auto}
        .meta{padding:14px;display:flex;flex-direction:column;flex:1 1 auto;min-height:120px}
        .meta h3{margin:0 0 8px 0;font-size:16px}
        .meta p{margin:0;color:var(--muted);font-size:13px;line-height:1.45;flex:1 1 auto; /* flexible description to keep consistent heights */ }
        .tag-row{margin-top:12px;display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end}
        .tag{font-size:12px;padding:6px 8px;border-radius:8px;background:rgba(255,255,255,0.03);color:var(--muted)}
        /* Modal improvements */
        .modal-backdrop{position:fixed;inset:0;background:rgba(2,6,23,0.6);display:none;align-items:center;justify-content:center;padding:20px;z-index:60}
        .modal{width:920px;max-width:100%;background:linear-gradient(180deg,#071425, #071428);border:1px solid rgba(255,255,255,0.04);border-radius:12px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,0.6)}
        .modal .modal-body{display:flex;gap:0}
        .modal .left{flex:1;min-height:360px;display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg, rgba(0,0,0,0.04), rgba(255,255,255,0.02))}
        .modal .left img{width:100%;height:100%;object-fit:contain;display:block}
        .modal .right{width:420px;padding:18px;box-sizing:border-box}
        .modal .right h2{margin:0 0 8px 0}
        .close-btn{position:absolute;right:14px;top:14px;background:transparent;border:0;color:var(--muted);font-size:20px;cursor:pointer}
        /* Responsive tweaks */
        @media (max-width:980px){
            .controls{justify-content:space-between}
            .search{width:48%}
            .modal .right{width:360px}
        }
        @media (max-width:760px){
            .top{flex-direction:column;align-items:flex-start}
            .controls{width:100%;justify-content:space-between}
            .search{width:100%;max-width:none;margin-bottom:8px}
            .modal .modal-body{flex-direction:column}
            .modal .right{width:100%}
        }
        /* small neat footer */
        .small{margin-top:26px;color:var(--muted);font-size:13px;text-align:center}
     