/* static/style.css - Image Background with Sky Blue & Light Green Clash Theme */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    color: #1f2933; /* 深灰蓝文字，与浅色背景对比 */
    overflow-x: hidden; /* 防止横向滚动条 */
    /* 基础背景色，以防图片加载失败或过慢 */
    background-color: #e6f7ff; /* 非常淡的天蓝色 */
}

.image-background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: url('background.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

#background-animation-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.container {
    max-width: 1000px;
    margin: 7vh auto;
    background-color: rgba(240, 248, 255, 0.8);
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(70, 130, 180, 0.2);
    backdrop-filter: blur(5px) saturate(110%);
    -webkit-backdrop-filter: blur(5px) saturate(110%);
    border: 1px solid rgba(173, 216, 230, 0.5);
    position: relative;
    z-index: 1;
    box-sizing: border-box; /* 确保 padding 和 border 不会使容器超出 max-width */
}

h1, h2, h3, h4 {
    color: #01579b;
    text-shadow: 0 1px 3px rgba(220, 240, 255, 0.7);
    margin-top: 0; /* 移除一些标题的默认上边距 */
    margin-bottom: 0.75em; /* 统一标题下边距 */
}
h1 {
    text-align: center;
    font-size: 2.6em;
    margin-bottom: 35px; /* h1 下边距可以大一些 */
    color: #0277bd;
    font-weight: 600;
}
h2 {
    font-size: 1.8em;
    border-bottom: 1px solid rgba(173, 216, 230, 0.5); /* 给二级标题加个下划线 */
    padding-bottom: 0.3em;
}
h3 {
    font-size: 1.4em;
}
h4 {
    font-size: 1.1em;
}


.input-section label {
    display: inline-block; /* 改为 block 让 label 独占一行，在小屏幕上更清晰 */
    margin-bottom: 6px;
    font-weight: 500;
    color: #0288d1;
    width: 100%; /* 让 label 宽度撑满 */
}
.input-controls {
    display: flex;
    /* align-items: flex-end;  在垂直排列时，这个可能不再需要，或者改为 flex-start */
    align-items: stretch; /* 让子元素在交叉轴上拉伸 */
    gap: 18px;
    margin-bottom: 25px;
    flex-direction: column; /* 默认垂直排列，在大屏幕上再改回 horizontal */
}
/* .input-controls label { margin-bottom: 0;} */ /* 这个似乎不需要了，因为 label 已经有 margin-bottom */
.input-controls div { /* 包裹 label 和 input 的 div */
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%; /* 让这些输入组也撑满宽度 */
}

textarea#product-info {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #b3e0ff;
    margin-bottom: 25px;
    font-size: 1em;
    background-color: rgba(230, 245, 255, 0.85);
    color: #263238;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}
textarea#product-info:focus {
    outline: none;
    border-color: #81d4fa;
    box-shadow: 0 0 12px rgba(129, 212, 250, 0.7);
}

input[type="number"] {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #b3e0ff;
    background-color: rgba(230, 245, 255, 0.85);
    color: #263238;
    width: 100%; /* 数字输入框也撑满 */
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}
input[type="number"]:focus {
    outline: none;
    border-color: #81d4fa;
    box-shadow: 0 0 10px rgba(129, 212, 250, 0.6);
}

button#generate-button {
    padding: 14px 28px; /* 稍微增大按钮内边距 */
    background: linear-gradient(135deg, #64b5f6, #81c784);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 18px rgba(129, 199, 132, 0.5);
    position: relative;
    overflow: hidden;
    width: 100%; /* 按钮默认宽度撑满 */
    margin-top: 10px; /* 与上方元素保持间距 */
    /* margin-left: auto;  在垂直布局时不需要，大屏幕时再加回来 */
}

button#generate-button:hover {
    background: linear-gradient(135deg, #42a5f5, #66bb6a);
    box-shadow: 0 6px 22px rgba(102, 187, 106, 0.6);
    transform: translateY(-2px);
}

button#generate-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 12px rgba(102, 187, 106, 0.5);
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(200, 230, 255, 0.7);
    transform: scale(0);
    animation: ripple-effect 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

