/* 消费帮扶模式智能推荐系统样式 - 横版布局 */

.logos-row img[alt="gqt"] {
    display: none !important;
}

.logos-row img[alt="zufe"] {
    height: 48px !important;
    width: auto !important;
    margin-top: 2px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #FCF4F5;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin: 0;
    font-weight: bold;
    flex: 1;
    min-width: 400px;
}

.logo-left,
.logo-right {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-left:hover,
.logo-right:hover {
    transform: scale(1.05);
}

/* 主内容区域：左侧输入参数，右侧智能推荐和理由 */
.top-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: stretch;
    min-height: 600px;
}

/* 右侧内容区域：地图和推荐结果垂直布局 */
.right-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

/* 输入参数区域 - 左侧列 */
.input-params-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px;
    gap: 20px;
}

/* 城市信息区域 */
.city-info-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.city-info-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 8px;
    text-align: left;
}

.city-info-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.city-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.city-info-item label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9em;
}

.city-info-item input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    transition: border-color 0.3s ease;
}

.city-info-item input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 指标区域 */
.indicators-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.indicators-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 8px;
    text-align: left;
}

.params-container {
    height: 400px;
    overflow-y: auto;
    padding-right: 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    flex: 1;
}

.params-container::-webkit-scrollbar {
    width: 8px;
}

.params-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.params-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.params-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.param-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.param-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.param-item label {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
    margin-right: 10px;
    font-size: 0.9em;
    line-height: 1.3;
}

.param-item input {
    width: 100px;
    padding: 6px 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
    transition: border-color 0.3s ease;
}

.param-item input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.param-item.city-input {
    background: #e8f4fd;
    border-color: #3498db;
}

.param-item.city-input input {
    width: 100px;
}

.form-submit {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

#predictBtn {
    width: 180px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

#predictBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

#predictBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.hidden {
    display: none;
}

/* 独立地图卡片 - 占高度40% */
.map-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 40%;
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.map-card h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    padding-bottom: 8px;
    text-align: center;
}

#mapContainer {
    flex: 1;
    min-height: 100px;
}

/* 合并的推荐结果卡片 - 占高度60% */
.recommendation-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 60%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 推荐结果部分 */
.recommendation-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.recommendation-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 8px;
    text-align: center;
}

.recommendation {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* AI建议部分 */
.ai-reason-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ai-reason-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 8px;
    text-align: center;
}

/* 推荐内容样式 */
.recommendation-content {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.recommendation-content h3 {
    color: #2c3e50;
    font-size: 1.1em;
    margin-bottom: 12px;
    font-weight: bold;
}

.recommendation-content.default-mode h3 {
    color: #7f8c8d;
}

.recommendation-content .mode-name {
    color: #34495e;
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 15px;
    padding: 10px 16px;
    background: #ecf0f1;
    border-radius: 20px;
    display: inline-block;
}

.recommendation-content .rating-display {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rating {
    color: #2c3e50;
    font-size: 0.9em;
    font-weight: bold;
}

.stars {
    color: #f39c12;
    font-size: 1.1em;
    font-weight: bold;
    letter-spacing: 1px;
}

/* AI建议内容样式 */
.reason-content {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}

.reason-content p {
    margin: 0;
    line-height: 1.6;
    color: #2c3e50;
    font-size: 0.95em;
}

.reason-content .default-text {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
}

.reason-content .loading-text {
    color: #3498db;
    font-weight: 500;
    text-align: center;
}

.reason-content .reason-text {
    color: #2c3e50;
    font-size: 0.95em;
    text-align: justify;
    line-height: 2;
}

.reason-content .error-text {
    color: #e74c3c;
    font-weight: 500;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 15px;
    }

    .top-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .right-content {
        gap: 15px;
    }

    .input-params-section {
        height: auto;
        min-height: auto;
    }

    .city-info-container {
        gap: 10px;
    }

    .map-card {
        min-height: 180px;
        height: auto;
    }

    .recommendation-card {
        min-height: 220px;
        height: auto;
    }
}

@media (max-width: 768px) {
    .top-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .right-content {
        gap: 15px;
    }

    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2em;
        min-width: auto;
        flex: none;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .logo-left,
    .logo-right {
        height: 50px;
    }

    .input-params-section,
    .map-card,
    .recommendation-card {
        padding: 20px;
    }

    .city-info-section {
        padding: 15px;
    }

    .city-info-container {
        gap: 12px;
    }

    .params-container {
        height: 300px;
        padding-right: 5px;
    }

    .param-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
    }

    .param-item label {
        margin-bottom: 8px;
        margin-right: 0;
        font-size: 0.9em;
    }

    .param-item input {
        width: 100%;
        max-width: 150px;
    }

    .param-item.city-input input {
        width: 100%;
        max-width: 150px;
    }

    #predictBtn {
        width: 100%;
        max-width: 200px;
    }

    .recommendation-content {
        padding: 15px;
    }

    .recommendation-content h3 {
        font-size: 1.1em;
    }

    .recommendation-content .mode-name {
        font-size: 1em;
        padding: 8px 16px;
    }

    .reason-content {
        padding: 0;
    }

    .reason-content .reason-text {
        font-size: 0.9em;
        line-height: 2;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }

    .input-params-section h2,
    .result-section h2 {
        font-size: 1.1em;
    }

    .ai-reason-card .card-header h4 {
        font-size: 1em;
    }
}

/* 多 Logo 横排容器 */
.logos-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.logos-row img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* 让标题在页头水平居中（不受左侧 Logos 影响） */
.header-content {
    position: relative;
}

.header-content h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    flex: none;
    min-width: auto;
    width: max-content;
}

/* 将 Logos 固定在左侧 */
.header-content {
    justify-content: flex-start;
}

.header-content .logos-row {
    justify-content: flex-start;
    margin-right: auto;
}