/* =========================
   GLOBAL
========================= */

* {
    box-sizing: border-box;
}

body {
    font-family: "Inter", Arial, sans-serif;
    background: #f4f6f9;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 25px;
}

/* =========================
   TITLE
========================= */

h1 {
    text-align: center;
    color: #111827;
    margin-bottom: 30px;
    font-size: 42px;
    font-weight: 700;
}

/* =========================
   SEARCH PANEL
========================= */

.search-panel {
    background: white;
    border-radius: 12px;

    padding: 20px;

    position: sticky;
    top: 10px;

    z-index: 100;

    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);

    margin-bottom: 25px;
}

.search-row {
    display: flex;
    gap: 12px;
}

.search-row input {
    flex: 1;

    height: 55px;

    border: 1px solid #dbe4f0;
    border-radius: 8px;

    padding: 0 18px;

    font-size: 16px;
}

.search-row input:focus {
    outline: none;
    border-color: #2563eb;
}

.search-row button {
    min-width: 120px;
    height: 55px;

    border: none;
    border-radius: 8px;

    background: #f59e0b;
    color: white;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
}

.search-row button:hover {
    background: #d97706;
}

.options-row {
    margin-top: 15px;

    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.limit-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.limit-box label {
    color: #4b5563;
    font-size: 14px;
}

#limit {
    width: 90px;
    height: 38px;

    text-align: center;

    border: 1px solid #dbe4f0;
    border-radius: 6px;

    font-size: 14px;
}

/* =========================
   RESULTS STATS
========================= */

.stats {
    display: flex;
    justify-content: space-between;

    margin: 15px 0;

    color: #6b7280;
}

/* =========================
   RESULT CARDS
========================= */

.card {
    background: white;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    padding: 18px;

    margin-bottom: 15px;

    transition: 0.2s;
}

.card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
}

.score {
    padding: 5px 10px;
    border-radius: 20px;

    color: white;
    font-size: 13px;
}

.score.high {
    background: #10b981;
}

.score.medium {
    background: #f59e0b;
}

.score.low {
    background: #ef4444;
}

.preview {
    margin-top: 10px;
    color: #4b5563;
    line-height: 1.6;
}

.full-text {
    display: none;
    margin-top: 12px;
    color: #374151;
}

/* =========================
   BUTTONS
========================= */

.actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.action-btn {
    background: #eef2ff;
    color: #2563eb;

    border: none;
    border-radius: 8px;

    padding: 8px 12px;

    cursor: pointer;
}

.action-btn:hover {
    background: #dbeafe;
}

/* =========================
   HIGHLIGHT
========================= */

mark {
    background: #fde68a;
    padding: 2px;
}

/* =========================
   LOADER
========================= */

.loader-overlay {
    position: fixed;
    inset: 0;

    background: rgba(255,255,255,0.95);

    display: none;

    justify-content: center;
    align-items: center;

    z-index: 9999;
}

.loader-box {
    text-align: center;
}

.spinner {
    width: 70px;
    height: 70px;

    border: 7px solid #dbe4f0;
    border-top: 7px solid #2563eb;

    border-radius: 50%;

    animation: spin 1s linear infinite;

    margin: auto;
    margin-bottom: 20px;
}

.loader-box h3 {
    margin: 0;
    color: #1f2937;
}

.loader-box p {
    color: #6b7280;
    margin-top: 10px;
    font-size: 14px;
}

.options-row {
    margin-top: 15px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    flex-wrap: wrap;
}

.search-options {
    display: flex;
    gap: 25px;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 14px;
    color: #374151;

    cursor: pointer;
}
.reranker-group {
    display: flex;
    gap: 25px;
    align-items: center;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.radio-label input,
.checkbox-label input {
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;

    cursor: pointer;
}

@keyframes spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}

/* =========================
   DISABLED BUTTON
========================= */

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}