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

/* ── Shared badges (also used in JS-rendered HTML) ── */
.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; }

/* ── Back link ── */
.hm-cdns-back-link {
    display: inline-flex; align-items: center; gap: 7px;
    color: #6b7280; font-size: 13px; font-weight: 600;
    text-decoration: none; position: relative; z-index: 1;
    padding-top: 16px;
}
.hm-cdns-back-link:hover { color: #7aa2f7; }
.hm-cdns-back-link i { font-size: 11px; }

/* ── Hero ── */
.hm-cdns-hero {
    background: #0d1117;
    border-bottom: 1px solid #21262d;
    padding: 100px 0 48px;
    position: relative;
    overflow: hidden;
}
.hm-cdns-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 48px 48px;
}
.hm-cdns-hero__inner { display: flex; align-items: center; gap: 24px; position: relative; }
.hm-cdns-hero__icon {
    width: 72px; height: 72px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 900; color: #fff;
    background: var(--lc, #6366f1); flex-shrink: 0; letter-spacing: -2px;
}
.hm-cdns-hero__name {
    font-size: 36px; font-weight: 800; color: #fff;
    letter-spacing: -1px; margin: 0;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.hm-cdns-hero__desc { color: #8b949e; font-size: 15px; margin-top: 8px; max-width: 620px; }

.hm-cdns-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px; }
.hm-cdns-badge--ver { background: rgba(74,222,128,.15); color: #4ade80; border: 1px solid rgba(74,222,128,.3); }
.hm-cdns-badge--cat { background: rgba(255,255,255,.08); color: #94a3b8; border: 1px solid rgba(255,255,255,.1); text-transform: capitalize; }

.hm-cdns-hero__actions {
    margin-top: 20px;
    display: flex !important;
    flex-direction: row !important;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.hm-cdns-btn {
    display: inline-flex !important; align-items: center !important;
    gap: 7px; padding: 9px 18px !important; border-radius: 8px !important;
    font-size: 13px !important; font-weight: 600 !important;
    cursor: pointer; transition: all .15s; text-decoration: none !important;
    width: auto !important; box-sizing: border-box;
}
.hm-cdns-btn--primary { background: #1d4ed8 !important; color: #fff !important; border: none !important; }
.hm-cdns-btn--primary:hover { background: #1e40af !important; color: #fff !important; }
.hm-cdns-btn--ghost { background: transparent !important; color: #94a3b8 !important; border: 1px solid #30363d !important; }
.hm-cdns-btn--ghost:hover { background: #21262d !important; color: #e2e8f0 !important; border-color: #484f58 !important; }

/* ── Main layout ── */
.hm-cdns-main { background: #f8fafc; padding: 40px 0 80px; }
.hm-cdns-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
@media(max-width:900px) { .hm-cdns-layout { grid-template-columns: 1fr; } }

/* ── Panel card ── */
.hm-cdns-panel { background: #fff; border-radius: 14px; border: 1.5px solid #e5e7eb; overflow: hidden; margin-bottom: 24px; }
.hm-cdns-panel__head {
    padding: 14px 22px; border-bottom: 1px solid #f1f5f9;
    display: flex; align-items: center; justify-content: space-between;
}
.hm-cdns-panel__title {
    font-size: 12px; font-weight: 700; color: #6b7280;
    display: flex; align-items: center; gap: 8px;
    text-transform: uppercase; letter-spacing: .6px;
}
.hm-cdns-panel__title i { font-size: 11px; }
.hm-cdns-panel__body { padding: 20px 22px; }

/* ── Version tabs ── */
.hm-cdns-ver-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 22px; }
.hm-cdns-ver-tab {
    padding: 6px 16px; border-radius: 8px;
    font-size: 12px; font-weight: 700; font-family: monospace;
    border: 1.5px solid #e5e7eb; background: #fff; color: #6b7280;
    cursor: pointer; transition: all .15s;
}
.hm-cdns-ver-tab:hover { border-color: #94a3b8; color: #374151; background: #f8fafc; }
.hm-cdns-ver-tab.active { background: #0f172a; color: #fff; border-color: #0f172a; }
.hm-cdns-ver-tab .tag-latest {
    font-size: 9px; font-weight: 700; font-family: sans-serif;
    background: #dcfce7; color: #166534;
    padding: 1px 5px; border-radius: 4px; margin-left: 5px; vertical-align: middle;
}

/* ── Files dark block ── */
.hm-cdns-files { background: #0f172a; border-radius: 10px; border: 1px solid #1e293b; overflow: hidden; margin: 0 22px 20px; }
.hm-cdns-file {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; border-bottom: 1px solid #1e293b; transition: background .1s;
}
.hm-cdns-file:last-child { border-bottom: none; }
.hm-cdns-file:hover { background: rgba(255,255,255,.04); }
.hm-cdns-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-cdns-file__name strong { color: #e2e8f0; font-weight: 500; }
.hm-cdns-file__btns { display: flex; gap: 6px; flex-shrink: 0; }
.hm-cdns-cbtn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px; border-radius: 6px;
    font-size: 11px; font-weight: 700; border: 1px solid;
    cursor: pointer; transition: all .15s; background: transparent;
}
.hm-cdns-cbtn i { font-size: 10px; }
.hm-cdns-cbtn--url { border-color: #334155; color: #64748b; }
.hm-cdns-cbtn--url:hover { background: #1e293b; color: #e2e8f0; }
.hm-cdns-cbtn--tag { border-color: rgba(59,130,246,.4); color: #60a5fa; }
.hm-cdns-cbtn--tag:hover { background: rgba(59,130,246,.12); border-color: #3b82f6; }
.hm-cdns-cbtn.copied { border-color: #166534 !important; color: #4ade80 !important; background: rgba(74,222,128,.08) !important; }

/* ── Usage example ── */
.hm-cdns-usage { background: #0f172a; border-radius: 10px; border: 1px solid #1e293b; overflow: hidden; }
.hm-cdns-usage__bar {
    background: #1e293b; padding: 9px 16px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid #0f172a;
}
.hm-cdns-usage__bar span { font-size: 11px; color: #64748b; font-family: monospace; }
.hm-cdns-usage__copy {
    font-size: 10px; font-weight: 700; color: #60a5fa;
    background: transparent; border: 1px solid rgba(59,130,246,.3);
    border-radius: 4px; padding: 2px 9px; cursor: pointer; transition: all .15s;
}
.hm-cdns-usage__copy:hover { background: rgba(59,130,246,.1); }
.hm-cdns-usage pre {
    margin: 0; padding: 18px 18px 20px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 12px; line-height: 1.9; color: #e2e8f0;
    white-space: pre; overflow-x: auto; background: transparent; border: none;
}
.hm-cdns-usage .cc { color: #6e7681; }
.hm-cdns-usage .ct { color: #7ee787; }
.hm-cdns-usage .ca { color: #79c0ff; }
.hm-cdns-usage .cv { color: #a5d6ff; }
.hm-cdns-usage .cu { color: #d2a8ff; }

/* ── Sidebar info ── */
.hm-cdns-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px;
}
.hm-cdns-info-row:last-child { border-bottom: none; }
.hm-cdns-info-row .lbl { color: #9ca3af; font-weight: 600; }
.hm-cdns-info-row .val { color: #374151; font-weight: 600; text-align: right; }
.hm-cdns-info-row a { color: #1d4ed8; text-decoration: none; }
.hm-cdns-info-row a:hover { text-decoration: underline; }

/* ── Related ── */
.hm-cdns-related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hm-cdns-related-card {
    border: 1.5px solid #e5e7eb; border-top: 3px solid var(--rc, #6366f1);
    border-radius: 10px; padding: 12px 14px; text-decoration: none;
    display: block; transition: border-color .15s, box-shadow .15s;
}
.hm-cdns-related-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.hm-cdns-related-card__name { font-size: 13px; font-weight: 700; color: #111827; }
.hm-cdns-related-card__ver  { font-size: 11px; color: #6b7280; margin-top: 2px; font-family: monospace; }

/* ── Toast ── */
#hm-toast2 {
    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-toast2.show { transform: translateY(0) scale(1); opacity: 1; }
#hm-toast2 .tc { color: #4ade80; font-size: 15px; flex-shrink: 0; margin-top: 1px; }
#hm-toast2 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;
}

/* ══ 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; }
}
