:root {
    --bs-success-bg-subtle: #e0f2e1; /* 修改六个方框颜色 */
    --primary-color: #2A9D8F;
    --warning-color: #E9C46A;
    --danger-color: #E76F51;
}

* {
    box-sizing: border-box;
}

.slogan-box {
    font-size: 1.8rem;
    color: var(--primary-color);
    padding: 1.5rem 2rem;
    border: 3px solid var(--warning-color);
    border-radius: 12px;
    display: inline-block;
    margin: 2rem auto;
    text-align: center;
    background: rgba(233, 196, 106, 0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.budget-header {
    position: sticky;
    top: 56px;
    background: white;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#recommendationContainer {
    margin-top: 3rem;
}

.product-card {
    transition: transform 0.2s;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.product-image {
    height: 160px;
    object-fit: cover;
    background: #f5f5f5;
}

.add-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}
.add-btn.added {
    background: #27AE60 !important;
}

.float-action {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 1000;
    transition: all 0.3s;
    cursor: pointer;
}
.float-action:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.progress-bar {
    transition: width 0.5s ease, background-color 0.3s;
}

.smart-recommendation {
    position: absolute;
    right: 0;
    bottom: -20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
}
.smart-recommendation i {
    color: white;
    font-size: 20px;
}

.dropdown-list {
    position: absolute;
    right: 0;
    bottom: -100px;
    width: 150px;
    background-color: white;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    z-index: 1002;
}
.dropdown-list.show {
    display: block;
}
.dropdown-list div {
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.dropdown-list div:hover {
    background-color: #f5f5f5;
}

.about-modal-content {
    min-height: 80vh;
}

.concept-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 1rem;
    /* 新增居中代码 ▼▼▼ */
    text-align: center !important;
    width: 100%;
    display: block;
    /* ▲▲▲ */
}
.concept-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--warning-color);
}

.concept-desc {
    font-size: 1.8rem;
    line-height: 1.6;
    color: #444;
    padding: 2rem;
    border-left: 4px solid var(--primary-color);
    background: #f8f9fa;
    border-radius: 8px;
}

.concept-logo {
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.concept-logo:hover {
    transform: scale(1.03);
}

#recipeModal .modal-body {
    line-height: 1.8;
    font-size: 16px;
}

.who-we-are-section {
    padding: 2rem 0;
}

.problem-box {
    border: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
}

.problem-item {
    font-size: 1.5rem;
    color: var(--danger-color);
    padding: 1.2rem;
    margin: 1rem 0;
    border: 2px solid #eee;
    border-radius: 8px;
    text-align: left;
    position: relative;
}

.solution-box {
    padding: 1rem;
}

.solution-item {
    font-size: 1.2rem;
    color: var(--primary-color);
    padding: 1.2rem;
    margin: 1rem 0;
    border: 2px solid var(--warning-color);
    border-radius: 8px;
    text-align: left;
    background: rgba(233, 196, 106, 0.1);
}

.arrow-line {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 2rem 0;
}

.arrow-line i {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 1.5rem 0;
}

@media (max-width: 768px) {
    .problem-item, .solution-item {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .arrow-line {
        display: none;
    }
    
    .problem-box {
        margin-bottom: 2rem;
    }
}

.problem-box, .solution-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.problem-item, .solution-item {
    min-height: 80px;
    display: flex;
    align-items: center;
    padding: 1.2rem;
    margin: 0;
}

.arrow-line {
    height: auto;
    justify-content: center;
    padding: 0;
    margin: 0 1rem;
}

.arrow-line i {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 1.8rem 0;
    transform: translateY(8px);
}

.market-research-section {
    padding: 2rem 0;
}

.research-title {
    font-size: 2.2rem;
    color: var(--danger-color);
    font-weight: bold;
    letter-spacing: 1px;
    /* 新增居中代码 ▼▼▼ */
    text-align: center !important;
    margin: 2rem 0;
    /* ▲▲▲ */
}

.research-content {
    border: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: left;
    line-height: 1.8;
}

.research-content p {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-left: 3px solid var(--warning-color);
    background: rgba(233, 196, 106, 0.05);
}

.research-content p:nth-child(odd) {
    border-left-color: var(--primary-color);
}

.research-img-container {
    max-width: 320px;
    margin: 0 auto;
    padding: 15px;
}

.research-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    object-fit: cover;
    max-height: 500px;
}

