/* ============================================================
   NicoraX — Explore "Editorial + Sidebar" CSS
   File: /assets/css/explore-editorial.css
   Load AFTER main.css in <head>.

   All classes use prefix "nx-ed-" — no conflict with main.css.
   ============================================================ */

:root {
    --nx-ed-font-mono:    'Courier New', 'SF Mono', 'Fira Code', monospace;
    --nx-ed-font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --nx-ed-sidebar-w:    300px;
    --nx-ed-grid-cols:    3;
    --nx-ed-card-gap:     10px;
    --nx-ed-page-pad:     28px;
}

/* PAGE WRAPPER */
.nx-ed-page {
    min-height: 100vh;
}

/* TOPBAR */
.nx-ed-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px var(--nx-ed-page-pad);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: var(--color-bg);
}
.nx-ed-topbar__left { display: flex; align-items: center; gap: 20px; }
.nx-ed-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: rgba(255,255,255,0.25);
}
.nx-ed-breadcrumb a {
    color: rgba(255,255,255,0.25); text-decoration: none; transition: color .15s;
}
.nx-ed-breadcrumb a:hover { color: rgba(255,255,255,0.6); }
.nx-ed-breadcrumb__sep { opacity: .3; }
.nx-ed-breadcrumb__current { color: rgba(255,255,255,0.5); }
.nx-ed-topbar__right { display: flex; align-items: center; gap: 10px; }
.nx-ed-count-badge {
    font-family: var(--nx-ed-font-mono);
    font-size: 10px; letter-spacing: 1.5px;
    background: rgba(255,45,45,.08); border: 1px solid rgba(255,45,45,.18);
    color: rgba(255,45,45,.7); padding: 5px 12px; border-radius: 100px;
}
.nx-ed-upload-btn {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 600;
    background: var(--color-accent,#FF2D2D); color: #fff; border: none;
    padding: 8px 16px; border-radius: var(--radius-sm,8px);
    cursor: pointer; font-family: var(--font-sans); transition: background .15s;
    text-decoration: none;
}
.nx-ed-upload-btn:hover { background: #e02020; color: #fff; }

/* CONTROLS */
.nx-ed-controls {
    display: grid; grid-template-columns: 1fr auto auto;
    gap: 10px; padding: 16px var(--nx-ed-page-pad);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: var(--color-bg); align-items: center;
}
.nx-ed-search {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
    padding: 0 16px; height: 42px; border-radius: var(--radius-sm,8px);
    transition: border-color .2s;
}
.nx-ed-search:focus-within {
    border-color: rgba(255,45,45,.45);
    box-shadow: 0 0 0 3px rgba(255,45,45,.07);
}
.nx-ed-search__input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--color-text); font-size: 14px; font-family: var(--font-sans);
}
.nx-ed-search__input::placeholder { color: rgba(255,255,255,.2); }
.nx-ed-search__input::-webkit-search-cancel-button { display: none; }
.nx-ed-filter-select {
    display: flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 14px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
    border-radius: var(--radius-sm,8px); font-size: 13px;
    color: rgba(255,255,255,.45); cursor: pointer; white-space: nowrap;
    font-family: var(--font-sans); transition: border-color .15s;
}
.nx-ed-filter-select:hover { border-color: rgba(255,255,255,.15); }
.nx-ed-filter-select select {
    background: none; border: none; outline: none;
    color: inherit; font: inherit; cursor: pointer;
}
.nx-ed-search-btn { height: 42px; padding: 0 22px; flex-shrink: 0; white-space: nowrap; }