button:disabled {
    background: #b0bec5;
    color: #78909c;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.loading-spinner {
    border: 5px solid rgba(129, 212, 250, 0.4);
    border-top: 5px solid #4fc3f7;
    border-radius: 50%;
    width: 30px; /* 稍微减小 loading spinner */
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 25px auto;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message-box {
    color: #c62828;
    border: 1px solid #ef5350;
    background-color: rgba(255, 220, 220, 0.9);
    padding: 12px; /* 调整内边距 */
    margin-top: 18px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95em; /* 调整字体大小 */
}

.results-area { margin-top: 35px; }
.results-area h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #0277bd;
}
.product-summary {
    background-color: rgba(200, 230, 201, 0.85);
    padding: 20px; /* 调整内边距 */
    border-left: 7px solid #81c784;
    margin-bottom: 30px;
    border-radius: 12px;
    color: #212121;
    box-shadow: 0 6px 20px rgba(129, 199, 132, 0.25);
}
 .product-summary h3 {
    margin-top:0;
    color: #2e7d32;
}

.customer-profiles-container {
    display: grid;
    grid-template-columns: 1fr; /* 默认单列，大屏幕再改 */
    gap: 20px; /* 调整卡片间距 */
}

.profile-card {
    background-color: rgba(227, 242, 253, 0.9);
    border: 1px solid rgba(173, 216, 230, 0.8);
    border-radius: 15px;
    padding: 20px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 6px 25px rgba(173, 216, 230, 0.4);
    color: #37474f;
    overflow: hidden;
    position: relative;
}

.profile-card:hover {
    transform: translateY(-5px) scale(1.01); /* 调整悬停效果 */
    box-shadow: 0 10px 30px rgba(129, 212, 250, 0.45);
    border-color: #81d4fa;
}

.profile-card.active {
    border-left: 7px solid #4caf50;
    background-color: rgba(210, 240, 211, 0.95);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
    transform: scale(1.01); /* 激活状态也微调 */
}

.profile-card h3 {
    margin-top: 0;
    color: #01579b;
    font-size: 1.3em; /* 调整字体 */
    margin-bottom: 10px;
}
.profile-card p {
    font-size: 0.92em; /* 调整字体 */
    line-height: 1.6;
    margin-bottom: 8px;
}
.profile-card p strong {
    color: #0277bd;
    font-weight: 600;
}
.profile-card small {
    font-size: 0.82em; /* 调整字体 */
    color: #546e7a;
    display: block;
    margin-top: 12px;
    text-align: right;
}

.questions-display-container {
    margin-top: 30px;
    padding: 25px;
    background-color: rgba(232, 245, 233, 0.9);
    border: 1px solid rgba(165, 214, 167, 0.8);
    border-radius: 15px;
    display:none;
    color: #37474f;
    box-shadow: 0 6px 25px rgba(165, 214, 167, 0.3);
}
.questions-display-container h3 {
     text-align: center;
     margin-bottom: 20px;
     font-size: 1.4em; /* 调整字体 */
     color: #01579b;
}

.questions-list h4 {
    margin-top: 0;
    color: #2e7d32;
    border-bottom: 1px solid rgba(129, 199, 132, 0.5);
    padding-bottom: 12px;
    margin-bottom: 18px;
    font-size: 1.15em; /* 调整字体 */
}

.questions-list ul {
    list-style-type: none; /* 通常我们自定义列表样式，移除默认点 */
    padding-left: 0;
}

.questions-list li {
    padding: 10px 5px; /* 调整内边距 */
    border-bottom: 1px dashed rgba(165, 214, 167, 0.5);
    transition: background-color 0.25s ease, color 0.25s ease;
    border-radius: 6px;
    font-size: 0.9em; /* 调整字体 */
}
.questions-list li:hover {
    background-color: rgba(188, 226, 190, 0.6);
    color: #1b5e20;
}

.questions-list li:last-child {
    border-bottom: none;
}

.b2b-questions, .b2c-questions {
    margin-bottom: 25px; /* 调整间距 */
}

/* --- 页脚样式 --- */
.page-footer {
    text-align: center;
    padding: 20px 15px;    /* 调整内边距 */
    margin-top: 30px;     /* 调整间距 */
    color: #37474f;
    font-size: 0.85em;    /* 调整字体大小 */
    /* border-top: 1px solid rgba(173, 216, 230, 0.6); */ /* 已移除 */
    position: relative;
    z-index: 2;
    /* background-color: rgba(240, 248, 255, 0.75); */
}
.page-footer p {
    margin: 5px 0;
}
.page-footer a {
    color: #0277bd;
    text-decoration: none;
    font-weight: 500;
}
.page-footer a:hover {
    text-decoration: underline;
    color: #01579b;
}
.footer-separator {
    margin: 0 8px; /* 调整分隔符间距 */
    color: #78909c;
}
.copyright-info {
    font-size: 0.8em; /* 调整字体 */
    color: #546e7a;
    margin-top: 8px;
}