@media (min-width: 992px) {
    .market-research-section .row {
        align-items: stretch;
    }
    
    .research-img-container {
        position: sticky;
        top: 20px;
    }
}

@media (max-width: 768px) {
    .research-img {
        max-height: 300px;
    }
}

.competitor-analysis-section {
    padding: 2rem 0;
    border-top: 2px dashed var(--warning-color);
    margin-top: 3rem;
}

.painpoint-innovation-section .row {
    align-items: start !important;
}

.left-boxes {
    position: relative;
    padding-top: 1rem;
}

.left-boxes .title-box {
    transition: transform 0.3s;
}
/* 新增痛点创新点调整 */
.left-boxes {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem !important;
}

.left-boxes .title-box {
    margin-top: 0 !important;
    transform: none !important;
    min-height: 100px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.title-box, .content-box {
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    padding: 1.2rem;
    position: relative;
    background: white;
    box-shadow: 0 4px 15px rgba(42,157,143,0.2);
    width: auto;
    max-width: 94%;
    margin: 0.8rem auto;
}

.title-box {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(42, 157, 143, 0.1);
}

.content-box {
    border-color: var(--warning-color);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 98%; 
}

@media (min-width: 768px) {
    .content-box {
        max-width: 95%;
    }
}

@media (min-width: 1200px) {
    .content-box {
        max-width: min(92%, 1400px);
        margin-left: 1%;
        margin-right: 1%;
    }
}

.fa-long-arrow-alt-right {
    position: absolute;
    color: var(--warning-color);
    font-size: 1.8rem;
    background: white;
    padding: 0 8px;
    z-index: 1;
}

/* 修改箭头后新增响应式调整 */
.painpoint-innovation-section .row {
    align-items: stretch !important;
}

.left-boxes, .right-boxes {
    padding: 2rem;
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    margin: 1rem 0;
    /* 新增弹性布局 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 600px; /* 根据实际内容高度调整 */
}

.title-box {
    height: 120px; /* 统一标题容器高度 */
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.content-box {
    flex: 1; /* 让内容区域自动填充剩余空间 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .painpoint-innovation-section {
        padding: 1rem;
    }
    
    .title-box, .content-box {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .title-box h4 {
        font-size: 1.1rem;
    }
    
    .content-box p {
        font-size: 0.9rem;
    }
    
    .arrow-connection {
        display: none;
    }
}

@media (min-width: 1200px) {
    .painpoint-innovation-section {
        padding: 2rem calc((100vw - 1200px)/2);
    }
}

.content-box p {
    word-break: break-word;
    hyphens: auto;
    margin-bottom: 0.8rem;
}

/* 新增关于我们页面布局调整 */
@media (min-width: 992px) {
    .container.mt-5.pt-5 {
        max-width: 1200px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .concept-section .row {
        align-items: center;
        min-height: 70vh;
    }
}

/* 新增产品定位布局控制 */
.positioning-box {
    background-color: #e0f2e1 !important; 
    border-radius: 15px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.positioning-box h3 {
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
}

.positioning-desc {
    font-size: 1.4rem;  /* 原h3为2.5rem */
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

@media (max-width: 768px) {
    .positioning-box {
        min-height: 150px;
        padding: 1.5rem;
    }
    .positioning-box h3 {
        font-size: 2rem !important;
    }
}

/* 新增情景故事布局控制 */
.story-box {
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #444;
}
/* 新增核心功能布局控制 */
.function-card {
    background: center/cover no-repeat;
    height: 280px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.function-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
}

.card-text {
    position: relative;
    z-index: 1;
    color: white;
    font-size: 2rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    padding: 1rem;
}

/* 新增信息架构布局控制 */
.ia-diagram {
    background: rgba(255,255,255,0.9);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px dashed var(--primary-color);
    max-width: 1200px;
    margin: 0 auto;
}

.ia-diagram img {
    transition: transform 0.3s ease;
}

.ia-diagram:hover img {
    transform: scale(1.02);
}

/* 新增运营策略布局控制 */
.content-box {
    background: rgba(255,255,255,0.95);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
}

.content-box ul {
    padding-left: 1.2rem;
    margin-bottom: 0;
}

.content-box li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.core-loop {
    border-top: 2px dashed var(--primary-color);
    padding-top: 0.8rem;
    font-size: 0.95em;
}

/* 再新增运营策略布局控制 */
.content-box {
    border-color: var(--warning-color);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: none;  /* 移除最大宽度限制 */
    width: 100%;      /* 新增宽度设置 */
    white-space: normal; /* 确保正常换行 */
}

@media (min-width: 992px) {
    .content-box {
        font-size: 1rem; /* 大屏增加字号 */
        line-height: 1.7;
        padding: 1.8rem; /* 增加内边距 */
    }

    .content-box li {
        margin-bottom: 1rem; /* 增加列表间距 */
    }
}

/* 优化运营模式栅格布局 */
.operation-mode .row {
    justify-content: center; /* 居中排列 */
}

.operation-mode .col-lg-3 {
    flex: 0 0 24%; /* 允许弹性伸缩 */
    max-width: 24%;
    margin: 0 0.5%; /* 增加间距 */
}

/* 新增痛点创新点布局调整样式 */
.section-container {
    border: 2px dashed var(--primary-color);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    background: rgba(233, 196, 106, 0.05);
}

.title-box {
    border: none !important;  /* 移除原有边框 */
    box-shadow: none !important;
    background: transparent !important;
}

.content-box {
    border: 1px solid var(--warning-color) !important;
    border-radius: 8px;
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .section-container {
        padding: 1rem;
    }
    
    .left-boxes, .right-boxes {
        width: 100%;
        max-width: none;
    }
}

/* 新增小组分工样式 */
.team-section {
    padding: 2rem 0;
}

.team-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.member-item {
    font-size: 1.2rem;
    color: var(--primary-color);
    padding: 1rem 0;
    border-bottom: 1px dashed var(--warning-color);
    text-align: left;
}

.member-item:last-child {
    border-bottom: none;
}

@media (min-width: 768px) {
    .member-item {
        font-size: 1.3rem;
        padding: 1.2rem 0;
    }
}

/* 登录模态框样式 */
#loginModal .modal-content {
    border-radius: 20px;
    overflow: hidden;
}

.auth-form {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#loginModal .btn-primary {
    background: #2A9D8F;
    border-color: #2A9D8F;
    transition: all 0.3s;
}

#loginModal .btn-primary:hover {
    background: #21867A;
    border-color: #21867A;
}

#loginModal .btn-outline-primary {
    color: #2A9D8F;
    border-color: #2A9D8F;
}

#loginModal .btn-outline-primary:hover {
    background: #2A9D8F;
    color: white;
}

#mainContent {
    opacity: 0;
    animation: fadeInContent 0.5s 0.3s forwards;
}

@keyframes fadeInContent {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ▼▼▼ 新增登录相关样式 ▼▼▼ */
#loginModal .modal-content {
    border-radius: 20px;
    overflow: hidden;
}

.auth-form {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#mainContent {
    opacity: 0;
    animation: fadeInContent 0.5s 0.3s forwards;
}

@keyframes fadeInContent {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 第三方登录样式 */
.divider {
    display: flex;
    align-items: center;
    color: #666;
    margin: 1.5rem 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: #ddd;
}

.divider-text {
    padding: 0 1rem;
    font-size: 0.9em;
}

.btn-qq {
    background: #3492E9;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s;
}

.btn-wechat {
    background: #07C160;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s;
}

.btn-qq:hover {
    background: #2B7AB8;
    color: white;
}

.btn-wechat:hover {
    background: #069E4D;
    color: white;
}

/* 新增代码让登录界面显示 ▼▼▼ */
#loginModal {
    z-index: 99999; /* 确保模态框在最顶层 */
}

.modal-backdrop {
    z-index: 9999; /* 背景层 */
}

.navbar {
    z-index: 100; /* 导航栏在模态框下方 */
}

/* 登录模态框层级修复 */
#loginModal.modal {
    --bs-modal-zindex: 99999;
    z-index: var(--bs-modal-zindex) !important;
}

