/* ===== 新增样式：评分弹窗、详情展开、搜索高亮、对比功能 ===== */

/* Info icon for rating */
.info-icon {
    cursor: pointer;
    font-size: 14px;
    margin-left: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.info-icon:hover {
    opacity: 1;
}

/* Rating Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--bg-card);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 80%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.modal-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.modal-content li {
    margin: 8px 0;
    color: var(--text-secondary);
}

.modal-content p {
    color: var(--text-secondary);
    margin: 8px 0;
}

/* Expand Button & Details */
.expand-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 8px;
    transition: all 0.3s;
    display: block;
    width: 100%;
}

.expand-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.model-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-top: 10px;
}

.model-details.expanded {
    max-height: 500px;
    overflow-y: auto;
}

.details-content {
    padding: 15px;
    font-size: 13px;
    color: var(--text-secondary);
}

.details-content p {
    margin: 8px 0;
}

.details-content strong {
    color: var(--text-primary);
}

/* Search Highlight */
mark {
    background-color: var(--accent-yellow);
    color: var(--text-primary);
    padding: 2px 4px;
    border-radius: 3px;
}

[data-theme="dark"] mark {
    background-color: #b45309;
    color: #fff;
}

/* Compare Checkbox */
.compare-checkbox {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    z-index: 10;
}

.model-card {
    position: relative;
}

/* Compare Button & Panel */
.compare-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
    z-index: 100;
    display: none;
}

.compare-btn:hover {
    opacity: 0.9;
}

.compare-btn.show {
    display: block;
}

/* Compare Modal */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.compare-table th,
.compare-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.compare-table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
}

.compare-table td {
    color: var(--text-secondary);
}
