/* style.css */
:root {
    --primary-color: #8A9B6E;  /* 主色调-莫兰迪灰绿色 */
    --bg-color: #F0EFE7;       /* 背景色-浅米白灰 */
    --text-dark: #4A5240;      /* 主要文字色-深灰绿 */
    --border-color: #D0D5C3;   /* 边框色-浅灰绿 */
    --warning-red: #A0522D; 
}

body {
    margin: 0;
    font-family: -apple-system, sans-serif;
    background: var(--bg-color);
    height: 100vh;
}

.hidden {
    display: none !important;
}

/* 公共样式 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: var(--bg-color);
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.content {
    padding: 80px 10px 70px;
    min-height: calc(100vh - 150px);
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    padding: 20px 0;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff url('default-avatar.png') no-repeat center;
    background-size: cover;
}

.username {
    margin-left: 20px;
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
}

/* 功能列表 */
.function-list {
    background: #fff;
    border-radius: 6px;
    padding: 0 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.function-item {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    color: #5C5C5C;
}

.arrow {
    width: 12px;
    height: 12px;
    border: solid var(--border-color);
    border-width: 0 1px 1px 0;
    transform: rotate(-45deg);
}

/* 登录弹窗 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.login-box {
    background: #fff;
    width: 80%;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.input-group {
    margin: 15px 0;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-sizing: border-box;
}

.login-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 20px;
    width: 100%;
    margin-top: 10px;
}

.login-tips {
    font-size: 12px;
    color: var(--text-dark);
    margin-top: 15px;
}

.login-tips span {
    color: var(--primary-color);
    text-decoration: underline;
}

.nav-item {
    font-size: 12px;
    color: #999;
    padding: 8px;
}

.nav-item.active {
    color: var(--primary-color);
    font-weight: bold;
}

/* 新增退出按钮布局 */
.logout-container {
    position: fixed;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
}

.logout-btn {
    display: inline-block;
    padding: 12px 50px;
    background: #F5F0E3;
    border: 1px solid #C6553F;
    color: #C6553F;
    border-radius: 25px;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(198,85,63,0.1);
    transition: all 0.3s;
}

.logout-btn:active {
    transform: scale(0.95);
    background: rgba(198,85,63,0.05);
}

/* 新增店铺名称样式 */
.shop-name {
    font-weight: bold;
    color: var(--text-dark);
    font-size: 15px;
}

/* 状态颜色扩展 */
.order-status.待付款 {
    color: var(--warning-red);
}
.order-status.已完成 {
    color: #7BA87B; /* 莫兰迪绿 */
}
.order-status.已取消 {
    color: #A8A8A8;
}

/* 调整布局结构 */
.order-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* 新增反馈页面样式 */
.feedback-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 100;
    padding: 60px 15px 0;
}

.feedback-content {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    resize: none;
    margin-bottom: 20px;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
    transition: all 0.3s;
}

.upload-area:active {
    background: #f8f8f8;
}

.upload-icon {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.upload-text {
    color: #666;
    font-size: 14px;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 25px;
    font-size: 16px;
}

/* 成功提示弹窗 */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.success-box {
    background: #fff;
    width: 70%;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.success-text {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.confirm-btn {
    background: var(--primary-color);
    color: white;
    padding: 10px 30px;
    border-radius: 20px;
    display: inline-block;
}

/* 新增客服页面样式 */
.service-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.service-header {
    padding: 60px 0 15px;
    text-align: center;
    font-weight: bold;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.system-msg {
    text-align: flex-start;
    margin: 20px 0;
}

.time-tag {
    color: #999;
    font-size: 12px;
    margin-bottom: 10px;
}

.bot-msg {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 70%;
}

.bot-label {
    color: var(--primary-color);
    font-size: 12px;
    margin-bottom: 5px;
}

.msg-content {
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.input-area {
    display: flex;
    padding: 15px;
    background: #fff;
    border-top: 1px solid var(--border-color);
}

#messageInput {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-right: 10px;
}

.send-btn {
    background: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 14px;
}

/* 用户消息样式 */
.user-msg {
    display: flex;
    justify-content: flex-end;
    margin: 15px 0;
}

.user-msg .msg-content {
    background: var(--primary-color);
    color: white;
}

/* 新增常见问题页面样式 */
.faq-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 100;
    padding: 60px 15px 0;
}

.faq-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: center;
}

.faq-item {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.faq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
}

.question-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-dark);
    padding-right: 15px;
}

.arrow-icon {
    width: 20px;
    height: 20px;
    position: relative;
    transition: transform 0.3s;
}

.arrow-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(135deg);
    width: 8px;
    height: 8px;
    border: solid var(--primary-color);
    border-width: 0 2px 2px 0;
}

.faq-item.active .arrow-icon {
    transform: rotate(180deg);
}

.answer-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 15px;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    border-top: 1px solid #f5f5f5;
}

.faq-item.active .answer-content {
    max-height: 500px;
    padding: 15px;
}

/* 标题栏布局调整 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: var(--bg-color);
    display: flex;
    align-items: center;  /* 新增 */
    justify-content: center;  /* 新增 */
}

.title-text {
    font-size: 18px;
    font-weight: bold;
}
/* 返回首页按钮样式 */
.back-home-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    font-size: 24px;
    line-height: 30px;
    text-align: center;
    z-index: 1000;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-home-btn:active {
    transform: scale(0.9);
    opacity: 0.8;
}

/* 确保不与其他头部冲突 */
.header {
    margin-top: 40px; /* 为返回按钮留出空间 */
}