.modal-backdrop {
    --bs-backdrop-zindex: 9999;
    z-index: var(--bs-backdrop-zindex) !important;
}

.navbar {
    z-index: 1000; /* 确保低于模态框 */
}

/* 防止移动端滚动穿透 */
body.modal-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

/* 适配深色模式 */
@media (prefers-color-scheme: dark) {
    #loginModal .modal-content {
        background: #2a2a2a;
        color: #fff;
    }
    #loginModal .btn-close {
        filter: invert(1);
    }
}

/* 信息收集模态框样式 */
#infoCollectModal .modal-header {
  border-bottom: none;
}

#infoCollectModal .modal-body {
  padding: 2rem;
}

#infoCollectModal label {
  font-weight: 500;
  color: var(--primary-color);
}

#infoCollectModal input,
#infoCollectModal textarea {
  border-radius: 8px;
  padding: 0.75rem;
}

#infoCollectModal input:focus,
#infoCollectModal textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(42,157,143,0.25);
}

/* +++ 新增修复样式 +++ */
#loginModal {
    z-index: 999999 !important;
    background: rgba(0,0,0,0.5) !important;
}

.modal-backdrop {
    z-index: 99999 !important;
    background-color: rgba(0,0,0,0.5) !important;
}

.modal-dialog {
    margin: 1.75rem auto;
    pointer-events: none;
}