/* --- 滚动条样式 (可选, Webkit 浏览器) --- */
::-webkit-scrollbar {
    width: 8px; /* 滚动条窄一点 */
}
::-webkit-scrollbar-track {
    background: rgba(227, 242, 253, 0.5); /* 淡一点的轨道色 */
}
::-webkit-scrollbar-thumb {
    background: #a0cff0; /* 更淡的滑块 */
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #79bbf0; /* 悬停时颜色 */
}

/* === 响应式设计媒体查询 === */

/* 平板电脑及以上 (例如 > 600px 或 > 768px) - 恢复桌面布局 */
@media (min-width: 769px) {
    .input-controls {
        flex-direction: row; /* 横向排列 */
        align-items: flex-end; /* 底部对齐 */
    }
    .input-controls div { /* 包裹 label 和 input 的 div */
        width: auto; /* 恢复自动宽度 */
    }
    input[type="number"] {
        width: 90px; /* 恢复固定宽度 */
    }
    button#generate-button {
        width: auto; /* 恢复自动宽度 */
        margin-left: auto; /* 按钮靠右 */
        margin-top: 0; /* 移除小屏幕的顶部间距 */
    }
    .customer-profiles-container {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* 恢复多列布局 */
    }
}


/* 手机等小屏幕 (例如 <= 768px) */
@media (max-width: 768px) {
    .container {
        margin: 20px 15px; /* 调整外边距 */
        padding: 20px;     /* 减小内边距 */
        border-radius: 12px;
        background-color: rgba(240, 248, 255, 0.92); /* 小屏幕上内容区可以稍微不透明些 */
    }
    h1 { font-size: 2em; margin-bottom: 25px; } /* 调整标题大小和间距 */
    h2 { font-size: 1.5em; }
    h3 { font-size: 1.2em; }
    h4 { font-size: 1em; }

    .input-section label {
        font-size: 0.95em; /* 轻微调整label字体 */
    }
    textarea#product-info {
        min-height: 120px; /* 减小文本域最小高度 */
        padding: 12px;
        font-size: 0.95em;
    }
    input[type="number"] {
        padding: 10px; /* 调整内边距 */
        font-size: 0.95em;
    }
    button#generate-button {
        padding: 12px 20px; /* 调整按钮内边距 */
        font-size: 1em;
    }

    .profile-card {
        padding: 15px; /* 卡片内边距 */
    }
    .profile-card:hover { /* 移动设备上悬停效果不佳，可以禁用或调整 */
        transform: none;
        box-shadow: 0 6px 25px rgba(173, 216, 230, 0.4);
    }
     .profile-card.active {
        transform: none;
    }
     .profile-card h3 { font-size: 1.2em; }
     .profile-card p { font-size: 0.9em; }
     .profile-card small { font-size: 0.8em; }


    .questions-display-container {
        padding: 20px; /* 问题区域内边距 */
    }
    .questions-display-container h3 { font-size: 1.25em; }
    .questions-list h4 { font-size: 1.05em; }
    .questions-list li { font-size: 0.88em; padding: 8px 5px; }

    .page-footer {
        padding: 15px;
        font-size: 0.8em;
    }
    .copyright-info {
        font-size: 0.75em;
    }
}

/* 更小屏幕 (例如 <= 480px) */
@media (max-width: 480px) {
    .container {
        margin: 15px 10px; /* 进一步减小外边距 */
        padding: 15px;     /* 进一步减小内边距 */
        border-radius: 10px;
    }
    h1 { font-size: 1.7em; margin-bottom: 20px;}
    h2 { font-size: 1.3em; }
    h3 { font-size: 1.1em; }

    .input-controls {
        gap: 15px; /* 减小控件组间距 */
    }
    textarea#product-info {
        min-height: 100px;
        font-size: 0.9em;
    }
    input[type="number"] {
        font-size: 0.9em;
    }
    button#generate-button {
        padding: 10px 15px;
        font-size: 0.95em;
    }

    .loading-spinner {
        width: 25px;
        height: 25px;
        border-width: 4px;
    }

    .profile-card h3 { font-size: 1.15em; }
    .profile-card p { font-size: 0.88em; }
    .profile-card small { font-size: 0.78em; }

    .questions-display-container h3 { font-size: 1.15em; }
    .questions-list h4 { font-size: 1em; }
    .questions-list li { font-size: 0.85em; }

    .page-footer {
        padding: 10px;
        font-size: 0.75em;
    }
    .copyright-info {
        font-size: 0.7em;
    }
}