body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    background: #f5f7fb;
    color: #1f2937;
}

.compare-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.compare-container h1 {
    margin-top: 0;
    text-align: center;
    font-weight: 700;
}

#compare-form {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row label {
    font-weight: 600;
}

.form-row input[type="file"],
.form-row textarea {
    padding: 10px;
    border: 1px solid #d1d9e6;
    border-radius: 8px;
}

.form-row textarea {
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
}

.radio-group {
    display: flex;
    gap: 16px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    cursor: pointer;
}

.compare-container button[type="submit"] {
    justify-self: start;
    background: #2563eb;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.compare-container button[type="submit"]:hover {
    background: #1e4fd1;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: #e0f2fe;
    color: #0c4a6e;
}

.result-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    background: #f9fafc;
    text-align: center;
}

.results-grid {
    display: grid;
    gap: 24px;
}

.result-pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.result-card h2 {
    margin-top: 0;
}

.result-card img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    background: #fff;
}

.score-panel {
    margin-bottom: 24px;
    background: #f8fafc;
    border: 1px solid #dbe3f5;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    display: none;
}

.score-panel h2 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #1f2937;
}

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.score-row:first-of-type {
    border-top: none;
}

.score-label {
    font-weight: 600;
    color: #374151;
}

.score-value {
    font-family: 'Inter', monospace;
    color: #1d4ed8;
    font-weight: 700;
}

.similarity-score {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin: 16px 0 8px;
    display: none;
}

.background-note {
    text-align: center;
    font-size: 14px;
    color: #475569;
    display: none;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}
