body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: #f7f8fa;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 900px;
    margin: 20px auto 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 25px 25px 30px 25px;
}

h1 {
    text-align: center;
    color: #222;
    font-size: 25px;
    margin-bottom: 32px;
    letter-spacing: 2px;
}
.message {
    text-align: center;
    color: #666;
    font-size: 15px;
    margin-bottom: 5px;
}

.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

#searchInput {
    width: 300px;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

#searchInput:focus {
    border-color: #409eff;
    outline: none;
}

.search-btn {
    min-width: 80px;
    padding: 10px 20px;
    background: linear-gradient(90deg, #409eff 0%, #66b1ff 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(64,158,255,0.08);
}

.search-btn:hover {
    background: linear-gradient(90deg, #66b1ff 0%, #409eff 100%);
}

#results {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.item {
    background: #f9fbfd;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(64,158,255,0.07);
    padding: 18px 18px 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s;
    border: 1px solid #e6ecf2;
    min-height: 140px;
}

.item:hover {
    box-shadow: 0 6px 24px rgba(64,158,255,0.13);
    border-color: #b3d8ff;
}

.car-img {
    width: 260px;
    height: 170px;
    object-fit: contain;
    border-radius: 8px;
    background: #eef3f8;
    margin-bottom: 18px;
    margin-right: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    flex-shrink: 0;
}

.car-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.car-title {
    font-size: 20px;
    font-weight: 600;
    color: #409eff;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-align: center;
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.car-attr {
    width: 100%;
    font-size: 15px;
    color: #333;
    line-height: 1.7;
    margin-bottom: 2px;
    display: flex;
    flex-wrap: wrap;
}

.car-attr b {
    color: #666;
    font-weight: 500;
    margin-right: 4px;
}

@media (max-width: 800px) {
    .item {
        flex-direction: column;
        align-items: center;
    }
    .car-img {
        margin-right: 0;
        margin-bottom: 12px;
        width: 100%;
        height: 140px;
    }
    .car-title {
        text-align: center;
        word-break: break-all;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 600px) {
    .container { padding: 10px 2vw; }
    #searchInput { width: 91%; min-width: 0; }
    .item { padding: 12px 6px; }
    .car-img { width: 100%; height: 110px; }
    .search-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .search-btn {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .compare-action-btn {
        width: 90%;
        min-width: 0;
        box-sizing: border-box;
    }
    #compare-modal > div {
        min-width: unset !important;
        width: 98vw !important;
        max-width: 98vw !important;
        padding: 18px 4vw !important;
    }
    #compare-modal input#compareSearchInput {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        font-size: 15px !important;
    }
    #compare-modal .search-btn {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 8px;
        font-size: 15px !important;
        padding: 8px 0 !important;
    }
    #compare-modal > div > div[style*="display:inline-block"] {
        width: 100% !important;
        display: block !important;
    }
    #compare-search-list {
        font-size: 14px !important;
    }
    #compare-search-list button.search-btn {
        font-size: 13px !important;
        padding: 5px 10px !important;
    }
    /* 移动端对比表格参数名称列括号及内容隐藏 */
    .compare-param-cell .param-name-full .param-name-bracket {
        display: none !important;
    }
    
}

.car-select-bar-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.car-select-label {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 18px;
    padding: 6px 18px 6px 10px;
    font-size: 15px;
    background: #f7f8fa;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    margin-right: 0;
    user-select: none;
    position: relative;
}

.car-select-label input[type="checkbox"] {
    accent-color: #409eff;
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.car-select-label.selected {
    background: linear-gradient(90deg, #409eff 0%, #66b1ff 100%);
    color: #fff;
    border-color: #409eff;
}

.car-select-label:hover {
    border-color: #409eff;
    background: #eaf4ff;
    color: #409eff;
}

.compare-car-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.compare-car-block .car-title {
    font-size: 18px;
    font-weight: 600;
    margin-top: 8px;
    word-break: break-all;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compare-param-cell {
    max-width: 155px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compare-param-cell .param-name-full {
    display: inline;
}
.compare-param-cell .param-name-bracket {
    color: #aaa;
    font-size: 13px;
    margin-left: 2px;
}

.compare-table th,
.compare-table td {
    width: 180px;
    min-width: 120px;
    box-sizing: border-box;
}



.skill-toggle-btn {
    padding: 6px 16px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.skill-toggle-btn:hover {
    background: #40a9ff;
}

.skill-content {
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    font-style: italic;
    line-height: 1.6;
    text-align: left;
    border-left: 3px solid #1890ff;
}

.custom-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0.95;
    animation: fadeIn 0.5s ease-out;
}
.success {
    background: #0caa00;
    color: white;
}
.error {
    background: #ff4d4f;
    color: white;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 0.95; transform: translate(-50%, 0); }
}