/* ── Variables ─────────────────────────────────────── */
:root {
    --bg:        #0d0f14;
    --bg2:       #13161e;
    --border:    #1e2330;
    --border2:   #252c3d;
    --text:      #c9d1e0;
    --text-dim:  #5a6580;
    --accent:    #00e5aa;
    --accent2:   #0099ff;
    --danger:    #ff4d6a;
    --ok:        #00c97a;
    --warn:      #f5a623;
    --mono:      'IBM Plex Mono', monospace;
    --sans:      'DM Sans', sans-serif;
    --radius:    10px;
    --card-pad:  22px 24px;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ──────────────────────────────────────────── */
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.6;
}

/* ── Header ────────────────────────────────────────── */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
    position: sticky;
    top: 0;
    background: rgba(13,15,20,0.92);
    backdrop-filter: blur(10px);
    z-index: 100;
}
.header-inner {
    max-width: 980px;
    margin: auto;
    display: flex;
    align-items: baseline;
    gap: 16px;
}
.logo {
    font-family: var(--mono);
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }
.header-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

/* ── Main ──────────────────────────────────────────── */
.main {
    max-width: 980px;
    margin: 0 auto;
    padding: 36px 20px 60px;
    width: 100%;
    flex: 1;
}

/* ── Search ────────────────────────────────────────── */
.search-section { margin-bottom: 32px; }

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 6px 6px 6px 16px;
    gap: 8px;
    transition: border-color 0.2s;
}
.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,229,170,0.07);
}
.search-icon {
    color: var(--text-dim);
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1;
}
.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: var(--mono);
    font-size: 14px;
    min-width: 0;
    width: 100%;
}
.search-bar input::placeholder { color: var(--text-dim); }

.input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.btn-primary, .btn-secondary {
    padding: 9px 18px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity 0.15s, transform 0.1s;
}
.btn-primary:active, .btn-secondary:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent);
    color: #000;
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
    background: var(--border2);
    color: var(--text);
}
.btn-secondary:hover { background: #2e3650; }

/* ── IP Hero ───────────────────────────────────────── */
.ip-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.ip-flag {
    font-size: 42px;
    line-height: 1;
    flex-shrink: 0;
}
.ip-info { flex: 1; min-width: 0; }
.ip-address {
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 500;
    color: #fff;
    letter-spacing: -0.5px;
}
.ip-location {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 2px;
}
.ip-time {
    text-align: right;
    flex-shrink: 0;
}
.ip-time .time-val {
    font-family: var(--mono);
    font-size: 20px;
    color: var(--accent);
    letter-spacing: 0.03em;
}
.ip-time .time-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* ── Grid ──────────────────────────────────────────── */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.card-wide { grid-column: 1 / -1; }

/* ── Card ──────────────────────────────────────────── */
.card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.015);
}
.card-icon { font-size: 15px; }
.card-header h2 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-dim);
}
.card-body { padding: 8px 0; }

