body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: #f7f8fa;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 900px;
    margin: 40px auto 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 32px 24px 40px 24px;
}

h2 {
    text-align: center;
    color: #222;
    margin-bottom: 32px;
    letter-spacing: 2px;
}
.message {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

#trackSearchInput {
    width: 300px;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

#trackSearchInput: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%);
}

#track-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: 320px;
    height: 180px;
    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-title {
    font-size: 22px;
    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;
}

.item table th,
.item table td {
    text-align: center;
    width: 25%;
    min-width: 80px;
    max-width: 1px;
    /* 保证四列等宽 */
    box-sizing: border-box;
    /* 防止内容撑开 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.diff-info {
    margin: 16px 0;
    padding: 10px 18px;
    border-left: 4px solid;
    border-radius: 6px;
    font-size: 15px;
    text-align: center;
    font-weight: 500;
    max-width: 700px;
    box-sizing: border-box;
    /* 默认色为橙黄，等待机会 */
    background: #fffbe6;
    border-color: #faad14;
    color: #b8860b;
}
.diff-info.diff-equal {
    background: #f6ffed;
    border-color: #52c41a;
    color: #237804;
}
.diff-info.diff-wait {
    background: #fffbe6;
    border-color: #faad14;
    color: #b8860b;
}
.diff-info.diff-hopeless {
    background: #fff1f0;
    border-color: #ff4d4f;
    color: #a8071a;
}
.diff-info.diff-reverse {
    background: #e6f7ff;
    border-color: #1890ff;
    color: #096dd9;
}

@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;
    }
    /* 新增：让记录表格竖向排列更紧凑 */
    .item > div[style*="flex-direction:column"] > div {
        max-width: 100% !important;
        /* 让表格容器居中 */
        margin-left: auto;
        margin-right: auto;
    }
    .item table {
        font-size: 14px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 600px) {
    .container { padding: 10px 2vw; }
    #trackSearchInput { 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;
    }
    /* 新增：表格自适应 */
    .item table {
        min-width: 0 !important;
        width: 100% !important;
        font-size: 13px;
    }
}
