:root {
    --primary: #2563eb;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --dark: #111827;
    --bg: #f3f6fa;
    --card: #ffffff;
    --muted: #6b7280;
}

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: linear-gradient(180deg, #f8faff 0%, var(--bg) 100%);
    color: var(--dark);
}

.logo-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--primary);
}

.hero-card,
.panel-card {
    border: 0;
    border-radius: 1rem;
    background: var(--card);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.hero-card {
    padding: 2rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
}

.info-pill-wrap {
    width: 100%;
}

.info-pill-title {
    margin: 0 0 .65rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #475569;
}

.copy-ip-btn {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
}

.copy-ip-btn-solid {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: .6rem;
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.copy-ip-btn-solid:hover:not(:disabled) {
    background: #1d4ed8;
    color: #ffffff;
}

.copy-ip-btn-solid:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.info-pill {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1.75rem;
    min-height: 110px;
    border: 1px solid #dbe6ff;
    border-radius: 1rem;
    background: #f7faff;
    color: #1d4ed8;
}

.info-pill-icon {
    font-size: 2.25rem;
    flex-shrink: 0;
}

.info-pill-ip {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    color: #1d4ed8;
    word-break: break-all;
}

.nav-pills .nav-link {
    background: #eef2ff;
    color: #334155;
    border-radius: .7rem;
}

.nav-pills .nav-link.active {
    background: var(--primary);
}

.tab-pane-custom {
    display: none;
}

.tab-pane-custom.active {
    display: block;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.meta-grid div {
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
    padding: .65rem .8rem;
}

.meta-grid span {
    display: block;
    color: var(--muted);
    font-size: .8rem;
}

.meta-grid strong {
    font-size: .93rem;
}

.map-box {
    height: 360px;
    width: 100%;
    border-radius: .9rem;
    border: 1px solid #dbe2ea;
}

.map-box .leaflet-container {
    height: 100%;
    width: 100%;
    border-radius: .9rem;
}

.ad-slot {
    width: 100%;
    overflow: hidden;
    border-radius: .75rem;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    text-align: center;
}

.ad-slot--banner {
    min-height: 90px;
    max-width: 970px;
    margin-left: auto;
    margin-right: auto;
}

.ad-slot--leaderboard {
    min-height: 90px;
}

.ad-slot--rectangle {
    min-height: 250px;
}

.ad-slot--sidebar {
    min-height: 280px;
    position: sticky;
    top: 1rem;
}

.ad-slot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: inherit;
    padding: 1rem;
    color: #64748b;
}

.ad-slot-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ad-slot-hint {
    font-size: .78rem;
    line-height: 1.35;
}

.ad-slot-hint code {
    font-size: .72rem;
    color: #475569;
}

html.dark-mode .ad-slot {
    border-color: #475569;
    background: #0f172a;
}

html.dark-mode .ad-slot-placeholder {
    color: #94a3b8;
}

html.dark-mode .ad-slot-hint code {
    color: #cbd5e1;
}

.summary-box {
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
    padding: .75rem;
    background: #f9fbff;
}

.summary-box span {
    display: block;
    color: var(--muted);
    font-size: .82rem;
}

.summary-box strong {
    font-size: 1rem;
}

.whois-pre {
    white-space: pre-wrap;
    background: #0b1020;
    color: #d1d9ff;
    border-radius: .75rem;
    padding: .85rem;
    max-height: 340px;
    overflow: auto;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-overlay-box {
    max-width: 420px;
    text-align: center;
}

.spam-table-wrap {
    max-height: 520px;
    overflow: auto;
}

.spam-row-new {
    animation: spamRowFlash 0.7s ease;
}

.spam-row-slow td {
    background-color: rgba(255, 193, 7, 0.12);
}

.spam-time-slow {
    color: #b45309;
    font-weight: 600;
}

@keyframes spamRowFlash {
    from {
        background-color: rgba(220, 53, 69, 0.18);
    }
    to {
        background-color: transparent;
    }
}

@media (max-width: 768px) {
    .hero-card {
        padding: 1.4rem;
    }

    .meta-grid {
        grid-template-columns: 1fr;
    }

    .map-box {
        height: 290px;
    }
}

html.dark-mode body {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #e2e8f0;
}

html.dark-mode .panel-card,
html.dark-mode .hero-card {
    background: #1f2937;
    box-shadow: none;
}

html.dark-mode .meta-grid div,
html.dark-mode .summary-box {
    background: #0f172a;
    border-color: #334155;
}

html.dark-mode header,
html.dark-mode footer {
    background: #111827 !important;
    border-color: #374151 !important;
}

html.dark-mode .info-pill {
    background: #0f172a;
    border-color: #334155;
}

html.dark-mode .info-pill-ip {
    color: #93c5fd;
}

html.dark-mode .info-pill-title {
    color: #cbd5e1;
}

html.dark-mode .copy-ip-btn {
    border-color: #64748b;
    color: #e2e8f0;
}

html.dark-mode .copy-ip-btn:hover {
    background-color: #334155;
    border-color: #94a3b8;
    color: #ffffff;
}

html.dark-mode .copy-ip-btn-solid {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
}

html.dark-mode .copy-ip-btn-solid:hover:not(:disabled) {
    background: #2563eb;
}

html.dark-mode,
html.dark-mode body {
    --bs-body-bg: #111827;
    --bs-body-color: #f1f5f9;
    --bs-secondary-color: #94a3b8;
    --bs-emphasis-color: #ffffff;
    --bs-heading-color: #f8fafc;
}

html.dark-mode .display-6,
html.dark-mode h1,
html.dark-mode h2,
html.dark-mode h3,
html.dark-mode h4,
html.dark-mode h5,
html.dark-mode h6,
html.dark-mode .h1,
html.dark-mode .h2,
html.dark-mode .h3,
html.dark-mode .h4,
html.dark-mode .h5,
html.dark-mode .h6 {
    color: #f8fafc;
}

html.dark-mode .hero-card,
html.dark-mode .panel-card,
html.dark-mode .panel-card .card-body {
    color: #f1f5f9;
}

html.dark-mode .meta-grid strong,
html.dark-mode .summary-box strong,
html.dark-mode #spamCheckedIp,
html.dark-mode .whois-values {
    color: #ffffff !important;
}

html.dark-mode .meta-grid span {
    color: #94a3b8;
}

html.dark-mode small.text-muted,
html.dark-mode .text-muted:not(.preserve-muted),
html.dark-mode footer .text-muted {
    color: #94a3b8 !important;
}

html.dark-mode .form-label,
html.dark-mode label {
    color: #e2e8f0;
}

html.dark-mode .form-control,
html.dark-mode .form-control:focus {
    background-color: #0f172a;
    border-color: #475569;
    color: #ffffff;
}

html.dark-mode .form-control::placeholder {
    color: #64748b;
}

html.dark-mode .nav-pills .nav-link {
    background: #334155;
    color: #e2e8f0;
}

html.dark-mode .nav-pills .nav-link:hover {
    color: #ffffff;
}

html.dark-mode .nav-pills .nav-link.active {
    background: var(--primary);
    color: #ffffff;
}

html.dark-mode table,
html.dark-mode .table {
    --bs-table-color: #f1f5f9;
    --bs-table-striped-color: #f1f5f9;
    --bs-table-active-color: #f1f5f9;
    --bs-table-hover-color: #ffffff;
    --bs-table-border-color: #334155;
    color: var(--bs-table-color);
}

html.dark-mode .table thead th {
    background-color: #0f172a;
    color: #f8fafc;
    border-bottom-color: #475569;
}

html.dark-mode .table tbody td,
html.dark-mode #spamDnsblBody td,
html.dark-mode #spamDnsblBody th {
    color: #f1f5f9 !important;
    border-color: #334155;
}

html.dark-mode .table tbody tr:hover td {
    color: #ffffff !important;
}

html.dark-mode .badge.text-bg-light {
    background-color: #334155 !important;
    color: #f8fafc !important;
}

html.dark-mode .border-bottom {
    border-color: #334155 !important;
}

html.dark-mode .alert {
    border-color: transparent;
}

html.dark-mode .btn-outline-secondary {
    border-color: #64748b;
    color: #e2e8f0;
}

html.dark-mode .btn-outline-secondary:hover {
    background-color: #334155;
    border-color: #94a3b8;
    color: #ffffff;
}

html.dark-mode .spam-time-slow {
    color: #fbbf24;
}

html.dark-mode .text-secondary-emphasis {
    color: #94a3b8 !important;
}

html.dark-mode .panel-card > .card-body > h4.h6,
html.dark-mode #spamLivePanel small {
    color: #cbd5e1;
}

html.dark-mode .progress {
    background-color: #334155;
}

html.dark-mode #spamIntro {
    color: #cbd5e1;
}