/* TABS */
.nx-ed-tabs {
    display: flex; gap: 0; padding: 0 var(--nx-ed-page-pad);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: var(--color-bg); overflow-x: auto; scrollbar-width: none;
}
.nx-ed-tabs::-webkit-scrollbar { display: none; }
.nx-ed-tab {
    display: flex; align-items: center; gap: 6px;
    padding: 13px 18px; font-size: 13px; font-weight: 500;
    color: rgba(255,255,255,.3); text-decoration: none; white-space: nowrap;
    border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
    position: relative; bottom: -1px;
}
.nx-ed-tab:hover { color: rgba(255,255,255,.65); }
.nx-ed-tab--active { color: #fff; border-bottom-color: var(--color-accent,#FF2D2D); }
.nx-ed-tab__n {
    font-family: var(--nx-ed-font-mono); font-size: 9px;
    color: rgba(255,255,255,.2); letter-spacing: .5px;
    background: rgba(255,255,255,.06); padding: 1px 7px; border-radius: 100px;
}
.nx-ed-tab--active .nx-ed-tab__n {
    background: rgba(255,45,45,.1); color: rgba(255,45,45,.6);
}

/* BODY */
.nx-ed-body {
    display: grid;
    grid-template-columns: 1fr var(--nx-ed-sidebar-w);
    align-items: start; min-height: 70vh;
}

/* GRID */
.nx-ed-grid-wrap {
    padding: 20px 16px 32px var(--nx-ed-page-pad);
    border-right: 1px solid rgba(255,255,255,0.05);
}
.nx-ed-grid-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.nx-ed-result-info {
    font-family: var(--nx-ed-font-mono); font-size: 10px;
    letter-spacing: 1px; color: rgba(255,255,255,.22);
}
.nx-ed-result-info strong { color: rgba(255,255,255,.45); }
.nx-ed-layout-btns { display: flex; gap: 4px; }
.nx-ed-layout-btn {
    width: 30px; height: 30px; display: flex;
    align-items: center; justify-content: center;
    border-radius: var(--radius-sm,8px); border: 1px solid rgba(255,255,255,.07);
    background: transparent; color: rgba(255,255,255,.25);
    cursor: pointer; transition: all .15s;
}
.nx-ed-layout-btn--active,
.nx-ed-layout-btn:hover {
    background: rgba(255,45,45,.1);
    border-color: rgba(255,45,45,.3);
    color: var(--color-accent,#FF2D2D);
}
.nx-ed-grid {
    display: grid;
    grid-template-columns: repeat(var(--nx-ed-grid-cols), 1fr);
    gap: var(--nx-ed-card-gap);
}

/* CARD */
.nx-ed-card {
    position: relative; border-radius: 9px; overflow: hidden;
    cursor: pointer; background: var(--color-surface,#140f22);
    border: 1px solid rgba(255,255,255,.06); aspect-ratio: 3/4;
    transition: all .25s cubic-bezier(.25,.46,.45,.94);
    display: block;
}
.nx-ed-card:hover {
    border-color: rgba(255,45,45,.4);
    box-shadow: 0 8px 32px rgba(0,0,0,.55), 0 0 0 1px rgba(255,45,45,.08);
    transform: translateY(-3px); z-index: 2;
}

/* Card link wraps all content — fills the card via absolute + inset */
.nx-ed-card__link {
    position: absolute;
    inset: 0;
    display: block;
    text-decoration: none;
    color: inherit;
}

.nx-ed-card__ph { position: absolute; inset: 0; transition: transform .5s ease; }
.nx-ed-card:hover .nx-ed-card__ph { transform: scale(1.05); }
.nx-ed-card__img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.nx-ed-card__img--blurred {
    filter: blur(18px) brightness(.5) saturate(.5); transform: scale(1.1);
}
.nx-ed-card__placeholder {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--color-surface2,#1d1633), var(--color-surface,#140f22));
}
.nx-ed-card__grad {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(7,5,14,.97) 0%, rgba(7,5,14,.4) 45%, transparent 70%);
    pointer-events: none;
}
.nx-ed-card__top {
    position: absolute; top: 8px; left: 8px; right: 8px;
    display: flex; justify-content: space-between; align-items: flex-start;
    z-index: 3; pointer-events: none;
}
.nx-ed-card__badge {
    font-family: var(--nx-ed-font-mono); font-size: 8px;
    letter-spacing: 1px; text-transform: uppercase;
    background: rgba(7,5,14,.82); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.08);
    padding: 3px 8px; border-radius: 100px; color: rgba(255,255,255,.55);
    max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nx-ed-card__actions {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(.8);
    display: flex; gap: 8px; z-index: 4;
    opacity: 0; transition: all .2s; pointer-events: none;
}
.nx-ed-card:hover .nx-ed-card__actions {
    opacity: 1; transform: translate(-50%,-50%) scale(1); pointer-events: all;
}
.nx-ed-card__action-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(7,5,14,.88); backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.8); cursor: pointer; transition: all .15s;
}
.nx-ed-card__action-btn:hover {
    background: var(--color-accent,#FF2D2D);
    border-color: var(--color-accent,#FF2D2D); color: #fff;
}
.nx-ed-card__body {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 10px 10px 9px; z-index: 3; pointer-events: none;
}
.nx-ed-card__title {
    font-size: 12px; font-weight: 600; color: #fff;
    line-height: 1.3; margin-bottom: 4px;
    overflow: hidden; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.nx-ed-card__author {
    display: flex; align-items: center; gap: 4px;
    font-size: 10px; color: rgba(255,255,255,.35);
}
.nx-ed-card__avi {
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--color-accent-gradient, linear-gradient(135deg,#FF2D2D,#FF6B35));
    display: flex; align-items: center; justify-content: center;
    font-size: 6px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.nx-ed-card__verified { color: var(--color-accent,#FF2D2D); font-size: 9px; }
.nx-ed-card--adult { border-color: rgba(220,38,38,.25) !important; }
.nx-ed-card--adult:hover { border-color: rgba(220,38,38,.45) !important; }
.nx-ed-card__shield {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.15); z-index: 3; pointer-events: none;
    font-size: 28px;
}

/* SIDEBAR */
.nx-ed-sidebar {
    padding: 20px 20px 32px 18px;
    display: flex; flex-direction: column; gap: 24px;
    position: sticky; top: 68px;
    max-height: calc(100vh - 68px);
    overflow-y: auto; scrollbar-width: none;
}
.nx-ed-sidebar::-webkit-scrollbar { display: none; }
.nx-ed-sidebar__section { display: flex; flex-direction: column; }
.nx-ed-sidebar__title {
    font-family: var(--nx-ed-font-mono); font-size: 9px;
    letter-spacing: 2.5px; text-transform: uppercase;
    color: rgba(255,255,255,.22); margin-bottom: 12px; display: block;
}

/* Trending */
.nx-ed-trending { display: flex; flex-direction: column; gap: 6px; }
.nx-ed-trending__item {
    display: flex; align-items: center; gap: 10px; padding: 10px;
    border-radius: var(--radius-sm,8px);
    background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.05);
    text-decoration: none; transition: all .15s;
}
.nx-ed-trending__item:hover {
    border-color: rgba(255,45,45,.2); background: rgba(255,45,45,.03);
}
.nx-ed-trending__thumb {
    width: 44px; height: 44px; border-radius: 6px; flex-shrink: 0;
    overflow: hidden; background: var(--color-surface2,#1d1633);
}
.nx-ed-trending__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nx-ed-trending__thumb--ph {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
}
.nx-ed-trending__info { flex: 1; min-width: 0; }
.nx-ed-trending__name {
    font-size: 12px; font-weight: 600; color: #fff; margin-bottom: 2px;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.nx-ed-trending__meta { font-size: 10px; color: rgba(255,255,255,.3); }
.nx-ed-trending__rank {
    font-family: var(--nx-ed-font-mono); font-size: 9px;
    color: rgba(255,45,45,.6); font-weight: 700; flex-shrink: 0;
}

/* Creator */
.nx-ed-creator {
    display: flex; align-items: center; gap: 10px; padding: 12px;
    border-radius: var(--radius-sm,8px);
    background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.05);
    margin-bottom: 8px;
}
.nx-ed-creator:last-child { margin-bottom: 0; }
.nx-ed-creator__avi {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--color-accent-gradient, linear-gradient(135deg,#FF2D2D,#FF6B35));
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.nx-ed-creator__info { flex: 1; min-width: 0; }
.nx-ed-creator__name {
    font-size: 13px; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nx-ed-creator__stat { font-size: 10px; color: rgba(255,255,255,.3); margin-top: 1px; }
.nx-ed-follow-btn {
    font-size: 10px; font-weight: 600; background: transparent;
    border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.45);
    padding: 5px 12px; border-radius: 100px; cursor: pointer;
    font-family: var(--font-sans); white-space: nowrap;
    transition: all .15s; flex-shrink: 0; text-decoration: none;
}
.nx-ed-follow-btn:hover { border-color: var(--color-accent,#FF2D2D); color: var(--color-accent,#FF2D2D); }

/* Tags */
.nx-ed-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-ed-tag {
    font-size: 11px; padding: 5px 12px; border-radius: 100px;
    border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03);
    color: rgba(255,255,255,.35); cursor: pointer; text-decoration: none; transition: all .15s;
}
.nx-ed-tag:hover {
    border-color: rgba(255,45,45,.3); color: rgba(255,45,45,.7);
    background: rgba(255,45,45,.05);
}

/* Stats */
.nx-ed-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nx-ed-stat-card {
    padding: 10px 12px; background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.05); border-radius: var(--radius-sm,8px);
}
.nx-ed-stat-card__n {
    font-family: var(--nx-ed-font-mono); font-size: 18px; font-weight: 700;
    color: #fff; display: block; line-height: 1; margin-bottom: 4px;
}
.nx-ed-stat-card__n sup { font-size: 10px; color: var(--color-accent,#FF2D2D); vertical-align: super; }
.nx-ed-stat-card__l {
    font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase;
    color: rgba(255,255,255,.22); font-family: var(--nx-ed-font-mono);
}

/* PAGINATION */
.nx-ed-pagination {
    display: flex; align-items: center; gap: 6px;
    margin-top: 28px; flex-wrap: wrap;
}

/* RESPONSIVE */
@media (max-width: 1100px) { :root { --nx-ed-sidebar-w: 240px; } }
@media (max-width: 900px) {
    .nx-ed-body { grid-template-columns: 1fr; }
    .nx-ed-sidebar {
        position: static; border-top: 1px solid rgba(255,255,255,.05);
        padding: 20px var(--nx-ed-page-pad) 28px;
        max-height: none; display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
    }
    :root { --nx-ed-page-pad: 16px; --nx-ed-grid-cols: 2; }
}
@media (max-width: 600px) {
    :root { --nx-ed-grid-cols: 2; }
    .nx-ed-controls { grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
    .nx-ed-search { grid-column: 1 / -1; }
    .nx-ed-sidebar { grid-template-columns: 1fr; }
}
