* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f4f5f7;
    color: #1f2430;
    margin: 0;
    padding: 30px 15px;
}
.container { max-width: 720px; margin: 0 auto; }
.container.wide { max-width: 1100px; }

.app-header { margin-bottom: 24px; text-align: center; }
.app-header .logo { height: 42px; margin-bottom: 14px; }
.app-header h1 { margin: 0 0 6px 0; font-size: 26px; color: #14213d; }
.subtitle { color: #5a6172; margin: 0; font-size: 14px; }
.container.wide .app-header { text-align: left; }

.card {
    background: #fff;
    border: 1px solid #e3e5ea;
    border-radius: 12px;
    padding: 26px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}

/* Honeypot field - invisible to real users, bots often fill it */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}

label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: #333; }
input[type=text], input[type=url], input[type=password], select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #d4d7dd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
    outline: none;
    border-color: #2952e3;
    box-shadow: 0 0 0 3px rgba(41,82,227,0.12);
}
button {
    margin-top: 20px;
    background: #2952e3;
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
button:hover { background: #1f3fbf; }
button:active { transform: scale(0.98); }
button:disabled { background: #9aa5c9; cursor: not-allowed; transform: none; }

.hint { font-size: 12px; color: #7a8090; margin-top: 10px; }
.error { color: #c0392b; font-weight: 600; }

.result-card h2 { margin-top: 0; color: #14213d; }
.result-card .meta { font-size: 12px; color: #7a8090; margin-bottom: 18px; }
.field { margin-bottom: 14px; font-size: 14px; line-height: 1.5; }
.field .label { font-weight: 700; display: block; margin-bottom: 3px; color: #333; }
.news-list li { margin-bottom: 10px; }
.news-meta { color: #7a8090; font-size: 12px; }

.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th, .history-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eceef1; }
.history-table th { color: #5a6172; font-weight: 700; }

.stats-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.stat-box { background: #fff; border: 1px solid #e3e5ea; border-radius: 8px; padding: 14px 18px; min-width: 110px; text-align: center; }
.stat-box strong { display: block; font-size: 22px; color: #2952e3; }
.stat-box span { font-size: 12px; color: #7a8090; }

.filter-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-form input, .filter-form select { width: auto; flex: 1; min-width: 160px; }
.filter-form button { margin-top: 0; }
.clear-link { font-size: 13px; color: #7a8090; }

.status-badge { padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.status-completed { background: #e3f7e9; color: #1a7f3c; }
.status-processing { background: #fff4d6; color: #9a6b00; }
.status-failed { background: #fde3e3; color: #b3261e; }

footer { text-align: center; color: #a2a7b3; font-size: 12px; margin-top: 30px; }
pre { white-space: pre-wrap; font-size: 12px; background: #f7f8fa; padding: 10px; border-radius: 6px; }

a { color: #2952e3; text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #1f3fbf; text-decoration: underline; }

.history-table tr { transition: background 0.12s ease; }
.history-table tbody tr:hover, .history-table tr:hover { background: #f7f8fc; }

/* Smooth spinner for the "researching" state */
.spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
