/* public/compare.css */

/* 继承 hub.css 的字体和基础卡片样式，这里只添加本页特有的样式 */

body {
  /* 确保极光背景生效 */
  color: #e2e8f0; /* 默认文字颜色调整为浅色 */
}

/* --- 表单元素样式 --- */
.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    text-align: center;
    margin-bottom: 0.5rem;
}

.form-description {
    text-align: center;
    color: #cbd5e1;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.form-input {
    width: 100%;
    background-color: rgba(15, 23, 42, 0.5); /* 半透明深色背景 */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    padding: 0.875rem 1.25rem;
    color: #f1f5f9;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
}

.form-input::placeholder {
    color: #64748b;
}

.form-input:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.3);
}

.action-button {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    border-radius: 0.5rem;
    background-image: linear-gradient(to right, #6366f1, #a855f7);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-button:hover {
    box-shadow: 0 10px 20px -10px rgba(168, 85, 247, 0.4);
    transform: translateY(-2px);
}


/* --- 加载与状态信息 --- */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#status-message {
    font-size: 1.1rem;
    line-height: 1.7;
    word-break: break-all;
}
#status-message.message-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}
#status-message.message-success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}
#status-message.message-info {
    color: #cbd5e1;
}

/* --- 默契度得分仪表盘 --- */
.score-circle {
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.8) 60%, transparent 61%);
}
.score-circle::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(#f472b6, #f97316, #eab308, #84cc16, #22d3ee, #818cf8, #f472b6);
    animation: spin 4s linear infinite;
    z-index: -1;
}

/* --- 对比结果列表 --- */
.results-table-header {
    display: none;
}
@media (min-width: 768px) {
    .results-table-header {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        gap: 1rem;
        padding: 0 1rem 0.75rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-weight: 600;
        color: #94a3b8;
        font-size: 0.875rem;
        text-transform: uppercase;
    }
}


.result-item {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first: stacked */
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    border: 1px solid transparent;
    background-color: rgba(255, 255, 255, 0.03);
}

@media (min-width: 768px) {
    .result-item {
        grid-template-columns: 2fr 1fr 1fr; /* Desktop: side-by-side */
        gap: 1rem;
    }
}

.result-item.is-match {
    background-color: rgba(22, 163, 74, 0.15);
    border-left: 4px solid #22c55e;
}

.question-column {
    font-weight: 500;
    color: #e2e8f0;
}

.answer-column {
    color: #cbd5e1;
    background-color: rgba(15, 23, 42, 0.4);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
}

.answer-column .no-answer {
    color: #64748b;
    font-style: italic;
}

/* On mobile, add labels using pseudo-elements */
@media (max-width: 767px) {
    .answer-column::before {
        content: attr(data-label);
        font-weight: 600;
        color: #94a3b8;
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.8rem;
    }
}