/* 顶部通栏 */
.top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    flex-wrap: wrap;
}

/* Logo */
.logo {
}

/* 城市切换 */
.city-box {
    text-align: center;
    line-height: 1.3;
    cursor: pointer;
    color: #3a8a3a;
}
.city-box a {
    color: inherit;
    text-decoration: inherit;
}
.city-name {
    font-size: 15px;
    font-weight: 500;
}
.city-change {
    font-size: 12px;
    opacity: 0.9;
}

/* 搜索输入框 */
/* 父容器：给按钮提供定位基准 */
.search-wrap {
    position: relative;
    flex: 1;
    min-width: 150px;
    max-width: 300px;
    height: 44px;
    margin: 0 10px;
}

/* 输入框：适配手机端，保留你原来的样式 */
.search-input {
    width: 100%;
    height: 100%;
    border: 1px solid #e2b9cc;
    border-radius: 50px;
    padding: 0 70px 0 22px; /* 右边留空间给按钮 */
    font-size: 14px;
    color: #777;
    outline: none;
    background: #fff;
    transition: all 0.3s ease;
    -webkit-appearance: none; /* 清除iOS默认圆角 */
}

/* 按钮：内嵌在输入框右侧 */
.search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    height: 36px;
    padding: 0 16px;
    border: none;
    border-radius: 50px;
    background: #28a745; /* 保持你原来的绿色按钮 */
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    -webkit-appearance: none;
}

/* 手机端适配：小屏幕优化 */
@media (max-width: 768px) {
    .search-wrap {
        margin: 0 5px;
    }
    .search-input {
        padding-right: 60px;
        font-size: 13px;
    }
    .search-btn {
        padding: 0 12px;
        font-size: 13px;
    }
}

/* 注册登录 */
.auth-group {
    display: flex;
    gap: 22px;
}
.auth-link {
    color: #444;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}
.auth-link:hover {
    color: #b83a73;
}

.user-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}
.user-name {
    font-size: 16px;
    color: #333;
    white-space: nowrap;
    text-decoration: none;
}
.split-line {
    width: 1px;
    height: 22px;
    background-color: #333333;
}
.logout-text {
    font-size: 16px;
    color: #333;
    white-space: nowrap;
    text-decoration: none;
}

/* 主导航栏 */
.main-nav {
    margin: 0 12px 12px;
    background: linear-gradient(90deg, #e05998, #cc4482);
    border-radius: 50px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 13px 8px;
    box-shadow: 0 4px 10px rgba(204, 68, 130, 0.2);
}
.menu-btn {
    display: none;
}

/* 手机端适配：小于 768px 时触发 */
@media (max-width: 768px) {
    /* 汉堡按钮样式 */
    .menu-btn {
        display: block;
        background: #28a745;
        color: #fff;
        border: none;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        font-size: 18px;
        cursor: pointer;
        margin-left: 8px;
    }

    /* 导航条默认隐藏 */
    .main-nav {
        display: none;
        flex-direction: column;
        border-radius: 12px;
        margin: 8px 12px;
        padding: 10px;
    }

    /* 导航条展开时 */
    .main-nav.active {
        display: flex;
    }

    /* 手机端导航项样式 */
    .nav-item {
        color: #fff;
        padding: 10px 0;
        text-align: center;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }
    .nav-item:last-child {
        border-bottom: none;
    }

    /* 搜索框父容器适配 */
    .top-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
    }
    .search-wrap {
        flex: 1;
        margin-right: 8px;
    }
}

.nav-item {
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: opacity 0.3s;
}
.nav-item:hover {
    opacity: 0.82;
}

.main-content {
    min-height: 600px;
    background: #fff;
    padding: 0 20px;
}

@media (max-width:768px) {
    .top-bar {
        justify-content: center;
        row-gap: 12px;
    }
    .auth-group {
        width: 100%;
        justify-content: center;
    }
    .main-nav {
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px 6px;
    }
    .nav-item {
        font-size: 13px;
    }
}