:root {
    --cd-bg: #020617;
    --cd-surface: rgba(15,23,42,0.92);
    --cd-primary: #06b6d4;
    --cd-text-muted: #d4d4d8;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #e5e7eb;
    background: radial-gradient(circle at 0 0, rgba(6,182,212,.2), transparent 55%),
                radial-gradient(circle at 80% 0, rgba(129,140,248,.18), transparent 55%),
                #0f172a;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.nav-blur {
    background: rgba(2,6,23,.9);
    border-bottom: 1px solid rgba(148,163,184,.2);
}

.cd-card {
    background: rgba(15,23,42,0.94);
    border-radius: 1.2rem;
    border: 1px solid rgba(148,163,184,.35);
}

.cd-indicator-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--cd-text-muted);
}

.cd-indicator-count {
    font-size: 1.15rem;
    font-weight: 600;
}

.text-muted,
.text-secondary {
    color: var(--cd-text-muted) !important;
}

.table-dark td,
.table-dark th {
    color: #e5e7eb;
}

/* Skeleton shimmer */
.cd-skeleton {
    border-radius: .65rem;
    background: linear-gradient(90deg,
        rgba(30,41,59,1) 0%,
        rgba(51,65,85,.9) 20%,
        rgba(30,41,59,1) 40%,
        rgba(30,41,59,1) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.cd-results-skeleton { display: none; }
.cd-results-loading .cd-results-skeleton { display: block; }
.cd-results-loading .cd-results-content { display: none; }

.cd-result-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cd-result-meta {
    font-size: .875rem;
    color: var(--cd-text-muted);
}

.cd-result-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148,163,184,.4), transparent);
}

.cd-history-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.cd-history-meta {
    color: var(--cd-text-muted);
    font-size: .95rem;
}

.cd-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: .4rem;
}

.asm-map {
    position: relative;
    padding-left: 1rem;
    border-left: 2px dashed rgba(148,163,184,.4);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.asm-device {
    position: relative;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.asm-device::before {
    content: '';
    position: absolute;
    left: -1.15rem;
    top: 1.2rem;
    width: 12px;
    height: 12px;
    background: var(--cd-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(6,182,212,0.16);
}

.asm-device.asm-device--no-services::before {
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34,197,94,0.16);
}

.asm-device.asm-device--risky::before {
    background: #ef4444;
    box-shadow: 0 0 0 6px rgba(239,68,68,0.18);
}

.asm-service-pill {
    border: 1px solid rgba(148,163,184,.4);
    background: rgba(15,23,42,0.85);
    color: #e5e7eb;
}

.asm-screenshot-btn {
    border-color: rgba(6,182,212,.6);
    color: #06b6d4;
    background: rgba(6,182,212,0.06);
}

.asm-screenshot-btn:hover {
    color: #0ea5e9;
    border-color: #0ea5e9;
}

.asm-banner {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(148,163,184,.25);
}

.markdown-content {
    color: #e5e7eb;
    line-height: 1.6;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    color: #f8fafc;
    margin-top: 1rem;
    margin-bottom: .5rem;
}

.markdown-content p { margin-bottom: .75rem; }

.markdown-content ul,
.markdown-content ol { padding-left: 1.25rem; }

.markdown-content li { margin-bottom: .35rem; }

.markdown-content code {
    background: rgba(148,163,184,.15);
    padding: .1rem .35rem;
    border-radius: .35rem;
    color: #cbd5f5;
}

.markdown-content pre {
    background: rgba(148,163,184,.15);
    padding: .75rem;
    border-radius: .75rem;
    color: #e5e7eb;
    overflow-x: auto;
}

code { color: #a5b4fc; }

.cd-footer {
    background: linear-gradient(180deg, rgba(2,6,23,0.98) 0%, rgba(2,6,23,0.95) 60%, rgba(1,4,14,0.96) 100%);
    border-top: 1px solid rgba(148,163,184,.25);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.35);
}

.cd-footer-heading {
    letter-spacing: .15em;
    color: #cbd5e1;
}

.cd-footer-text {
    color: var(--cd-text-muted);
    font-size: .95rem;
}

.cd-footer-link {
    color: #e2e8f0;
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

.cd-footer-link:hover {
    color: var(--cd-primary);
    transform: translateX(2px);
}

.cd-footer-tagline {
    color: #94a3b8;
    font-size: .95rem;
}

.cd-footer-bottom {
    border-top: 1px solid rgba(148,163,184,.2);
}

.cd-darkweb-preview {
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.cd-darkweb-preview:hover,
.cd-darkweb-preview:focus {
    border-color: var(--cd-primary);
    box-shadow: 0 0 0 0.15rem rgba(82,109,255,0.25);
    outline: none;
}

.cd-darkweb-body {
    background: #0f172a;
    border: 1px solid rgba(148,163,184,.2);
    border-radius: .75rem;
    color: #e2e8f0;
    padding: 1rem;
    white-space: pre-wrap;
}