/* ── Data Rows ─────────────────────────────────────── */
.data-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.035);
}
.data-row:last-child { border-bottom: none; }
.data-label {
    font-size: 12px;
    color: var(--text-dim);
    flex-shrink: 0;
    white-space: nowrap;
}
.data-val {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text);
    text-align: right;
    word-break: break-all;
}
.data-val.highlight { color: #fff; }
.data-val.accent { color: var(--accent); }

/* ── Badges ────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-family: var(--mono);
    padding: 3px 9px;
    border-radius: 20px;
    font-weight: 500;
}
.b-ok    { background: rgba(0,201,122,0.12); color: var(--ok); }
.b-warn  { background: rgba(245,166,35,0.12); color: var(--warn); }
.b-danger{ background: rgba(255,77,106,0.12); color: var(--danger); }
.b-dim   { background: rgba(90,101,128,0.15); color: var(--text-dim); }

/* ── Threat Grid ───────────────────────────────────── */
.threat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 10px;
    padding: 16px 20px;
}
.threat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}
.threat-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.threat-dot.ok     { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.threat-dot.danger { background: var(--danger); box-shadow: 0 0 6px var(--danger); }
.threat-dot.warn   { background: var(--warn); box-shadow: 0 0 6px var(--warn); }
.threat-info { min-width: 0; }
.threat-name {
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.threat-status {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
}
.threat-status.ok     { color: var(--ok); }
.threat-status.danger { color: var(--danger); }
.threat-status.warn   { color: var(--warn); }

/* ── Card header actions ───────────────────────────── */
.card-header { justify-content: flex-start; }
.card-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-check {
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid var(--border2);
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    font-family: var(--mono);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.btn-check:hover   { background: rgba(0,229,170,0.08); }
.btn-check:disabled { opacity: .5; cursor: default; }

.bl-summary { font-size: 12px; }

/* ── Blacklist idle state ──────────────────────────── */
.bl-idle {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.bl-idle p { font-size: 13px; color: var(--text-dim); }
.bl-sources { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-tag {
    font-size: 11px;
    font-family: var(--mono);
    padding: 3px 9px;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border2);
    color: var(--text-dim);
}
.bl-tag-forti {
    border-color: rgba(255,90,0,0.4);
    color: #ff8c42;
    background: rgba(255,90,0,0.07);
}

/* ── Blacklist results ─────────────────────────────── */
.bl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.bl-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.015);
}
.bl-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    flex-shrink: 0;
    opacity: .5;
    transition: opacity 0.15s;
}
.bl-link:hover { opacity: 1; color: var(--accent2); }

/* ── Extra panels (AbuseIPDB / FortiGuard) ─────────── */
.bl-ext {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.bl-ext:last-child { border-bottom: none; }
.bl-ext-h {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.bl-ext-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 13px;
    color: var(--text-dim);
}
.bl-ext-row:last-child { border-bottom: none; }
.bl-ext-note {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 12px;
}
.bl-ext-note code {
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text);
}
.btn-fortiguard {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 7px;
    background: rgba(255,90,0,0.1);
    border: 1px solid rgba(255,90,0,0.3);
    color: #ff8c42;
    font-size: 12px;
    font-family: var(--mono);
    text-decoration: none;
    transition: background 0.15s;
}
.btn-fortiguard:hover { background: rgba(255,90,0,0.18); }

/* ── Map ───────────────────────────────────────────── */
#secMapa iframe {
    display: block;
    width: 100%;
    height: 280px;
    border: none;
    border-radius: 6px;
}
#secMapa .map-wrap { padding: 16px; }
.map-coords {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-dim);
}

/* ── Loading ───────────────────────────────────────── */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 60px 0;
    color: var(--text-dim);
    font-size: 13px;
}
.spinner {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error ─────────────────────────────────────────── */
.error-msg {
    background: rgba(255,77,106,0.08);
    border: 1px solid rgba(255,77,106,0.25);
    border-radius: var(--radius);
    color: var(--danger);
    padding: 16px 20px;
    font-size: 13px;
    font-family: var(--mono);
}

/* ── Utilities ─────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Footer ────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 620px) {
    .grid { grid-template-columns: 1fr; }
    .card-wide { grid-column: auto; }
    .ip-time { display: none; }
    .search-bar { flex-wrap: wrap; }
    .search-bar input { width: 100%; }
}

/* ── Tabs ──────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 4px;
    margin-left: auto;
}
.tab {
    padding: 6px 16px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-dim);
    font-size: 13px;
    font-family: var(--sans);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.tab:hover { color: var(--text); background: var(--border); }
.tab.active {
    background: var(--bg2);
    border-color: var(--border2);
    color: var(--accent);
}

/* ── DNS: providers ────────────────────────────────── */
.providers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 20px;
}
.provider-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--border2);
    background: rgba(255,255,255,.02);
}
.provider-name {
    font-size: 13px;
    font-family: var(--mono);
    color: var(--text);
}

/* ── DNS: record rows ──────────────────────────────── */
.dns-txt-row {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255,255,255,.03);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dns-txt-row:last-child { border-bottom: none; }
.dns-txt-val {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text);
    word-break: break-all;
    line-height: 1.5;
}
.dns-ttl {
    font-size: 10px;
    color: var(--text-dim);
    font-family: var(--mono);
    margin-left: 8px;
}
.dns-count {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(0,229,170,.1);
    color: var(--accent);
}
.dns-empty {
    padding: 16px 20px;
    font-size: 13px;
    color: var(--text-dim);
}

