.hm-cdn * { box-sizing: border-box; }

/* ══ HERO ════════════════════════════════ */
.hm-cdn-hero {
    background: #1a1a2e;
    background-image:
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(59,130,246,.18) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 85% 90%, rgba(6,182,212,.08) 0%, transparent 60%);
    padding: 130px 0 64px;
    border-bottom: 1px solid #21262d;
    overflow: hidden; position: relative;
    text-align: center;
}
.hm-cdn-hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 52px 52px;
}
/* dark center vignette — keeps text readable over the canvas animation */
.hm-cdn-hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background: radial-gradient(
        ellipse 50% 70% at 50% 50%,
        rgba(26,26,46,0.92) 0%,
        rgba(26,26,46,0.75) 40%,
        rgba(26,26,46,0.20) 70%,
        transparent 100%
    );
}

/* CDN transaction canvas */
#cdn-hero-canvas {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
    opacity: 1;
}

/* floating bg icons */
.hm-cdn-hero__bg-icons {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3;
}
.hm-cdn-hero__bg-icons i {
    position: absolute; font-size: 48px;
    color: rgba(255,255,255,.04); animation: icon-float 8s ease-in-out infinite;
}
.hm-cdn-hero__bg-icons i:nth-child(1)  { top:8%;  left:4%;  font-size:56px; animation-delay:0s; }
.hm-cdn-hero__bg-icons i:nth-child(2)  { top:15%; left:12%; font-size:38px; animation-delay:.8s; }
.hm-cdn-hero__bg-icons i:nth-child(3)  { top:60%; left:6%;  font-size:44px; animation-delay:1.6s; }
.hm-cdn-hero__bg-icons i:nth-child(4)  { top:75%; left:14%; font-size:32px; animation-delay:2.4s; }
.hm-cdn-hero__bg-icons i:nth-child(5)  { top:10%; right:5%; font-size:50px; animation-delay:3.2s; }
.hm-cdn-hero__bg-icons i:nth-child(6)  { top:20%; right:12%;font-size:36px; animation-delay:4s; }
.hm-cdn-hero__bg-icons i:nth-child(7)  { top:65%; right:7%; font-size:42px; animation-delay:4.8s; }
.hm-cdn-hero__bg-icons i:nth-child(8)  { top:78%; right:15%;font-size:30px; animation-delay:5.6s; }
@keyframes icon-float {
    0%,100% { transform: translateY(0) rotate(0deg); opacity: .04; }
    50%      { transform: translateY(-14px) rotate(6deg); opacity: .08; }
}

.hm-cdn-hero__center { position: relative; max-width: 720px; margin: 0 auto; z-index: 4; }