.modal-content {
    pointer-events: auto;
    position: relative;
    z-index: 9999999 !important;
}

/* === 移除默认遮罩 === */
.modal-backdrop {
  display: none !important;
}

/* === 确保页面内容在登录框下方 === */
nav.navbar,
#mainContent {
  position: relative;
  z-index: 1; /* 低于登录框的 z-index */
}

/* 添加以下样式确保信息收集模态框显示 */
#infoCollectModal {
  z-index: 9999999 !important;
}
.modal-backdrop.show {
  opacity: 0.5 !important;
}

/* 商品详情模态框样式 */
#productDetailsModal .modal-dialog {
    max-width: 800px;
}

#productDetailsModal .product-info {
    padding: 1rem;
}

#productDetailsModal .info-item {
    margin-bottom: 1.5rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

#productDetailsModal .info-item i {
    font-size: 1.2rem;
    width: 30px;
}

.nutrition-fact .list-group-item {
    background: transparent;
    padding: 0.75rem 0;
    border-color: rgba(0,0,0,0.1);
}

#productDetailsModal .modal-footer {
    border-top: none;
    padding-top: 0;
}

/* 食谱模态框样式 */
.recipe-container {
    padding: 0 1rem;
}

/* ▼▼▼ 修改食谱标题样式 ▼▼▼ */
.section-title {
    color: var(--primary-color);
    font-size: 1.5rem; /* 放大标题字号 */
    font-weight: 600;  /* 增加字体粗细 */
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.8rem;
    margin-bottom: 1.2rem;
    letter-spacing: 1px; /* 增加字间距 */
}


.recipe-list {
    max-height: 200px;
    overflow-y: auto;
}

.recipe-list li {
    transition: all 0.3s;
    cursor: pointer;
}

/* ▼▼▼ 统一列表文字样式 ▼▼▼ */
.recipe-list {
    font-size: 1rem !important; /* 统一字号 */
    line-height: 1.6;          /* 调整行高 */
}

.recipe-list li {
    font-size: 1rem;          /* 列表项统一字号 */
    color: #444;              /* 加深文字颜色 */
    padding: 0.8rem 1rem;     /* 调整内边距 */
    margin: 0.3rem 0;         /* 增加项间距 */
}

.recipe-list li:hover {
    background: rgba(42,157,143,0.1);
    transform: translateX(5px);
}

.nutrition-card {
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ▼▼▼ 调整营养卡片文字 ▼▼▼ */
.nutrition-card .value {
    font-size: 1.5rem;       /* 缩小数值显示 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;  /* 增加与标签间距 */
}

/* ▼▼▼ 加深标签文字颜色 ▼▼▼ */
.nutrition-card .label {
    font-size: 0.9rem;
    color: #333;           /* 将#666改为更深的#333 */
    font-weight: 500;      /* 增加字体粗细 */
    opacity: 0.9;
}


/* 添加在styles.css底部 */
body.logged-in #loginModal {
  display: none !important;
}

body.logged-in .modal-backdrop {
  display: none !important;
}

body.logged-in #mainContent {
  display: block !important;
}

/* ▼▼▼ 统一按钮文字 ▼▼▼ */
#recipeModal .btn {
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
}

#recipeModal .badge {
    font-size: 0.95rem;    /* 调整徽章字号 */
    padding: 0.5em 0.8em;  /* 调整徽章尺寸 */
}