/* ── Propagación DNS ───────────────────────────────────────────*/
.prop-type-wrap { flex-shrink: 0; }

.prop-type-select {
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: 7px;
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
    padding: 9px 12px;
    cursor: pointer;
    outline: none;
    height: 38px;
}
.prop-type-select:focus { border-color: var(--accent); }

.prop-table {
    width: 100%;
    border-collapse: collapse;
}
.prop-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-dim);
    padding: 10px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.01);
}
.prop-table td {
    padding: 9px 20px;
    border-bottom: 1px solid rgba(255,255,255,.03);
    font-size: 13px;
    vertical-align: middle;
}
.prop-table tr:last-child td { border-bottom: none; }
.prop-table tr:hover td { background: rgba(255,255,255,.02); }

.prop-server-name { font-weight: 500; color: var(--text); }
.prop-location     { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.prop-value {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text);
    max-width: 340px;
    word-break: break-all;
}
.prop-value.ok      { color: var(--ok); }
.prop-value.error   { color: var(--danger); }
.prop-value.nxdomain{ color: var(--text-dim); }
.prop-value.nodata  { color: var(--warn); }

.prop-ms {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
}
.prop-ms.fast   { color: var(--ok); }
.prop-ms.medium { color: var(--warn); }
.prop-ms.slow   { color: var(--danger); }

.prop-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.prop-dot.ok       { background: var(--ok);     box-shadow: 0 0 5px var(--ok); }
.prop-dot.error    { background: var(--danger);  box-shadow: 0 0 5px var(--danger); }
.prop-dot.nxdomain { background: var(--text-dim); }
.prop-dot.nodata   { background: var(--warn); }

.prop-bar-wrap {
    height: 6px;
    background: var(--border2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}
.prop-bar {
    height: 100%;
    border-radius: 3px;
    transition: width .6s ease;
    background: var(--ok);
}
.prop-bar.partial { background: var(--warn); }
.prop-bar.none    { background: var(--danger); }

.prop-summary-detail {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}
.prop-inconsistent-warn {
    margin: 12px 20px;
    padding: 10px 14px;
    background: rgba(245,166,35,.08);
    border: 1px solid rgba(245,166,35,.25);
    border-radius: 8px;
    font-size: 12px;
    color: var(--warn);
}

/* ── UX & Visual Polish ───────────────────────────────────────── */

/* Animations */
@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.visible .card {
    opacity: 0;
    animation: cardIn 0.35s ease forwards;
}
.visible .card:nth-child(1) { animation-delay: 0.05s; }
.visible .card:nth-child(2) { animation-delay: 0.10s; }
.visible .card:nth-child(3) { animation-delay: 0.15s; }
.visible .card:nth-child(4) { animation-delay: 0.20s; }
.visible .card:nth-child(5) { animation-delay: 0.25s; }
.visible .card:nth-child(6) { animation-delay: 0.30s; }
.visible .card:nth-child(n+7) { animation-delay: 0.35s; }

.main {
    transition: opacity 0.2s ease;
}
.main.hidden {
    display: none !important;
}

/* Hover effects */
.card {
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card:hover {
    border-color: var(--border2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(0,229,170,0.03);
}

/* Gradients */
.site-header {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(13,15,20,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
}
.site-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), transparent);
    opacity: 0.3;
}

.ip-hero {
    background: linear-gradient(135deg, rgba(0,229,170,0.03), rgba(0,153,255,0.03)), var(--bg2);
    border: 1px solid var(--border2);
}

/* Skeletons */
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--bg2) 25%, var(--border) 50%, var(--bg2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 4px;
    height: 20px;
    margin-bottom: 8px;
}
.skeleton.title { width: 40%; height: 24px; margin-bottom: 16px; }
.skeleton.text { width: 100%; }
.skeleton.text.short { width: 60%; }