.hm-cdn-hero__pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(56,97,251,.12); color: #7aa2f7;
    border: 1px solid rgba(56,97,251,.28);
    border-radius: 20px; font-size: 11px; font-weight: 700;
    padding: 5px 14px; letter-spacing: .7px;
    text-transform: uppercase; margin-bottom: 24px;
}
.hm-cdn-hero__pill .live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #3fb950; box-shadow: 0 0 7px #3fb950;
    animation: pdot 2s ease infinite;
}
@keyframes pdot {
    0%,100% { opacity:1; box-shadow:0 0 7px #3fb950; }
    50%      { opacity:.6; box-shadow:0 0 14px #3fb950; }
}

.hm-cdn-hero__center h1 {
    font-size: 52px; font-weight: 800; color: #fff;
    line-height: 1.1; letter-spacing: -2px; margin: 0 0 18px;
}
.hm-cdn-hero__center h1 em {
    font-style: normal;
    background: linear-gradient(90deg,#7aa2f7,#63e2ff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hm-cdn-hero__center > p {
    color: #8b949e; font-size: 16px; line-height: 1.75;
    margin: 0 auto 36px; max-width: 540px;
}

/* ── Hero browse / scroll CTA ── */
.hm-cdn-hero__center .hm-cdn-hero__browse-btn {
    display: inline-flex !important; align-items: center; gap: 8px;
    padding: 9px 20px; margin: 0 auto 20px;
    width: fit-content !important; max-width: fit-content !important;
    background: transparent !important;
    border: 1.5px solid rgba(122,162,247,.40) !important;
    border-radius: 50px !important;
    color: #7aa2f7 !important; font-size: 13px !important; font-weight: 600 !important;
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s;
    white-space: nowrap; line-height: 1.4;
    box-shadow: none !important;
}
.hm-cdn-hero__center .hm-cdn-hero__browse-btn:hover {
    border-color: #7aa2f7 !important;
    background: rgba(122,162,247,.10) !important;
    color: #a5c0fa !important;
    transform: none !important;
}
.hm-cdn-hero__browse-btn i:first-child { font-size: 11px; }
.hm-cdn-hero__browse-chevron {
    font-size: 9px; animation: bounce-down 1.6s ease-in-out infinite;
}
@keyframes bounce-down {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(3px); }
}

/* ── Stats row ── */
.hm-cdn-hero__stats {
    display: inline-flex; gap: 0;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px; overflow: hidden;
    margin: 0 auto 28px;
}
.hm-cdn-hero__stat { padding: 16px 28px; text-align: center; border-right: 1px solid rgba(255,255,255,.07); }
.hm-cdn-hero__stat:last-child { border-right: none; }
.hm-cdn-hero__stat-val { font-size: 26px; font-weight: 800; color: #fff; line-height: 1; }
.hm-cdn-hero__stat-lbl { font-size: 10px; color: #6e7681; margin-top: 5px; text-transform: uppercase; letter-spacing: .7px; }

/* ── Secondary links ── */
.hm-cdn-hero__links {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; flex-wrap: wrap;
}
.hm-cdn-hero__link {
    display: inline-flex; align-items: center; gap: 7px;
    color: #6b7280; font-size: 13px; font-weight: 600;
    text-decoration: none; transition: color .15s;
}
.hm-cdn-hero__link:hover { color: #7aa2f7; }
.hm-cdn-hero__link-sep { color: #374151; }

/* ── Upload highlight link ── */
.hm-cdn-hero__upload-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    background: rgba(59,130,246,.12);
    border: 1px solid rgba(59,130,246,.30);
    border-radius: 8px;
    color: #7aa2f7; font-size: 13px; font-weight: 600;
    text-decoration: none;
    transition: background .2s, border-color .2s, color .2s;
}
.hm-cdn-hero__upload-link:hover {
    background: rgba(59,130,246,.22);
    border-color: rgba(59,130,246,.55);
    color: #a5c0fa;
}
.hm-cdn-hero__upload-badge {
    background: rgba(74,222,128,.15); color: #4ade80;
    border: 1px solid rgba(74,222,128,.30);
    border-radius: 20px; padding: 2px 8px;
    font-size: 10px; font-weight: 700; letter-spacing: .3px;
}

@media(max-width: 640px) {
    .hm-cdn-hero__center h1 { font-size: 34px; letter-spacing: -1px; }
    .hm-cdn-hero__stat { padding: 12px 16px; }
    .hm-cdn-hero__stat-val { font-size: 20px; }
    .hm-cdn-hero__bg-icons { display: none; }
}

/* ══ FILTER BAR ════════════════════════ */
.hm-cdn-bar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 0;
    position: sticky; top: 0; z-index: 90;
    box-shadow: 0 1px 0 #e5e7eb, 0 4px 16px rgba(0,0,0,.05);
}

/* Single unified row */
.hm-cdn-bar__inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.hm-cdn-bar__inner::-webkit-scrollbar { display: none; }

/* Search input */
.hm-cdn-bar__search-wrap {
    position: relative;
    flex-shrink: 0;
    width: 220px;
    transition: width .25s;
}
.hm-cdn-bar__search-wrap:focus-within { width: 280px; }
.hm-cdn-bar__search-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: #9ca3af; font-size: 12px; pointer-events: none;
    transition: color .2s; z-index: 2;
    width: 16px; text-align: center;
}
.hm-cdn-bar__search-wrap:focus-within .hm-cdn-bar__search-icon { color: #2563eb; }
.hm-cdn-bar__search-input {
    width: 100%;
    padding: 7px 30px 7px 36px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px; color: #111827;
    background: #f9fafb;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.hm-cdn-bar__search-input::placeholder { color: #b0b8c8; }
.hm-cdn-bar__search-input:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,.10);
}
.hm-cdn-search-clear {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: #e5e7eb; border: none; color: #6b7280;
    font-size: 12px; line-height: 1; cursor: pointer;
    width: 18px; height: 18px; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
}
.hm-cdn-search-clear:hover { background: #d1d5db; color: #111827; }
.hm-cdn-bar__search-wrap.has-value .hm-cdn-search-clear { display: flex; }

/* Vertical divider */
.hm-cdn-bar__divider {
    display: block; width: 1px; height: 22px;
    background: #e5e7eb; flex-shrink: 0;
}

/* Category pills */
.hm-cdn-bar__cats {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    flex: 1; min-width: 0;
}
.hm-cdn-cat-btn {
    display: inline-flex; align-items: center;
    padding: 5px 13px;
    border-radius: 6px;
    font-size: 12px; font-weight: 600;
    border: 1.5px solid transparent;
    background: transparent; color: #6b7280;
    cursor: pointer; white-space: nowrap;
    transition: all .15s; text-transform: capitalize;
    outline: none;
}
.hm-cdn-cat-btn:hover:not(.active) {
    background: #f3f4f6; color: #374151;
}
.hm-cdn-cat-btn.active {
    background: #eff6ff; color: #1d4ed8;
    border-color: #bfdbfe;
}

/* Count + FAQ on the right */
.hm-cdn-count-lbl {
    font-size: 12px; color: #9ca3af;
    white-space: nowrap; flex-shrink: 0; margin-left: auto;
}
.hm-cdn-count-lbl strong { color: #374151; font-weight: 700; }

.hm-cdn-faq-link {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: 6px;
    background: transparent; color: #6b7280;
    border: 1.5px solid transparent;
    font-size: 12px; font-weight: 600;
    text-decoration: none; white-space: nowrap; flex-shrink: 0;
    transition: all .15s;
}
.hm-cdn-faq-link:hover { background: #f3f4f6; color: #374151; }
.hm-cdn-faq-link i { font-size: 11px; }

@media(max-width: 768px) {
    .hm-cdn-bar__search-wrap { width: 160px; }
    .hm-cdn-bar__search-wrap:focus-within { width: 200px; }
}

/* ══ TABLE ══════════════════════════════ */
.hm-cdn-main { background: #f1f5f9; padding: 28px 0 80px; }
.hm-cdn-table-wrap {
    background: #fff; border-radius: 14px;
    border: 1.5px solid #e5e7eb; overflow: hidden;
}
table.hm-cdn-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.hm-cdn-tbl thead tr { background: #f8fafc; border-bottom: 2px solid #e5e7eb; }
table.hm-cdn-tbl thead th {
    padding: 12px 16px; text-align: left;
    font-size: 11px; font-weight: 700; color: #6b7280;
    text-transform: uppercase; letter-spacing: .6px; white-space: nowrap;
}
table.hm-cdn-tbl thead th:first-child { padding-left: 20px; }
table.hm-cdn-tbl thead th:last-child  { padding-right: 20px; text-align: right; }

.col-lib  { width: 28%; }
.col-cat  { width: 14%; }
.col-ver  { width: 13%; }
.col-vers { width: 22%; }
.col-fil  { width: 8%; text-align: center !important; }
.col-act  { width: 15%; }

.hm-cdn-row { border-bottom: 1px solid #f1f5f9; transition: background .1s; }
.hm-cdn-row:last-child { border-bottom: none; }
.hm-cdn-row:hover > td { background: #fafbfc; }
.hm-cdn-row td { padding: 14px 16px; vertical-align: middle; font-size: 13px; color: #374151; }
.hm-cdn-row td:first-child { padding-left: 20px; }
.hm-cdn-row td:last-child  { padding-right: 20px; }

.hm-cdn-lib-cell { display: flex; align-items: center; gap: 11px; }
.hm-cdn-lib-icon {
    width: 38px; height: 38px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff;
    background: var(--lc, #6366f1); flex-shrink: 0; letter-spacing: -1px;
}
.hm-cdn-lib-name { font-size: 14px; font-weight: 700; color: #111827; }
.hm-cdn-lib-desc { font-size: 11px; color: #9ca3af; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hm-cdn-ver-latest {
    display: inline-flex; align-items: center;
    background: #dcfce7; color: #166534;
    font-size: 11px; font-weight: 700;
    padding: 3px 9px; border-radius: 6px; font-family: monospace;
}

.hm-cdn-vlist { display: flex; flex-wrap: wrap; gap: 4px; }
.hm-cdn-vpill-sm {
    padding: 2px 9px; border-radius: 20px;
    font-size: 10.5px; font-weight: 700; font-family: monospace;
    border: 1.5px solid #e5e7eb; background: #fff; color: #6b7280;
    cursor: pointer; transition: all .12s; white-space: nowrap;
}
.hm-cdn-vpill-sm:hover  { border-color:#94a3b8; color:#374151; }
.hm-cdn-vpill-sm.active { background:#0f172a; color:#fff; border-color:#0f172a; }

.hm-cdn-filcount { text-align: center; font-size: 13px; font-weight: 700; color: #374151; }

.hm-cdn-act-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.hm-cdn-act-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 7px;
    font-size: 12px; font-weight: 600;
    border: 1.5px solid; cursor: pointer; transition: all .15s;
    text-decoration: none; white-space: nowrap; background: transparent;
}
.hm-cdn-act-btn--primary { background:#1d4ed8; color:#fff; border-color:#1d4ed8; }
.hm-cdn-act-btn--primary:hover { background:#1e40af; color:#fff; }
.hm-cdn-act-btn--ghost { color:#6b7280; border-color:#e5e7eb; }
.hm-cdn-act-btn--ghost:hover { background:#f3f4f6; color:#374151; border-color:#d1d5db; }
.hm-cdn-act-btn--expand { color:#6b7280; border-color:#e5e7eb; }
.hm-cdn-act-btn--expand:hover { background:#f3f4f6; }
.hm-cdn-act-btn--expand.open { background:#0f172a; color:#fff; border-color:#0f172a; }

.hm-cdn-cat-badge {
    display: inline-block; padding: 3px 9px; border-radius: 5px;
    font-size: 11px; font-weight: 600;
    background: #f3f4f6; color: #6b7280; text-transform: capitalize;
}

/* ── Expandable drawer ── */
.hm-cdn-drawer { display: none; }
.hm-cdn-drawer.open { display: table-row; }
.hm-cdn-drawer > td {
    padding: 0 20px 16px !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e5e7eb !important;
}
.hm-cdn-drawer-inner { background: #0f172a; border-radius: 10px; border: 1px solid #1e293b; overflow: hidden; }
.hm-cdn-drawer-head {
    background: #1e293b; padding: 10px 16px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid #0f172a;
}
.hm-cdn-drawer-head .vl { font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.hm-cdn-drawer-head .vpills { display: flex; gap: 5px; align-items: center; }
.hm-cdn-drawer-vpill {
    padding: 2px 10px; border-radius: 20px;
    font-size: 10.5px; font-weight: 700; font-family: monospace;
    border: 1.5px solid #334155; background: transparent; color: #64748b;
    cursor: pointer; transition: all .12s;
}
.hm-cdn-drawer-vpill:hover  { border-color:#64748b; color:#94a3b8; }
.hm-cdn-drawer-vpill.active { background:#fff; color:#0f172a; border-color:#fff; }

.hm-cdn-file {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; border-bottom: 1px solid #1e293b; transition: background .1s;
}
.hm-cdn-file:last-child { border-bottom: none; }
.hm-cdn-file:hover { background: rgba(255,255,255,.04); }
.hm-cdn-file__name {
    flex: 1; min-width: 0;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 12px; color: #94a3b8;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hm-cdn-file__name strong { color: #e2e8f0; font-weight: 500; }
.hm-cdn-file__url {
    font-size: 11px; color: #475569; font-family: monospace;
    flex: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hm-cdn-file__btns { display: flex; gap: 5px; flex-shrink: 0; }
.hm-cdn-cbtn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 5px;
    font-size: 10px; font-weight: 700;
    border: 1px solid; cursor: pointer;
    transition: all .15s; background: transparent; white-space: nowrap;
}
.hm-cdn-cbtn i { font-size: 9px; }
.hm-cdn-cbtn--url { border-color:#334155; color:#64748b; }
.hm-cdn-cbtn--url:hover { background:#1e293b; color:#e2e8f0; border-color:#475569; }
.hm-cdn-cbtn--tag { border-color:rgba(59,130,246,.4); color:#60a5fa; }
.hm-cdn-cbtn--tag:hover { background:rgba(59,130,246,.12); border-color:#3b82f6; }
.hm-cdn-cbtn.copied { border-color:#166534 !important; color:#4ade80 !important; background:rgba(74,222,128,.08) !important; }

/* ── Shared badges ── */
.hm-cdnb { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px; letter-spacing: .2px; white-space: nowrap; flex-shrink: 0; }
.hm-cdnb--css { background: #fef3c7; color: #92400e; }
.hm-cdnb--js  { background: #dbeafe; color: #1e40af; }

/* ── Empty state ── */
.hm-cdn-empty { display: none; text-align: center; padding: 60px 20px; color: #9ca3af; }
.hm-cdn-empty i { font-size: 40px; display: block; margin-bottom: 12px; opacity: .3; }

/* ── Toast ── */
#hm-toast {
    position: fixed; bottom: 28px; right: 28px;
    background: #0f172a; color: #f8fafc;
    padding: 13px 18px; border-radius: 12px;
    font-size: 13px; font-weight: 600;
    display: flex; align-items: flex-start; gap: 11px;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    transform: translateY(16px) scale(.97); opacity: 0;
    transition: all .22s cubic-bezier(.4,0,.2,1);
    z-index: 9999; pointer-events: none;
    border: 1px solid #1e293b; max-width: 360px;
}
#hm-toast.show { transform: translateY(0) scale(1); opacity: 1; }
#hm-toast .tc { color: #4ade80; font-size: 15px; flex-shrink: 0; margin-top: 1px; }
#hm-toast code { font-family: monospace; font-size: 10.5px; color: #94a3b8; display: block; margin-top: 2px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }

@media(max-width:768px) {
    table.hm-cdn-tbl .col-vers, table.hm-cdn-tbl .col-fil { display: none; }
    .col-lib { width: 40%; } .col-cat { width: 20%; } .col-ver { width: 15%; } .col-act { width: 25%; }
    .hm-cdn-act-btn span { display: none; }
}

/* ══ Temp CDN Upload CTA ═════════════════ */
.hm-cdn-upload-cta {
    background: #0d1117;
    border-top: 1px solid #21262d;
    padding: 40px 0;
}
.hm-cdn-upload-cta__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, rgba(59,130,246,.12) 0%, rgba(56,200,180,.06) 100%);
    border: 1px solid rgba(59,130,246,.25);
    border-radius: 16px;
    padding: 28px 32px;
}
.hm-cdn-upload-cta__icon {
    width: 52px; height: 52px; flex-shrink: 0;
    border-radius: 12px;
    background: rgba(59,130,246,.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #7aa2f7;
}
.hm-cdn-upload-cta__text { flex: 1; }
.hm-cdn-upload-cta__text h3 {
    margin: 0 0 4px;
    font-size: 17px; font-weight: 700; color: #fff;
}
.hm-cdn-upload-cta__text p {
    margin: 0;
    font-size: 13px; color: #8b949e; line-height: 1.6;
}
.hm-cdn-upload-cta__btn {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 8px;
    background: #3b82f6; color: #fff;
    border-radius: 8px; padding: 11px 22px;
    font-size: 14px; font-weight: 600;
    text-decoration: none; white-space: nowrap;
    transition: background .2s, transform .15s;
}
.hm-cdn-upload-cta__btn:hover {
    background: #2563eb; color: #fff; transform: translateY(-1px);
}
@media(max-width: 768px) {
    .hm-cdn-upload-cta__inner { flex-direction: column; text-align: center; padding: 24px 20px; }
    .hm-cdn-upload-cta__btn { width: 100%; justify-content: center; }
}
