* { box-sizing: border-box; }

:root {
    --ink: #1e1b2e;
    --muted: #6b6880;
    --bg: #f6f5fb;
    --card: #ffffff;
    --border: #ece9f7;
    --accent-1: #6d5bf6;
    --accent-2: #9b5cf3;
    --ok-bg: #e8faf1;
    --ok-fg: #0f9d58;
    --err-bg: #fdedee;
    --err-fg: #d8362f;
    --warn-bg: #fff6e0;
    --warn-fg: #9a6a00;
    --radius: 18px;
    --shadow: 0 10px 30px -12px rgba(45, 30, 90, 0.18);
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    font-family: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

/* ---------- Hero ---------- */

.hero {
    background:
        radial-gradient(1100px 420px at 15% -10%, rgba(255,255,255,0.16), transparent 60%),
        linear-gradient(135deg, #5b3df0 0%, var(--accent-1) 45%, var(--accent-2) 100%);
    color: #fff;
    padding: 56px 20px 96px;
}

.hero-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 8px 16px 8px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2px;
    margin-bottom: 26px;
}

.brand-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
}
.brand-icon svg { width: 100%; height: 100%; }

.hero h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 12px;
    letter-spacing: -0.3px;
}

.hero .subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.88);
    margin: 0 0 34px;
    line-height: 1.6;
}

.query-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px;
    border-radius: 999px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.input-icon {
    width: 20px;
    height: 20px;
    color: #9793ad;
    margin-left: 10px;
    flex-shrink: 0;
    display: inline-flex;
}
.input-icon svg { width: 100%; height: 100%; }

.query-form input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    padding: 12px 6px;
    background: transparent;
    min-width: 0;
}

.query-form input[type="text"]::placeholder {
    color: #b3afc7;
}

.query-form button {
    padding: 13px 26px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border: none;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 18px -6px rgba(109, 91, 246, 0.55);
}

.query-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -6px rgba(109, 91, 246, 0.65);
}

.query-form button:active {
    transform: translateY(0);
}

/* ---------- Container / layout ---------- */

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 36px 20px 50px;
    position: relative;
}

/* ---------- Panels / cards ---------- */

.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.result-card .result-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.result-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.result-icon svg { width: 24px; height: 24px; }
.result-icon.ok { background: var(--ok-bg); color: var(--ok-fg); }
.result-icon.err { background: var(--err-bg); color: var(--err-fg); }

.result-card h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.2px;
    word-break: break-all;
}

.badge {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0.2px;
}
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge-err { background: var(--err-bg); color: var(--err-fg); }
.badge-sm { font-size: 11.5px; padding: 3px 10px; }

.fact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.fact {
    background: #faf9fe;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 13px 16px;
    min-width: 0;
}

.fact-wide {
    grid-column: 1 / -1;
}

.fact-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin-bottom: 4px;
}

.fact-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    word-break: break-word;
}

.result-error {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.result-error strong {
    color: var(--err-fg);
    font-size: 16px;
}
.result-error p {
    margin: 4px 0 0;
    color: var(--ink);
}

.result-warn {
    background: var(--warn-bg);
    color: var(--warn-fg);
    border: 1px solid #f5e2ab;
    font-size: 14px;
}

.result-warn a { color: inherit; font-weight: 700; }

/* ---------- History ---------- */

.history-section {
    margin-top: 40px;
}

.history-title {
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 16px;
}

.muted {
    color: var(--muted);
}

.muted-panel {
    color: var(--muted);
    font-size: 14.5px;
    text-align: center;
}

.table-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    min-width: 560px;
}

.history-table th, .history-table td {
    padding: 12px 16px;
    text-align: left;
    white-space: nowrap;
}

.history-table thead th {
    background: #f7f6fc;
    color: var(--muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

.history-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.12s ease;
}
.history-table tbody tr:last-child { border-bottom: none; }
.history-table tbody tr:hover { background: #faf9fe; }

.cell-domain {
    font-weight: 700;
}

.cell-date {
    color: var(--muted);
}

/* ---------- Footer ---------- */

.footer-note {
    margin-top: 28px;
    font-size: 12.5px;
    color: var(--muted);
    text-align: center;
}

.footer-note a {
    color: var(--accent-1);
    font-weight: 600;
    text-decoration: none;
}
.footer-note a:hover { text-decoration: underline; }

code {
    background: #f1eefc;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (max-width: 620px) {
    .hero { padding: 40px 16px 110px; }
    .hero h1 { font-size: 27px; }
    .query-form { flex-wrap: wrap; border-radius: 22px; }
    .query-form input[type="text"] { flex-basis: 0; }
    .query-form button { width: 100%; border-radius: 14px; }
    .fact-grid { grid-template-columns: 1fr; }
    .panel { padding: 20px; }
}