/* Copy Button */
.btn-copy {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    vertical-align: middle;
}
.btn-copy:hover, .btn-copy:focus-visible {
    color: var(--text);
    background: rgba(255,255,255,0.1);
    outline: none;
}
.btn-copy.copied {
    color: var(--ok);
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    pointer-events: none;
}
.toast {
    background: var(--bg2);
    border: 1px solid var(--border2);
    color: var(--text);
    padding: 12px 20px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: bottom right;
}
.toast.toast-success { border-left: 3px solid var(--ok); }
.toast.toast-error { border-left: 3px solid var(--danger); }
.toast.fadeOut {
    animation: toastFadeOut 0.3s ease forwards;
}
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}

/* Search History Dropdown */
.search-history {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 50;
    overflow: hidden;
}
.search-history.hidden { display: none; }
.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.history-item:last-child { border-bottom: none; }
.history-item:hover, .history-item:focus-visible {
    background: rgba(255,255,255,0.05);
    outline: none;
}
.history-text {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.history-text::before {
    content: '🕒';
    font-size: 11px;
    opacity: 0.5;
}
.history-remove {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 12px;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.history-remove:hover, .history-remove:focus-visible {
    color: var(--danger);
    background: rgba(255,77,106,0.1);
    outline: none;
}
.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    font-weight: 600;
}
.history-clear-all {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 10px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.15s;
}
.history-clear-all:hover { color: var(--text); }

/* ── Ransomware Live ───────────────────────────────────────── */
.ransom-header-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.ransom-header-info h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text);
}
.ransom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.ransom-card {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ransom-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 15px rgba(255,77,106,0.1);
    border-color: var(--danger);
}
.ransom-img-container {
    height: 160px;
    background: #0d0f14;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border2);
}
.ransom-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.ransom-card:hover .ransom-img-container img {
    opacity: 1;
}
.ransom-img-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 24px;
    background: var(--bg3);
}
.ransom-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ransom-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.ransom-victim {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
}
.ransom-group {
    background: rgba(255,77,106,0.1);
    color: var(--danger);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.ransom-detail {
    font-size: 13px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}
.ransom-detail strong {
    color: var(--text);
    font-weight: 500;
}
.ransom-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-dim);
    margin-top: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ransom-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    display: flex;
    justify-content: flex-end;
}
.ransom-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ransom-link:hover {
    color: var(--accent2);
    text-decoration: underline;
}

/* ── Badges Extras Ransomware ──────────────────────────────── */
.ransom-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
}
.press-badge {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
    border: 1px solid rgba(88, 166, 255, 0.3);
}
.press-badge:hover {
    background: rgba(88, 166, 255, 0.25);
}
.info-badge {
    background: rgba(255, 123, 114, 0.15);
    color: #ff7b72;
    border: 1px solid rgba(255, 123, 114, 0.3);
}
.sector-badge {
    background: rgba(137, 87, 229, 0.15);
    color: #c9a4ff;
    border: 1px solid rgba(137, 87, 229, 0.3);
}
.tor-badge {
    background: rgba(57, 186, 91, 0.15);
    color: #39ba5b;
    border: 1px solid rgba(57, 186, 91, 0.3);
}
.tor-badge:hover {
    background: rgba(57, 186, 91, 0.25);
}
.ransom-amt-badge {
    background: rgba(242, 193, 46, 0.15);
    color: #f2c12e;
    border: 1px solid rgba(242, 193, 46, 0.3);
}
.size-badge {
    background: rgba(255, 165, 0, 0.15);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.ransom-infostealer-details {
    margin-top: 10px;
    background: rgba(0,0,0,0.15);
    border-radius: 6px;
    padding: 8px 12px;
}
.ransom-infostealer-details summary {
    font-size: 12px;
    font-weight: 500;
    color: #ff7b72;
    cursor: pointer;
    user-select: none;
    outline: none;
}
.ransom-infostealer-details summary::marker {
    color: #ff7b72;
}
.ransom-infostealer-details pre {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-dim);
    white-space: pre-wrap;
    word-break: break-word;
    font-family: monospace;
}
